Probability 01 Basic Probability 02 Conditional Probability 03 Bayes' Theorem 04 Discrete Distributions 05 Binomial Distribution 06 Poisson Distribution 07 Normal Distribution 08 Continuous Distributions 09 Expected Value & Variance
Probability — Topic 05

The Binomial Distribution

Counting successes in n independent trials, the formula, mean, variance, and when to reach for the normal approximation.

PMF Formula Mean & Variance 10 Worked Examples Bar Chart Diagram Normal Approximation 10-Question Quiz
Share this page

§ 01What Is a Binomial Experiment?

Before we write a single formula, we need to recognise the type of situation the binomial distribution models, and understand why four very specific conditions must hold.

Many real-world problems involve repeating the same action multiple times and counting how often a particular outcome occurs: flipping a coin ten times and counting heads, testing fifty manufactured parts and counting defects, guessing on a twenty-question multiple-choice exam. All of these are binomial experiments.

The binomial distribution gives us the probability of getting exactly k successes in n independent trials when each trial has the same probability p of success. The word "binomial" refers to the two possible outcomes on every single trial: success or failure, yes or no, head or tail.

  • 1
    Fixed number of trials, nThe experiment is performed a predetermined number of times. You do not stop early based on results.
  • 2
    Each trial has exactly two outcomesWe label one outcome "success" and the other "failure". Which is which depends on the question, not on which outcome is desirable.
  • 3
    Constant probability of success, pThe probability of success is the same on every single trial. This is the condition most often violated in practice (sampling without replacement from a small population violates it).
  • 4
    Trials are independentThe outcome of one trial does not affect the probability on any other trial. Independence and constant p go hand in hand.

When all four conditions hold, we write X ∼ B(n, p) (or sometimes Bin(n, p)), read "X follows a binomial distribution with parameters n and p."

Notation X is the random variable counting successes. Its possible values are 0, 1, 2, …, n. The parameters are n (positive integer: number of trials) and p (real number in [0, 1]: probability of success per trial). We also write q = 1 − p for the probability of failure.

§ 02The Probability Mass Function

The PMF tells us the probability that X takes the value k, that is, exactly k successes in n trials.

The Binomial PMF
P(X = k) = C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ

where k = 0, 1, 2, …, n

and C(n, k) = n! / (k! · (n − k)!) is the binomial coefficient ("n choose k")

There are three multiplicative pieces, each with a clear meaning:

C(n, k), the combinatorial piece. This counts the number of distinct orderings in which exactly k successes and n−k failures can be arranged across n trials. For example, if n = 4 and k = 2, the sequences SSFF, SFSF, SFFS, FSSF, FSFS, FFSS are all different arrangements of 2 successes in 4 trials, and C(4, 2) = 6 counts them correctly.

pᵏ, the probability of any specific arrangement that contains exactly k successes, since each success occurs with probability p and the trials are independent, these multiply to pᵏ.

(1−p)ⁿ⁻ᵏ, the probability of the remaining n−k failures in that same specific arrangement, each occurring with probability q = 1−p.

Multiplying the three pieces gives the probability of any specific k-success sequence and then counts how many such sequences exist, yielding the correct total probability.

Key identity
Σ P(X = k) from k=0 to n = 1

This follows directly from the binomial theorem: (p + q)ⁿ = Σ C(n,k) pᵏ qⁿ⁻ᵏ = 1ⁿ = 1. In other words, the probabilities of all possible outcomes sum to exactly 1, a useful internal check on calculations.

§ 03Mean, Variance, and Standard Deviation

You could compute μ = Σ k · P(X = k) from scratch, but the binomial's elegant structure yields closed-form expressions directly.

Mean (Expected Value)
μ = E[X] = np
Variance
σ² = Var(X) = np(1 − p)
Standard Deviation
σ = √(np(1 − p))
Mode
⌊(n+1)p⌋ or ⌊(n+1)p⌋ − 1

Intuition for the Mean

If you flip a fair coin (p = 0.5) 100 times, you expect about 50 heads: μ = 100 × 0.5 = 50. This is simply the number of trials multiplied by the probability of success on each trial, exactly what common sense suggests.

Intuition for the Variance

The variance np(1−p) is maximised when p = 0.5 (most uncertainty) and approaches zero as p → 0 or p → 1 (near-certain outcome). It can never exceed n/4. This captures the idea that outcomes are most spread out when success and failure are equally likely, and most concentrated when one outcome is almost certain.

Proof of the Mean (Outline)

Write X = X₁ + X₂ + ⋯ + Xₙ where each Xᵢ is a Bernoulli(p) random variable equal to 1 for success and 0 for failure. By linearity of expectation, E[X] = Σ E[Xᵢ] = n · p. The variance follows similarly from Var(Xᵢ) = p(1−p) and the independence of the trials.

§ 04Shape of the Distribution — Visual Guide

The binomial distribution changes shape dramatically depending on p. For p = 0.5 it is perfectly symmetric; for p < 0.5 it is right-skewed; for p > 0.5 it is left-skewed.

Figure 1 — B(10, 0.3): P(X = k) for k = 0 to 10
0 0.1 0.2 0.3 0.4 0.028 0.121 0.234 0.267 ★ 0.200 0.103 0.037 0.009 0.001 ≈0 0 1 2 3 4 5 6 7 8 9–10 k (number of successes) P(X = k) μ = 3 Mode Other k Mean μ

The chart above shows X ∼ B(10, 0.3). The distribution is right-skewed because p = 0.3 < 0.5: the bulk of the probability sits on lower values of k, with a long tail trailing to the right. The mean is μ = 10 × 0.3 = 3, and the mode (most probable outcome) is k = 3 (highlighted in gold).

Compare this mental picture to a symmetric B(10, 0.5) where the distribution would form a perfect bell shape centred at k = 5, or a left-skewed B(10, 0.8) where most probability sits near k = 8.

Table 1 — Full PMF for B(10, 0.3)
kC(10, k)0.3ᵏ0.7¹⁰⁻ᵏP(X = k)P(X ≤ k)
011.0000.02820.02820.0282
1100.3000.04040.12110.1493
2450.0900.05760.23350.3828
31200.0270.08240.26680.6496
42100.0080.11760.20010.8497
52520.0020.16810.10290.9527
62100.0010.24010.03680.9894
71200.00020.34300.00900.9984
8450.000070.49000.00140.9999
9100.000020.70000.0001≈1.000
1010.0000061.0000.00001.000

§ 05Worked Examples

Ten fully worked problems covering single-value probabilities, cumulative probabilities, mean and variance, complement method, and real-world contexts.

Example 01 Basic single-probability — fair coin

A fair coin is flipped 8 times. What is the probability of getting exactly 5 heads?

Identify parameters
n = 8, k = 5, p = 0.5, q = 0.5
Apply the PMF
P(X = 5) = C(8,5) · (0.5)⁵ · (0.5)³
Compute C(8,5)
C(8,5) = 8!/(5!·3!) = (8·7·6)/(3·2·1) = 56
Compute probability
P(X = 5) = 56 × (0.5)⁸ = 56/256 ≈ 0.2188
P(X = 5) ≈ 0.219
Example 02 Manufacturing — defective items

A production line has a 4% defect rate. A sample of 20 items is inspected. Find the probability that exactly 2 items are defective.

Parameters
n = 20, k = 2, p = 0.04, q = 0.96
PMF
P(X = 2) = C(20,2) · (0.04)² · (0.96)¹⁸
Calculate
C(20,2) = 190; (0.04)² = 0.0016; (0.96)¹⁸ ≈ 0.4796
Final answer
P(X = 2) = 190 × 0.0016 × 0.4796 ≈ 0.1458
P(X = 2) ≈ 0.146
Example 03 Cumulative probability — "at most"

X ∼ B(6, 0.25). Find P(X ≤ 2).

Expand the CDF
P(X ≤ 2) = P(X=0) + P(X=1) + P(X=2)
P(X = 0)
C(6,0)·(0.25)⁰·(0.75)⁶ = 1·1·0.1780 = 0.1780
P(X = 1)
C(6,1)·(0.25)¹·(0.75)⁵ = 6·0.25·0.2373 = 0.3560
P(X = 2)
C(6,2)·(0.25)²·(0.75)⁴ = 15·0.0625·0.3164 = 0.2966
Sum
P(X ≤ 2) = 0.1780 + 0.3560 + 0.2966 = 0.8306
P(X ≤ 2) ≈ 0.831
Example 04 Complement rule — "at least one"

A student guesses randomly on a 10-question true/false quiz. What is the probability of getting at least one question correct?

Use the complement
P(X ≥ 1) = 1 − P(X = 0)
P(X = 0) with n=10, p=0.5
P(X = 0) = (0.5)¹⁰ = 1/1024 ≈ 0.000977
Complement
P(X ≥ 1) = 1 − 0.000977 ≈ 0.999
P(X ≥ 1) ≈ 0.999

The complement method is essential when "at least one" appears, summing all terms from k=1 to 10 would take far longer.

Example 05 Mean and variance

X ∼ B(15, 0.4). Find the mean, variance, and standard deviation of X.

Mean
μ = np = 15 × 0.4 = 6
Variance
σ² = np(1−p) = 15 × 0.4 × 0.6 = 3.6
Standard deviation
σ = √3.6 ≈ 1.897
μ = 6, σ² = 3.6, σ ≈ 1.90
Example 06 Medical testing — sensitivity

A diagnostic test correctly identifies a disease 90% of the time. In a group of 12 infected patients, what is the probability that the test correctly identifies at least 10?

Parameters
n = 12, p = 0.9, find P(X ≥ 10) = P(10) + P(11) + P(12)
P(X = 10)
C(12,10)·(0.9)¹⁰·(0.1)² = 66 × 0.3487 × 0.01 = 0.2301
P(X = 11)
C(12,11)·(0.9)¹¹·(0.1)¹ = 12 × 0.3138 × 0.1 = 0.3766
P(X = 12)
C(12,12)·(0.9)¹² = 1 × 0.2824 = 0.2824
Sum
P(X ≥ 10) = 0.2301 + 0.3766 + 0.2824 = 0.8891
P(X ≥ 10) ≈ 0.889
Example 07 Finding n given a probability constraint

A free-throw shooter makes 70% of shots. How many shots must they attempt so that P(at least one miss) > 0.99?

Rewrite condition (success = miss, p = 0.3)
P(X ≥ 1) > 0.99 ⟺ 1 − P(X=0) > 0.99 ⟺ (0.7)ⁿ < 0.01
Take logarithms
n · ln(0.7) < ln(0.01) → n > ln(0.01)/ln(0.7) ≈ 12.91
Conclusion
Smallest integer n = 13 shots
n = 13
Example 08 Biased die — counting sixes

A biased die shows a six with probability 1/4. The die is rolled 7 times. Find P(X = 3).

Parameters
n = 7, k = 3, p = 1/4, q = 3/4
PMF
P(X=3) = C(7,3)·(1/4)³·(3/4)⁴
Evaluate
= 35 × (1/64) × (81/256) = 35 × 81 / 16384 = 2835/16384 ≈ 0.1730
P(X = 3) ≈ 0.173
Example 09 Normal approximation to the binomial

X ∼ B(100, 0.45). Using a normal approximation with continuity correction, find P(X ≤ 40).

Check np ≥ 5 and n(1−p) ≥ 5
np = 45 ≥ 5 ✓ n(1−p) = 55 ≥ 5 ✓ (approximation valid)
Compute μ and σ
μ = 45, σ² = 100 × 0.45 × 0.55 = 24.75, σ ≈ 4.975
Continuity correction: P(X ≤ 40) ≈ P(Z ≤ 40.5)
z = (40.5 − 45) / 4.975 = −4.5 / 4.975 ≈ −0.904
From z-table
P(Z ≤ −0.904) ≈ 0.1831
P(X ≤ 40) ≈ 0.183
Example 10 Probability strictly between two values

X ∼ B(12, 0.35). Find P(3 ≤ X ≤ 6).

Use subtraction of CDFs
P(3 ≤ X ≤ 6) = P(X ≤ 6) − P(X ≤ 2)
P(X ≤ 2) (compute P(0)+P(1)+P(2))
P(0) = 0.65¹² ≈ 0.0057; P(1) ≈ 0.0368; P(2) ≈ 0.1088 P(X ≤ 2) ≈ 0.1513
P(X ≤ 6) — add P(3) through P(6)
P(3) ≈ 0.1954; P(4) ≈ 0.2367; P(5) ≈ 0.2039; P(6) ≈ 0.1281 P(X ≤ 6) ≈ 0.1513 + 0.1954 + 0.2367 + 0.2039 + 0.1281 = 0.9154
Final answer
P(3 ≤ X ≤ 6) = 0.9154 − 0.1513 = 0.7641
P(3 ≤ X ≤ 6) ≈ 0.764

