+ Reply to Thread
Results 1 to 5 of 5

Formula for binomial threshold values

Hybrid View

  1. #1
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,369

    Re: Formula for binomial threshold values

    I tried to experiment with BINOM.INV(), but I never got anything even close to the right solution with this function.
    As I said, that is because BINOM.INV() is inverting the cumulative distribution function, not the probability density function. If you know what your target values for the PDF translate to on the CDF, then you can easily use BINOM.INV(). I don't know how to translate the PDF to CDF in a case like this, so I don't know how doable that approach would be.

    My solution to the "I could use Solver but I don't want to use Solver" scenario is to program my own "root-finding" algorithm. I have a tutorial here: https://www.excelforum.com/tips-and-...ind-roots.html The main first question is whether to do it purely in the spreadsheet (with iteration enabled) as shown in the first several examples. The final example (post #9) shows how this might be done in a VBA user-defined function.

    How do you want to proceed?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  2. #2
    Registered User
    Join Date
    06-04-2020
    Location
    Location
    MS-Off Ver
    365
    Posts
    3

    Re: Formula for binomial threshold values

    Seems I found the solution.

    Let n be the number of trials, π₀ be the reference probability. (I denote it with π to avoid confusing with p-value that will be mentioned later.) Let p₀ be the threshold probability from my original post. Then a dynamic array of all values for which the distribution is no greater than p₀ can be generated by the formula
    = FILTER(SEQUENCE(n + 1, 1, 0), BINOM.DIST(SEQUENCE(n + 1, 1, 0), n, π₀, FALSE) <= p₀)
    This works with Excel versions that support dynamic arrays and corresponding functions like FILTER and SEQUENCE.

    But finding these values was not an end in itself for me; this was in fact needed to calculate an exact binomial p-value for two-sided proportion test: k is the observed number of successes, π = k/n is the sample proportion, and the hypotheses are:

    • H₀: π = π
    • H₁: ππ

    So the p-value for this test can be calculated by the formula shown at this screenshot, and the corresponding Excel file is also attached.

    binomial_p-value.png
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Finding peak values above a certain threshold
    By Yukon-1 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-16-2019, 05:08 PM
  2. Replies: 1
    Last Post: 11-30-2016, 08:02 PM
  3. Inserting row of values for k into the binomial dist. function
    By Ernst88 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-15-2014, 11:58 AM
  4. Threshold values from graph or data
    By mondoyle in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-19-2014, 05:17 AM
  5. [SOLVED] Changing values to 0, 1, 2 or 3 based on certain threshold values
    By Baruch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2013, 11:55 PM
  6. Setting threshold to assign real values to class values
    By themoss1985 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2011, 11:50 PM
  7. [SOLVED] How to Manipulate formula for Binomial Distribution
    By GH in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-22-2006, 11:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1