Previous Up Next

20.4.3  Binomial distribution

The probability density function for the binomial distribution.

If you perform an experiment n times where the probability of success each time is p, then the probability of exactly k successes is:

binomial(n,k,p)=
n
 
k

pk (1−p)nk     (1)

This determines the binomial distribution.

The binomial command computes the density function for the binomial distribution.

Examples

binomial(10,2)

or:

comb(10,2)
     
45           
binomial(10,2,0.4)
     
0.120932352           
The cumulative distribution function for the binomial distribution.

The binomial_cdf command computes the cumulative distribution function for the binomial distribution.

Examples

binomial_cdf(4,0.5,2)
     
0.6875           
binomial_cdf(2,0.3,1,2)
     
0.51           
The inverse distribution function for the binomial distribution.

The binomial_icdf command computes the inverse distribution function for the binomial distribution.

Example

binomial_icdf(4,0.5,0.9)
     
3           

Note that binomial_cdf(4,0.5,3)=0.9375, which is bigger than 0.9, while binomial_cdf(4,0.5,2)=0.6875, which is smaller than 0.9.


Previous Up Next