§ 06The Normal Approximation

When n is large, computing dozens of binomial terms becomes tedious. The Central Limit Theorem rescues us: the binomial distribution is well approximated by a normal distribution.

For X ∼ B(n, p) with np ≥ 5 and n(1−p) ≥ 5, we approximate X ≈ N(np, np(1−p)). The rule of thumb checks that both the expected number of successes and expected number of failures are at least 5, ensuring neither outcome is too rare for the bell curve to apply.

Continuity Correction
P(X ≤ k) ≈ P(Z ≤ (k + 0.5 − μ) / σ)

The continuity correction (adding or subtracting 0.5) compensates for the fact that we are approximating a discrete distribution with a continuous one. Without it, answers can be off by several percentage points, especially for smaller n.

When NOT to use the normal approximation If p is close to 0 (or close to 1) and n is moderate, the distribution is highly skewed and the normal approximation is poor. In that case, use the Poisson approximation instead (when np is small, say < 5).

§ 07Common Mistakes

Mistake 1: Using the binomial when trials are not independent Sampling without replacement from a small population violates independence. If you draw 5 cards from a standard deck of 52 without replacing, the probability of success changes each draw. Use the hypergeometric distribution instead.
Mistake 2: Forgetting the binomial coefficient Writing P(X = 3) = p³·(1−p)ⁿ⁻³ without multiplying by C(n, 3) gives the probability of one specific arrangement, not all arrangements. This is often the most common calculation error.
Mistake 3: Confusing "at least k" with "exactly k" "At least 3" means P(X ≥ 3) = 1 − P(X ≤ 2), not P(X = 3). Read the problem wording carefully and decide whether to sum multiple terms or use the complement.
Mistake 4: Omitting the continuity correction in the normal approximation Approximating P(X ≤ 30) with P(Z ≤ (30 − μ)/σ) instead of P(Z ≤ (30.5 − μ)/σ) can introduce noticeable error. Always add 0.5 to the upper bound (or subtract 0.5 from the lower bound) when using the normal approximation for a discrete distribution.
Mistake 5: Computing C(n, k) incorrectly for large n Cancel factorial terms before multiplying to avoid overflow. C(20, 3) = (20 × 19 × 18)/(3 × 2 × 1) = 1140, not (20! / 3!) computed directly.

§ 08Related Topics

The binomial distribution connects naturally to several other topics. Explore them to deepen your understanding.

§ 0910-Question Quiz

Test your understanding. Each question gives immediate feedback. Click "See Explanation" after answering to read a full solution.

Score: 0 / 10
Question 01 — Multiple Choice
Which condition is NOT required for a binomial distribution?
Question 02 — Fill In
For X ∼ B(10, 0.3), the mean E[X] = .
Mean = np = 10 × 0.3.
Question 03 — Multiple Choice
X ∼ B(5, 0.5). What is P(X = 0)?
Question 04 — Fill In
For X ∼ B(20, 0.5), the variance Var(X) = .
Var(X) = np(1−p) = 20 × 0.5 × 0.5.
Question 05 — Multiple Choice
P(X = k) = C(n,k)·pᵏ·(1−p)ⁿ⁻ᵏ. The C(n,k) term accounts for:
Question 06 — Fill In
C(6, 2) = .
C(6,2) = 6! / (2! × 4!) = (6 × 5) / (2 × 1) = 15.
Question 07 — Multiple Choice
For the normal approximation to be valid, which conditions must hold?
Question 08 — Multiple Choice
A fair coin is flipped 4 times. P(exactly 2 heads) = ?
Question 09 — Fill In
X ∼ B(8, 0.5). P(X ≥ 1) = 1 − P(X = 0) = 1 − .
P(X=0) = (0.5)⁸ = 1/256. Enter the decimal value.
Question 10 — Multiple Choice
The variance of a binomial distribution is maximised when p equals:

Cookie Settings