Brian Dunning's FileMaker Custom Functions

BinomDist ( successes ; trials ; probability ; cumulative )

Returns the binomial probability distribution of obtaining the number of successes out of a fixed number of trials, where the result of each trial can be only success or failure, and the probability of success is constant throughout the experiment. BinomDist can calculate the probability that two out of the next three babies born will be male.

  Average rating: 3.6 (52 votes) Log in to vote

Michael Horak   Michael Horak - Show more from this author
*COMMENT Visual Realisation

Share on Facebook Share on Twitter

  Sample input:
BinomDist ( 10 ; 20 ; 0.5 ; 0 )
BinomDist ( 10 ; 20 ; 0.5 ; 1 )
  Sample output:
0.1761970520019531
0.5880985260009766

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Returns the binomial probability distribution of obtaining the number of successes out of a fixed number of trials, where the result of each trial can be only success or failure, and the probability of success is constant throughout the experiment. BinomDist can calculate the probability that two out of the next three babies born will be male.

Depending on the cumulative parameter, the BinomDist function returns either the individual probability of obtaining exactly the number of successes, or the cumulative probability of obtaining at most the number of successes.

The BinomDist function parameters are:
successes - the number of successes in trials;
trials - the number of independent trials;
probability - probability of success in each trial;
cumulative - a logical value that determines the form of the function: if cumulative is TRUE, BinomDist returns the cumulative distribution function, which is the probability of obtaining at most the number of successes; if FALSE, it returns the probability mass function, which is the probability of obtaining exactly the number of successes.

Example:
The flip of a coin can only result in 'heads' or 'tails'. The probability of any individual flip being 'heads' is 0.5.

The probability of getting exactly 10 'heads' results out of 20 flips is:
BinomDist ( 10 ; 20 ; 0.5 ; 0 ) = 17.62%

The probability of getting 10 or less 'heads' results out of 20 flips is:
BinomDist ( 10 ; 20 ; 0.5 ; 1 ) = 58.81%

 

Comments

Michael Shafik   Michael Shafik, Monterey, CA
Jan 12, 2013
Thank you so much. I am not a statistician, but I am taking a course in Statistics at the monet, and I have an assignment to submit, I was wondering about the fucntion of cumulative TRUE or FALSE. Your explanation is first to understand.

Thank you.

My email address in case: michaelshafik@hotmail.com
 
comment   comment, VR
Jan 12, 2013
Compare the two given examples.
 
David Crowe   David Crowe, Calgary
Jul 8, 2015
I know this function is 10 years old ... but it works well until the number of trials is 120, and then it breaks. It produces 0 as the answer, no matter what.
 
comment   comment, VR
Jul 8, 2015
@David Crowe:

You might have exceeded the limit of the Filemaker's calculation engine capacity. It would be easier to tell for sure if you provided the exact formula, including all 4 parameter values.

P.S. It's only a little over 9 years by my count.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: