Statistics 🔔 Random Variables & Distributions

The Binomial Distribution

Counting successes in a fixed number of independent yes-or-no trials — and the tidy formula that gives every probability.

Intro StatisticsAP Statistics levelCollege Stats 101
💡
The big idea: A huge range of everyday questions have the same skeleton: you repeat the same yes-or-no trial a fixed number of times and count how many come up "success." Flip a coin ten times and count heads; take six free throws and count makes; inspect a batch of parts and count defects. Whenever the trials are independent and the success chance stays the same, the count of successes follows one distribution — the binomial — whose whole shape is set by just two numbers, n and p.
🎯 By the end, you'll be able to
  • Recognize when a situation fits the binomial setting (fixed n, independent trials, constant p, count of successes)
  • Identify a single Bernoulli trial as the building block of a binomial
  • Use the binomial PMF P(X=k)=C(n,k)p^k(1-p)^(n-k) to find the probability of exactly k successes
  • Compute the mean np and standard deviation sqrt(np(1-p)) of a binomial count
  • Describe how the binomial's shape becomes bell-like as n grows
📎 You should already know
  • Basic probability and the multiplication rule for independent events
  • The normal distribution and its bell shape

One trial, repeated

Start with the simplest random thing there is: a single trial with exactly two outcomes. Call one of them success and the other failure. A coin flip (heads or tails), a free throw (make or miss), a manufactured part (good or defective) — each is one such trial. A trial like this, with a fixed success probability, is called a Bernoulli trial.

Now repeat that exact same trial a fixed number of times and simply count the successes. That count is a random number — sometimes low, sometimes high. The binomial distribution tells you exactly how likely each possible count is.

🔑 The binomial setting — four conditions
A count of successes follows a binomial distribution when all four of these hold:
  • Fixed number of trials. You decide n in advance (10 flips, 6 shots, 50 parts).
  • Two outcomes per trial. Each trial is a success or a failure — nothing in between.
  • Constant probability. The success probability p is the same on every trial.
  • Independence. One trial's result does not change the odds on any other.
When these hold, the count of successes X is a binomial with parameters n and p, often written \(X \sim \text{Binomial}(n, p)\).

Where the formula comes from

Suppose you want the probability of getting exactly k successes in n trials. Any one specific sequence with k successes and n−k failures has probability \(p^k(1-p)^{n-k}\), because the trials are independent so their probabilities multiply. But there are many different sequences that give k successes — the successes could land in any of the trial positions. The number of ways to choose which k of the n trials are the successes is the binomial coefficient \(\binom{n}{k}\). Multiply the two together and you have the whole probability.

\[ P(X = k) = \binom{n}{k}\, p^{k}\,(1-p)^{\,n-k}, \qquad k = 0, 1, 2, \ldots, n \]
The binomial PMF: the chance of exactly k successes in n independent trials, each with success probability p. Here C(n,k) counts the arrangements and p^k(1−p)^(n−k) is the chance of any one of them.

Play with n and p

The bars below are the binomial PMF — one bar for each possible count k from 0 to n, its height the probability \(P(X=k)\). Drag p and watch the whole picture slide: near p = 0.5 it is symmetric, while small or large p pushes it to one side. Then raise the number of trials n. Notice two things happen at once: the bars spread out over more values, and the outline smooths into a familiar bell shape.

🎮 Interactive: the binomial PMF LIVE
Each bar is P(X=k) for a Binomial(n, p). Change p to shift and skew the distribution; increase n to watch it spread and turn bell-shaped. The marked center sits at the mean np.
✨ Why it drifts toward a bell
A binomial count is really a sum of n independent one-or-zero trials. Summing many independent pieces is exactly the situation where a bell shape emerges, so as n grows the binomial looks more and more like a normal curve — clearest when p is near 0.5, and needing a larger n when p is close to 0 or 1. This is why, for large n, people often approximate binomial probabilities with the normal curve centered at np.

Center and spread without listing every bar

You rarely need all n+1 probabilities to describe a binomial — two summary numbers capture its center and its spread. Because X is a sum of n identical independent trials, the mean and variance of one trial (mean p, variance p(1−p)) simply add up n times:

\[ \mu = np \qquad\qquad \sigma = \sqrt{\,np(1-p)\,} \]
The mean (expected number of successes) is np. The standard deviation is the square root of np(1−p), which is largest when p = 0.5 and shrinks as p approaches 0 or 1.
📝 Worked example: A basketball player makes each free throw independently with probability p = 0.8 and takes n = 6 shots. What is the chance of making exactly 5, and what are the mean and standard deviation of the number made?
  1. Check the setting: 6 fixed trials, two outcomes (make or miss), constant p = 0.8, shots independent. Binomial applies.
  2. Apply the PMF with n = 6, k = 5: \(P(X=5)=\binom{6}{5}(0.8)^5(0.2)^1\).
  3. Compute the pieces: \(\binom{6}{5}=6\), \((0.8)^5 = 0.32768\), and \((0.2)^1 = 0.2\), so \(P(X=5)=6 \times 0.32768 \times 0.2\).
  4. Center and spread: \(\mu = np = 6 \times 0.8 = 4.8\) and \(\sigma = \sqrt{np(1-p)} = \sqrt{6 \times 0.8 \times 0.2} = \sqrt{0.96}\).
✓ P(X = 5) ≈ 0.393, so about a 39% chance of making exactly five. On average the player makes μ = 4.8 shots, with a standard deviation of σ ≈ 0.98 shots.

Check your understanding

1. A situation follows the binomial setting only when…
The binomial setting needs a fixed number of trials, exactly two outcomes each, a constant success probability p, and independence between trials.
2. A fair coin is flipped n = 4 times. What is the probability of getting exactly 2 heads?
P(X=2) = C(4,2)(0.5)^2(0.5)^2 = 6 × 0.0625 = 0.375.
3. For a Binomial(n = 20, p = 0.1), the mean number of successes is…
The mean of a binomial is np = 20 × 0.1 = 2.
4. For a Binomial(n = 100, p = 0.5), the standard deviation of the number of successes is…
σ = sqrt(np(1−p)) = sqrt(100 × 0.5 × 0.5) = sqrt(25) = 5.
✅ Key takeaways
  • A Bernoulli trial is a single yes-or-no trial with a fixed success probability p; a binomial counts the successes across n independent Bernoulli trials.
  • The binomial setting requires four things: a fixed number of trials n, two outcomes per trial, a constant p, and independence.
  • The PMF gives the chance of exactly k successes: P(X=k) = C(n,k) p^k (1-p)^(n-k).
  • The mean is np and the standard deviation is sqrt(np(1-p)), which is largest near p = 0.5.
  • As n grows, the binomial spreads out and its shape approaches a bell (normal) curve, especially when p is near 0.5.