This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

BinomialDistribution

BinomialDistribution
represents a binomial distribution with n trials and success probability p.
  • The probability for value in a binomial distribution is for integers from 0 to n. »
Probability density function:
Cumulative distribution function:
Mean and variance of a binomial distribution:
Probability density function:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
 
Cumulative distribution function:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
 
Mean and variance of a binomial distribution:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Generate a set of pseudorandom numbers that have the binomial distribution:
Compare its histogram to the PDF:
Distribution parameters estimation:
Estimate the distribution parameters from sample data:
Compare a density histogram of the sample with the PDF of the estimated distribution:
Skewness:
The distribution is symmetric for :
The distribution becomes symmetric for large n:
Kurtosis:
The limiting value is the value of kurtosis of the standard NormalDistribution:
Different moments with closed forms as functions of parameters:
Closed form for symbolic order:
Hazard function:
Quantile function:
CDF of BinomialDistribution is an example of a right-continuous function:
A basketball player has a free-throw percentage of 0.75. Simulate 10 free throws:
Find the probability that the player hits 2 out of 3 free throws in a game:
Find the probability that the player hits the 2 last of 5 free throws:
Find the expected number of hits in a game with n free throws:
A baseball player is a 0.300 hitter. Simulate 5 pitches:
Find the expected number of hits if the player comes to bat 3 times:
A drug has proven to be effective in 30% of cases. Find the probability it is effective in 3 of 4 patients:
Find the expected number of successes when applied to 500 cases:
The number of heads in n flips with a fair coin can be modeled with BinomialDistribution:
Show the distribution of heads for 100 coin flips:
Compute the probability that there are between 60 and 80 heads in 100 coin flips:
Now, suppose that for an unfair coin the probability of heads is 0.6:
The distribution and the corresponding probabilities have changed:
A machine produces parts, with 1 in 10 defective:
Compute the probability that at most 1 of 5 parts is defective:
An airplane engine fails with probability p; compute the probability that no more than 2 of 4 fail:
Compute the probability that no more than 1 of 2 fails:
Decide when the choice of four engines is better than two engines:
A system uses triple redundancy with three microprocessors and is designed to operate as long as one processor is still functional. The probability that a microprocessor is still functional after seconds is . Find the probability that the system is still operating after seconds:
With mean time to failure for each processor , find out when the system functions with a probability of less than 99%:
Expressed in years:
Gary Kasparov, chess champion, plays in a tournament simultaneously against 100 amateurs. It has been estimated that he loses about 1% of such games. Find the probability of losing 0, 2, 5, and 10 games:
Use a Poisson approximation to compute the same probabilities:
Perform the same computation when he is playing 5 games, but with stronger opposition so that his loss probability is 10% instead:
In this case the Poisson approximation is less accurate:
A packet consisting of a string of n symbols is transmitted over a noisy channel. Each symbol has probability of incorrect transmission. Find n such that the probability of incorrect packet transmission is less than :
Compute the same limit using a Poisson approximation:
Find the probability that out of n customers need a service if each uses it with probability p:
Compute the probability that more than (capacity) simultaneous service requests are made:
Compute the probability of getting service if and for different capacities :
Find the smallest capacity that provides a 99.9% probability of getting service:
Two players roll dice. If the total of both numbers is less than 10, the second player is paid 4 cents; otherwise the first player is paid 9 cents. Is the game fair?:
The game is not fair, since mean scores per game are not equal:
Find the probability that after n games the player at the disadvantage scores more:
The probability exhibits oscillations:
The maximum of probability is attained at :
BinomialDistribution converges to a normal distribution as :
Relationships to other distributions:
The sum of n independent variables with BernoulliDistribution is binomial distributed:
BinomialDistribution is the infinite population limit of HypergeometricDistribution:
BinomialDistribution approaches the PoissonDistribution for large n and small p:
A bivariate multinomial distribution is a binomial distribution:
BinomialDistribution is not defined when p is not between zero and one:
BinomialDistribution is not defined when n is not a positive integer:
Substitution of invalid parameters into symbolic outputs gives results that are not meaningful:
Construct a polynomial approximation of on the interval from 0 to 1 following Bernstein:
Approximation of is constructed as the expectation of , where is a binomial random variate with parameters and so that the mean of equals :
Plot the original function and its approximations:
New in 6