Calculates the probability of exactly r successes in n trials with success probability p, as nCr × p^r × (1−p)^(n−r).
Explanation
This is the probability of getting exactly r successes in n trials when each trial succeeds with probability p.
P(X=r)=nCrpr(1−p)n−r The formula has three parts:
- pr — the chance of r successes
- (1−p)n−r — the chance that the other n−r trials fail
- nCr — the number of ways those successes can be spread across the n trials
Example
Toss a coin 10 times and ask for exactly 3 heads, so n=10, r=3 and p=0.5.
P(X=3)=10C3×0.53×0.57=120×10241=0.1171875 About 11.7%.
When it applies
The binomial distribution is only valid when all four of these hold:
- The number of trials n is fixed in advance
- Each trial has just two outcomes, success or failure
- The success probability p is the same every time
- The trials are independent, so earlier results do not affect later ones
Drawing tickets without replacing them breaks the third condition, because the probability shifts with every draw. That case needs the hypergeometric distribution instead.
Where it is used
Coin tosses, counts of defective parts, batting averages, the number of people agreeing in a survey. As n grows, the binomial distribution is well approximated by a normal one.