Skip to content

The binomial distribution: formula, when to use it, examples

5 min read

Short answer

If you repeat an experiment nn times, each trial independent with the same success probability pp, the number of successes XX follows a binomial distribution: P(X=k)=(nk)pk(1−p)n−k.P(X=k)=\binom{n}{k}p^k(1-p)^{n-k}. The mean is npnp and the variance is np(1−p)np(1-p).

Binomial distribution for 10 fair coin tosses, most likely 5 heads012345678910number of heads kP(3) ≈ 0.117
Number of heads in 10 fair coin tosses. The most likely outcome is 5 heads, with probability 252/1024 ≈ 24.6%.

When it applies: four conditions

Use the binomial model only when all four hold:

  1. A fixed number nn of trials.
  2. Each trial has two outcomes (success or failure).
  3. Trials are independent.
  4. The success probability pp is the same every trial.

Drawing cards without replacement from a small deck breaks independence, so it is not binomial (it is hypergeometric).

Why the formula looks like that

One specific sequence with kk successes and n−kn-k failures has probability pk(1−p)n−kp^k(1-p)^{n-k}. The factor (nk)=n!k! (n−k)!\binom{n}{k}=\dfrac{n!}{k!\,(n-k)!} counts how many different sequences contain exactly kk successes. Probability of one sequence times the number of sequences is the formula.

Worked example

(a) What is the probability of exactly 3 heads in 10 fair coin tosses? (b) What is the probability of at least one six in 4 rolls of a die?

(a) n=10n=10, p=12p=\tfrac12, k=3k=3: P(X=3)=(103)(12)10=1201024≈0.117.P(X=3)=\binom{10}{3}\left(\tfrac12\right)^{10}=\frac{120}{1024}\approx0.117.

(b) "At least one" is easiest through the complement. The chance of no six in one roll is 5/65/6, so P(X≥1)=1−(56)4=1−6251296=6711296≈0.518.P(X\ge1)=1-\left(\tfrac56\right)^4=1-\frac{625}{1296}=\frac{671}{1296}\approx0.518.

Try it yourself

A free-throw shooter makes 20% of shots. In 5 independent shots, what is the probability of exactly 2 makes?

Show the answer

P(X=2)=(52)(0.2)2(0.8)3=10⋅0.04⋅0.512=0.2048P(X=2)=\binom52(0.2)^2(0.8)^3=10\cdot0.04\cdot0.512=0.2048, about 20.5%.

Keep going with practice

Vidi's Linear Algebra & Probability course has an interactive distribution plot where you change the parameters and watch the bars move.