What Is the Binomial Distribution?
The binomial distribution belongs to the family of discrete probability distributions because its random variable X takes integer values only: X ∈ {0, 1, 2, …, n}. Its two governing parameters are n (the number of trials) and p (the probability of success on any single trial).
The model was first described rigorously by Jacob Bernoulli in his 1713 work Ars Conjectandi. Abraham de Moivre later showed that the binomial distribution converges to the normal distribution as n grows large — the result now known as the Central Limit Theorem. The term "binomial" comes from the binomial theorem in algebra, which governs the expansion of (p + q)ⁿ and generates the same probability coefficients.
- Parameters: n (number of trials), p (probability of success per trial)
- Random variable X: Number of successes; X ∈ {0, 1, 2, …, n}
- PMF: P(X = k) = C(n,k) · pᵏ · (1−p)ⁿ⁻ᵏ
- Mean (Expected Value): μ = n · p
- Variance: σ² = n · p · (1−p)
- Standard Deviation: σ = √(n · p · (1−p))
- Special case: When n = 1, the binomial distribution is a Bernoulli distribution
The Four Conditions for a Binomial Distribution
1. Fixed trials (n): The number of trials is set in advance. 2. Two outcomes: Each trial results in only success or failure. 3. Constant probability (p): The probability of success is the same for every trial. 4. Independence: The outcome of one trial does not affect any other trial.
Before applying the binomial distribution, verify that all four conditions hold. If even one fails, the binomial model is not appropriate and you may need to consider alternatives such as the Poisson distribution (when p is very small and n is very large), the geometric distribution (when you're counting trials until the first success), or the hypergeometric distribution (when sampling without replacement from a small, finite population).
Fixed Number of Trials (n)
The experiment consists of exactly n trials, decided before the experiment begins. You're not stopping when something happens — you run all n trials and count successes at the end. Example: testing exactly 50 products off an assembly line.
Two Possible Outcomes per Trial
Each individual trial — called a Bernoulli trial — produces exactly one of two mutually exclusive outcomes: success or failure. The labels are arbitrary; in a quality control setting, "success" might mean a defective unit was found. What matters is that all outcomes map onto this binary structure.
Constant Probability of Success (p)
The probability of success is the same on every trial: p₁ = p₂ = … = pₙ = p. This condition is often checked by asking whether the population is much larger than the sample. A common rule of thumb: if the sample is less than 5–10% of the population, the constant-p assumption holds well enough in practice.
Independent Trials
The outcome of any trial has no effect on any other trial. Drawing with replacement guarantees independence. Drawing without replacement from a large population approximates independence closely enough that the binomial model still works. If the population is small and sampling is without replacement, use the hypergeometric distribution instead.
The Binomial Distribution Formula
n = number of trials
k = number of successes (0 ≤ k ≤ n)
p = probability of success per trial
1 − p = probability of failure (q)
C(n,k) = n! / (k!(n−k)!)
The formula has three multiplicative parts. The binomial coefficient C(n, k) counts the number of ways to arrange k successes among n trials — the "how many orderings" factor. The term pᵏ gives the probability of getting exactly k successes in k specific trials. The term (1−p)ⁿ⁻ᵏ gives the probability of failing on the remaining n − k trials. Multiplied together, they give the probability that exactly k out of n trials result in success, regardless of order.
Expected Value, Variance, and Standard Deviation
These formulas derive from the fact that a binomial random variable X is the sum of n independent Bernoulli random variables, each with mean p and variance p(1−p). Summing n of them gives μ = np and σ² = np(1−p). Note that variance is maximized when p = 0.5, at which point σ² = n/4. As p approaches 0 or 1, the distribution becomes more skewed and variance decreases.
For a quick reference on how the binomial fits within the broader probability landscape, see the statistics and probability overview at Statistics Fundamentals.
Binomial Probability Calculator
Binomial Distribution Calculator
10 Real-Life Binomial Distribution Examples
Each example below confirms the four binomial conditions, identifies n and p, calculates the required probability step by step, and states the conclusion in plain language. The binomial distribution table can be used to verify all probabilities computed here.
Example 1 — Coin Toss: Probability of Exactly 6 Heads in 10 Flips
Problem: A fair coin is flipped 10 times. What is the probability of getting exactly 6 heads?
n = 10 (fixed flips). Two outcomes: heads (success) or tails (failure). p = 0.5 (constant — fair coin). Each flip is independent of every other flip.
Identify parameters: n = 10, p = 0.5, k = 6
Compute the binomial coefficient: C(10, 6) = 10! / (6! × 4!) = (10 × 9 × 8 × 7) / (4 × 3 × 2 × 1) = 5040 / 24 = 210
Compute pᵏ: 0.5⁶ = 0.015625
Compute (1−p)ⁿ⁻ᵏ: 0.5⁴ = 0.0625
Multiply: P(X = 6) = 210 × 0.015625 × 0.0625 = 210 × 0.0009766 = 0.2051
✅ Conclusion: There is approximately a 20.5% chance of getting exactly 6 heads in 10 flips of a fair coin. Mean = 10 × 0.5 = 5 heads; Standard deviation = √(10 × 0.5 × 0.5) = 1.58 heads.
Example 2 — Manufacturing Quality Control: Defective Products
Problem: A factory produces light bulbs with a 3% defect rate. An inspector randomly samples 20 bulbs. What is the probability that at most 1 bulb is defective?
n = 20 (fixed sample). Two outcomes: defective (success) or acceptable (failure). p = 0.03 (constant defect rate). Bulbs are drawn from a large production run — approximately independent.
Parameters: n = 20, p = 0.03, q = 0.97. We need P(X ≤ 1) = P(X = 0) + P(X = 1)
P(X = 0): C(20,0) × 0.03⁰ × 0.97²⁰ = 1 × 1 × 0.97²⁰ = 0.5438
P(X = 1): C(20,1) × 0.03¹ × 0.97¹⁹ = 20 × 0.03 × 0.5606 = 0.3364
P(X ≤ 1): 0.5438 + 0.3364 = 0.8802
✅ Conclusion: There is about an 88.0% probability that at most 1 of the 20 sampled bulbs is defective. Mean defects = 20 × 0.03 = 0.6 bulbs per 20-unit sample.
Example 3 — Medical Testing: Drug Treatment Response Rate
Problem: A new drug has a 70% success rate in clinical trials. A physician administers it to 12 patients. What is the probability that exactly 10 patients respond positively?
Parameters: n = 12, p = 0.70, k = 10
Binomial coefficient: C(12, 10) = C(12, 2) = (12 × 11) / (2 × 1) = 66
P(X = 10): 66 × 0.70¹⁰ × 0.30² = 66 × 0.02825 × 0.09 = 66 × 0.002543 = 0.1678
✅ Conclusion: There is a 16.8% probability that exactly 10 of the 12 patients respond to the drug. The expected number of responders is 12 × 0.70 = 8.4 patients.
Example 4 — Multiple-Choice Exam: Guessing on a Test
Problem: A student randomly guesses on a 20-question multiple-choice test where each question has 4 options (only one correct). What is the probability of passing (scoring at least 50%, i.e., ≥ 10 correct)?
Parameters: n = 20, p = 0.25 (probability of guessing correctly = 1/4). Need P(X ≥ 10).
Use complement: P(X ≥ 10) = 1 − P(X ≤ 9). Compute the cumulative sum P(X = 0) + P(X = 1) + … + P(X = 9).
Result: Summing the individual probabilities gives P(X ≤ 9) ≈ 0.9861, so P(X ≥ 10) = 1 − 0.9861 = 0.0139
✅ Conclusion: A student purely guessing has only about a 1.4% chance of scoring 50% or higher. The expected score when guessing is 20 × 0.25 = 5 questions correct — well below passing.
Example 5 — Email Marketing: Click-Through Rate
Problem: An email campaign has a 15% click-through rate (CTR). A marketer sends the email to 8 subscribers. What is the probability that exactly 2 subscribers click the link?
Parameters: n = 8, p = 0.15, q = 0.85, k = 2
Binomial coefficient: C(8, 2) = (8 × 7) / (2 × 1) = 28
P(X = 2): 28 × 0.15² × 0.85⁶ = 28 × 0.0225 × 0.3771 = 28 × 0.008485 = 0.2376
✅ Conclusion: There is approximately a 23.8% chance that exactly 2 of the 8 recipients click the link. Expected clicks = 8 × 0.15 = 1.2 clicks per batch of 8.
Example 6 — Sports Analytics: Basketball Free Throws
Problem: A basketball player shoots free throws at 80% accuracy. She takes 5 free throws in a game. What is the probability she makes at least 4?
Parameters: n = 5, p = 0.80. Need P(X ≥ 4) = P(X = 4) + P(X = 5).
P(X = 4): C(5,4) × 0.80⁴ × 0.20¹ = 5 × 0.4096 × 0.20 = 0.4096
P(X = 5): C(5,5) × 0.80⁵ × 0.20⁰ = 1 × 0.3277 × 1 = 0.3277
P(X ≥ 4): 0.4096 + 0.3277 = 0.7373
✅ Conclusion: There is approximately a 73.7% chance she makes at least 4 of 5 free throws. Expected makes = 5 × 0.80 = 4 shots.
Example 7 — Election Polling: Voter Survey
Problem: Polls indicate that 55% of voters in a district support Candidate A. If 15 voters are selected at random, what is the probability that exactly 9 support Candidate A?
Parameters: n = 15, p = 0.55, k = 9
Binomial coefficient: C(15, 9) = 15! / (9! × 6!) = 5005
P(X = 9): 5005 × 0.55⁹ × 0.45⁶ = 5005 × 0.002768 × 0.008304 = 5005 × 0.0000230 = 0.1048
✅ Conclusion: About a 10.5% probability that exactly 9 of 15 sampled voters support Candidate A. Expected supporters = 15 × 0.55 = 8.25 voters.
Example 8 — Birth Probability: Gender in a Family
Problem: Assuming the probability of a baby being a boy is approximately 0.51, what is the probability that a family with 4 children has exactly 3 boys?
Parameters: n = 4, p = 0.51, k = 3
Binomial coefficient: C(4, 3) = 4
P(X = 3): 4 × 0.51³ × 0.49¹ = 4 × 0.13265 × 0.49 = 4 × 0.06500 = 0.2600
✅ Conclusion: There is about a 26.0% probability that exactly 3 of 4 children are boys. Expected boys = 4 × 0.51 = 2.04.
Example 9 — Insurance: Policy Claims
Problem: Historical data shows that 8% of policyholders file a claim in a given year. An agent has 25 clients. What is the probability that 0 clients file a claim?
Parameters: n = 25, p = 0.08, k = 0
P(X = 0): C(25,0) × 0.08⁰ × 0.92²⁵ = 1 × 1 × 0.92²⁵
Compute 0.92²⁵: 0.92²⁵ = e^(25 × ln(0.92)) = e^(25 × −0.08338) = e^(−2.0845) = 0.1244
✅ Conclusion: There is approximately a 12.4% chance that none of the 25 clients files a claim. Expected claims = 25 × 0.08 = 2 claims per year.
Example 10 — Software Testing: Bug Detection
Problem: A software tester finds bugs in 30% of the code modules she reviews. If she reviews 6 modules today, what is the probability she finds bugs in at least 2?
Parameters: n = 6, p = 0.30. Need P(X ≥ 2) = 1 − P(X ≤ 1).
P(X = 0): 0.70⁶ = 0.1176
P(X = 1): C(6,1) × 0.30¹ × 0.70⁵ = 6 × 0.30 × 0.1681 = 0.3025
P(X ≥ 2): 1 − (0.1176 + 0.3025) = 1 − 0.4201 = 0.5799
✅ Conclusion: There is about a 58.0% probability that the tester finds bugs in at least 2 of the 6 modules. Expected buggy modules = 6 × 0.30 = 1.8.
Real-Life Applications of the Binomial Distribution
The binomial distribution appears across virtually every field that involves counting discrete binary outcomes. Below are the most common domains.
Manufacturing & Quality Control
Modeling defect rates, acceptance sampling, and production-line inspection. Used in Six Sigma and SPC to set control limits.
Medicine & Clinical Trials
Calculating probabilities for treatment response, diagnostic test accuracy, and Phase II trial design using binary endpoints.
Marketing & A/B Testing
Modeling email click-through rates, conversion rates, and ad response to compare two variants of a campaign.
Political Polling
Estimating vote shares and margins of error in electoral surveys where each respondent either supports a candidate or does not.
Sports Analytics
Modeling shot success rates, penalty kick outcomes, and game-day performance predictions from player career statistics.
Software Engineering
Estimating bug rates per code review, modeling pass/fail testing outcomes, and reliability engineering for hardware and software systems.
Telecommunications
Modeling packet transmission errors, signal reception success/failure, and call center blocking probabilities.
Genetics & Biology
Computing inheritance probabilities for dominant/recessive traits in Mendelian genetics across offspring counts.
Binomial vs. Related Distributions
Binomial vs. Bernoulli Distribution
A Bernoulli distribution is simply the binomial distribution with n = 1: a single trial with probability p of success. The binomial distribution is the sum of n independent Bernoulli random variables. Every binomial experiment is built from Bernoulli trials, so Bernoulli is the building block and binomial is the result of repeating it.
| Feature | Binomial B(n, p) | Poisson(λ) | Normal N(μ, σ²) |
|---|---|---|---|
| Data type | Discrete | Discrete | Continuous |
| Number of trials | Fixed n | No fixed n | Continuous range |
| Probability of success | Constant p | Rare events | Not applicable |
| Mean | np | λ | μ |
| Variance | np(1−p) | λ | σ² |
| When to use | Fixed n, binary outcomes | Counts of rare events | Large n, CLT applies |
| Example | Defective bulbs in 50 sampled | Calls per hour at a help desk | Heights of 1000 students |
Use the Poisson approximation when n is large (n ≥ 20) and p is very small (p ≤ 0.05), with λ = np. Use the Normal approximation when both np ≥ 5 and n(1−p) ≥ 5 — a rule of thumb from the Central Limit Theorem. Apply a continuity correction of ±0.5 when using the Normal to approximate the Binomial.
Decision Guide: Is Binomial the Right Model?
When to Use (and Not Use) the Binomial Distribution
Common Mistakes When Using the Binomial Distribution
| Mistake | Incorrect Approach | Correct Approach |
|---|---|---|
| Forgetting the binomial coefficient | P(X = 3) = p³(1−p)⁷ | P(X = 3) = C(n,3) × p³ × (1−p)⁷ |
| Applying binomial without replacement from a small population | Using B(n, p) when sampling 10 from a group of 15 | Use the Hypergeometric distribution |
| Treating "at least k" as "exactly k" | P(X ≥ 3) = P(X = 3) | P(X ≥ 3) = 1 − P(X ≤ 2) = 1 − [P(0)+P(1)+P(2)] |
| Confusing p with q | Using p = 0.03 as failure probability | Define p clearly as success; q = 1 − p is failure |
| Normal approximation when np < 5 | Using normal CDF when n = 10, p = 0.02 (np = 0.2) | Use the exact binomial PMF or Poisson approximation |
Entity and Formula Glossary
| Term / Symbol | Definition | Formula / Value |
|---|---|---|
| Binomial Distribution | Discrete distribution of number of successes in n independent Bernoulli trials | X ~ B(n, p) |
| Bernoulli Trial | A single experiment with exactly two outcomes: success or failure | n = 1 special case |
| PMF | Probability Mass Function — gives probability of each exact outcome | P(X = k) = C(n,k)·pᵏ·(1−p)ⁿ⁻ᵏ |
| n | Number of trials (fixed integer) | n ≥ 1 |
| p | Probability of success per trial | 0 < p < 1 |
| q | Probability of failure per trial | q = 1 − p |
| k | Number of successes (the outcome we're computing probability for) | k ∈ {0, 1, …, n} |
| C(n, k) | Binomial coefficient — number of ways to choose k successes from n trials | n! / (k!(n−k)!) |
| Expected Value (μ) | Long-run average number of successes | μ = np |
| Variance (σ²) | Measure of spread around the mean | σ² = np(1−p) |
| Standard Deviation (σ) | Square root of variance | σ = √(np(1−p)) |
| Jacob Bernoulli | Swiss mathematician who formalized the binomial model in Ars Conjectandi (1713) | — |
| Abraham de Moivre | Mathematician who showed the normal approximation to the binomial (c. 1733) | — |
| Probability Histogram | Bar chart where each bar height equals P(X = k) for k = 0, 1, …, n | Area = 1 |
Frequently Asked Questions
scipy.special.comb().