MathematicsGrade 11–13

Binomial distribution

The histogram of the binomial distribution: choose a range and read off the probability directly.

Loading simulation …

What is it about?

A Bernoulli chain of length nn repeats an experiment with only two outcomes (success or failure) nn times independently, always with the same probability of success pp. The number of successes XX is then binomially distributed, X∼B(n; p)X \sim B(n;\,p):

P(X=k)=(nk)⋅pk⋅(1−p)n−kP(X = k) = \binom{n}{k} \cdot p^k \cdot (1 - p)^{n - k}

With the cumulative distribution function F(k)=P(X≤k)F(k) = P(X \le k):

  • at most kk: P(X≤k)=F(k)P(X \le k) = F(k)
  • at least kk: P(X≥k)=1−F(k−1)P(X \ge k) = 1 - F(k - 1)
  • between aa and bb: P(a≤X≤b)=F(b)−F(a−1)P(a \le X \le b) = F(b) - F(a - 1)

Expected value μ=n⋅p\mu = n \cdot p, standard deviation σ=n⋅p⋅(1−p)\sigma = \sqrt{n \cdot p \cdot (1-p)}. The interval [μ−2σ; μ+2σ][\mu - 2\sigma;\, \mu + 2\sigma] usually holds about 95 %95\,\% of the probability.

Try it

  1. Drag the bound kk on the histogram and watch the calculation. Load example
  2. Change pp and nn: where does μ\mu go, how wide is the histogram? B(20; 0.3)
  3. Switch to the cumulative view: every bar becomes a step of F(k)F(k). Step function
  4. Run the experiment 1000 times and compare the orange outline with the bars.

Tasks

Task 1: Guessing in a test

2020 questions with four answers each, guessing at random. Find P(X=5)P(X = 5) and P(X≥10)P(X \ge 10). Load task

Show solution

P(X=5)=(205)⋅0.255⋅0.7515≈0.2023P(X = 5) = \binom{20}{5} \cdot 0.25^5 \cdot 0.75^{15} \approx 0.2023; P(X≥10)=1−F(9)≈1−0.9861=0.0139P(X \ge 10) = 1 - F(9) \approx 1 - 0.9861 = 0.0139. Show in simulation

Task 2: 100 coin tosses

Find μ\mu, σ\sigma and P(40≤X≤60)P(40 \le X \le 60). Load task

Show solution

μ=50\mu = 50, σ=5\sigma = 5, P(40≤X≤60)=F(60)−F(39)≈0.9824−0.0176=0.9648P(40 \le X \le 60) = F(60) - F(39) \approx 0.9824 - 0.0176 = 0.9648 – exactly the 2σ2\sigma interval. Show in simulation

Task 3: At least one

A part is faulty with probability 0.050.05. Among 5050 parts, find P(X≥1)P(X \ge 1). Load task

Show solution

P(X≥1)=1−0.9550≈0.9231P(X \ge 1) = 1 - 0.95^{50} \approx 0.9231; μ=2.5\mu = 2.5. Show in simulation

Ideas for the classroom

  • Use it after the Galton board: there the distribution emerges, here you calculate with it.
  • Check the requirements together first (two outcomes, independent, same pp) – drawing without replacement is a good counterexample.
  • Common stumbling blocks:
    • “At least kk” computed as 1−F(k)1 - F(k) instead of 1−F(k−1)1 - F(k - 1).
    • P(a≤X≤b)P(a \le X \le b) computed as F(b)−F(a)F(b) - F(a), which misses P(X=a)P(X = a).
    • Confusing σ\sigma with the variance n⋅p⋅(1−p)n \cdot p \cdot (1-p).