Binomial Distribution Calculator
Calculate binomial probabilities for exact, cumulative, or range values. Find P(X = k), P(X ≤ k), or P(a ≤ X ≤ b) for binomial experiments with n trials and success probability p. See also our Probability Calculator and Normal Distribution Calculator.
How to Use the Binomial Distribution Calculator
The binomial distribution models the number of successes in a fixed number of independent trials, where each trial has the same probability of success. Classic examples include coin flips (n flips, p = 0.5), quality control (n items inspected, p = defect rate), medical trials (n patients, p = treatment success rate), and survey responses (n respondents, p = proportion answering yes).
To use this calculator, enter the number of trials (n), the probability of success on each trial (p), and the number of successes (k) you want to evaluate. The calculator computes exact probabilities using the binomial probability mass function, cumulative probabilities, and range probabilities. It also shows the distribution mean, variance, and standard deviation.
The binomial distribution requires four conditions: (1) fixed number of trials n, (2) each trial is independent, (3) each trial has exactly two outcomes (success/failure), and (4) the probability p is constant across trials. When these conditions are met, the distribution gives exact probabilities. For large n, the binomial can be approximated by the normal distribution (when np ≥ 5 and n(1-p) ≥ 5) or the Poisson distribution (when n is large and p is small).
Binomial Distribution Formula
Probability Mass Function:
P(X = k) = C(n,k) × p^k × (1-p)^(n-k)
Combination Formula:
C(n,k) = n! / (k! × (n-k)!)
Mean and Variance:
μ = np
σ² = np(1-p)
σ = √(np(1-p))
Cumulative Probability:
P(X ≤ k) = Σᵢ₌₀ᵏ C(n,i) × pⁱ × (1-p)^(n-i)
Normal Approximation (large n):
Z ≈ (k - np) / √(np(1-p))
Example Calculation
A fair coin is flipped 10 times. What is the probability of getting exactly 7 heads?
Given: n = 10, p = 0.5, k = 7
C(10,7) = 10!/(7!×3!) = 120
P(X=7) = 120 × 0.5⁷ × 0.5³
= 120 × 0.0078125 × 0.125 = 0.1172
There is an 11.72% chance of getting exactly 7 heads
Mean: μ = 10 × 0.5 = 5 heads expected
Std Dev: σ = √(10×0.5×0.5) = √2.5 = 1.58
Binomial Probability Reference Table
| n | p | k | P(X = k) |
|---|---|---|---|
| 10 | 0.5 | 5 | 0.2461 |
| 10 | 0.5 | 3 | 0.1172 |
| 20 | 0.3 | 6 | 0.1916 |
| 20 | 0.5 | 10 | 0.1762 |
| 50 | 0.1 | 5 | 0.1849 |
| 100 | 0.05 | 5 | 0.1800 |
| 10 | 0.9 | 9 | 0.3874 |
| 5 | 0.5 | 3 | 0.3125 |
When to Use the Binomial Distribution
Use when all four conditions hold:
- Fixed number of trials (n) is known in advance
- Each trial has exactly two outcomes: success or failure
- Probability of success (p) remains constant across all trials
- Trials are independent (the outcome of one does not affect another)
Do NOT use when:
- Trials are not independent (sampling without replacement from a small population - use hypergeometric)
- You are counting events in time/space with no fixed n (use Poisson instead)
- Success probability changes between trials
- There are more than two outcomes per trial (use multinomial distribution)
Additional Solved Examples
Example: Quality Inspection
A factory has a 4% defect rate. In a random sample of 20 items, what is the probability of finding exactly 2 defective items?
n = 20, k = 2, p = 0.04, q = 0.96
P(X=2) = C(20,2) x (0.04)^2 x (0.96)^18
C(20,2) = 190
P(X=2) = 190 x 0.0016 x 0.4796 = 0.1458
Answer: The probability of finding exactly 2 defective items is approximately 14.58%. The expected number of defectives is np = 20(0.04) = 0.8, so finding 2 is somewhat unlikely but not rare.
Example: Clinical Trial Success
A medication has a 70% success rate. If 10 patients are treated, what is the probability that at least 8 respond successfully?
n = 10, p = 0.70
P(X ≥ 8) = P(X=8) + P(X=9) + P(X=10)
P(X=8) = C(10,8)(0.7)^8(0.3)^2 = 45 x 0.0576 x 0.09 = 0.2335
P(X=9) = C(10,9)(0.7)^9(0.3)^1 = 10 x 0.0404 x 0.3 = 0.1211
P(X=10) = C(10,10)(0.7)^10 = 0.0282
P(X ≥ 8) = 0.2335 + 0.1211 + 0.0282 = 0.3828
Answer: There is approximately a 38.28% chance that at least 8 out of 10 patients will respond. The expected number of successes is np = 7.
Practice Questions
Question 1
A fair coin is flipped 8 times. What is the probability of getting exactly 5 heads?
Answer: P(X=5) = C(8,5)(0.5)^5(0.5)^3 = 56 x (0.5)^8 = 56/256 = 0.2188 or about 21.88%.
Question 2
A multiple-choice exam has 15 questions with 4 choices each. If a student guesses randomly, what is the probability of passing (getting at least 10 correct)?
Answer: n=15, p=0.25. P(X ≥ 10) is extremely small. Using binomial calculation: P(X ≥ 10) = 0.000024 (approximately 0.0024%). Random guessing almost never produces a passing score.
Question 3
An airline knows 5% of passengers are no-shows. For a 200-seat flight, they sell 210 tickets. What is the probability of overbooking (more than 200 showing up)?
Answer: Each passenger shows up with p = 0.95. We need P(X > 200) where X ~ Binomial(210, 0.95). Expected shows = 210(0.95) = 199.5, SD = sqrt(210 x 0.95 x 0.05) = 3.16. Using normal approximation: Z = (200.5-199.5)/3.16 = 0.316. P(X > 200) = P(Z > 0.316) = 0.376. About 37.6% chance of overbooking.
Key Takeaways
- The binomial distribution models the number of successes in n independent trials, each with probability p.
- Mean = np, Variance = np(1-p), Standard Deviation = sqrt(np(1-p)).
- For large n, the binomial can be approximated by the normal distribution when np ≥ 5 and n(1-p) ≥ 5.
- The binomial coefficient C(n,k) counts the ways to choose k successes from n trials.
- Real-world applications include quality control, clinical trials, survey sampling, and reliability testing.
Frequently Asked Questions
What is the binomial distribution?
The binomial distribution is a discrete probability distribution that models the number of successes in n independent Bernoulli trials, each with success probability p. It answers questions like "what is the probability of getting exactly k successes in n trials?" The distribution is completely determined by two parameters: n (number of trials) and p (probability of success). It is one of the most widely used distributions in statistics, quality control, and experimental design.
When can I approximate binomial with normal?
The normal approximation to the binomial is valid when both np ≥ 5 and n(1-p) ≥ 5 (some texts use 10). Under these conditions, X ~ Binomial(n,p) ≈ Normal(np, np(1-p)). Apply the continuity correction: P(X ≤ k) ≈ Φ((k + 0.5 - np)/√(np(1-p))). For example, with n=100 and p=0.5, the normal approximation is excellent. With n=10 and p=0.1, it is poor because np = 1 < 5.
What is the difference between binomial and Poisson?
The binomial has a fixed number of trials n with probability p; the Poisson models the count of events in a fixed interval with rate λ. When n is large and p is small (np = λ stays moderate), the Poisson approximates the binomial: Binomial(n,p) ≈ Poisson(np). Use binomial when you know n and p; use Poisson when you know only the average rate. For example, defects per batch (known n) → binomial; calls per hour (unknown n) → Poisson.
How do I calculate cumulative binomial probability?
Cumulative probability P(X ≤ k) is the sum of all individual probabilities from 0 to k: P(X ≤ k) = Σ P(X=i) for i = 0, 1, ..., k. For P(X ≥ k), use the complement: P(X ≥ k) = 1 - P(X ≤ k-1). For a range: P(a ≤ X ≤ b) = P(X ≤ b) - P(X ≤ a-1). This calculator handles all these cases automatically.
What are the assumptions of the binomial distribution?
Four conditions must hold: (1) Fixed number of trials n — you know in advance how many trials will occur; (2) Independence — the outcome of one trial does not affect others; (3) Binary outcomes — each trial results in success or failure only; (4) Constant probability — p is the same for every trial. If trials are not independent (e.g., sampling without replacement), use the hypergeometric distribution instead.
What is the expected value of a binomial distribution?
The expected value (mean) is E(X) = np. This is the average number of successes you would expect over many repetitions of the experiment. For example, flipping a fair coin 100 times, you expect 50 heads on average. The variance is Var(X) = np(1-p), and the standard deviation is σ = √(np(1-p)). The distribution is symmetric when p = 0.5 and becomes more skewed as p approaches 0 or 1.