Math & Geometry
Binomial Distribution Calculator: Probability of k Successes
Calculate probabilities for the number of successes in a series of independent trials. The binomial distribution describes situations with a fixed number of trials, n, where each trial has only two possible outcomes, often called success and failure, the probability of success p is the same every time, and the trials do not affect one another. Typical examples are the number of heads in ten coin flips, the number of defective items in a sample from a production line, the number of patients responding to a treatment or the number of free throws a player makes. The probability of exactly k successes combines the number of ways to choose which trials succeed, the binomial coefficient, with the chance of each such arrangement. Adding these probabilities gives cumulative results such as at most or at least k successes, which answer questions like the chance of getting three or more defects in a batch. Enter n, p and k to get all of these probabilities, together with the mean and standard deviation of the distribution and a table of probabilities around the mean. For ten fair coin flips, the chance of exactly five heads is about 24.6%, and of five or fewer about 62.3%.
How to use this calculator
- Enter the number of trials n.
- Enter the probability of success on each trial, as a decimal.
- Enter the number of successes k.
- Read the probabilities of exactly, at most and at least k successes.
- Check the mean, standard deviation and table.
Conditions to check
The binomial model needs independent trials with a constant success probability. Drawing cards without replacement, for example, changes the probability after each draw, so the hypergeometric distribution is more accurate there.
If you sample less than about 10% of a large population, the binomial is usually a good approximation even without replacement.
Uses in quality control and research
Manufacturers use binomial probabilities to design acceptance sampling plans, deciding how many defects in a sample should trigger rejection of a batch.
In research, the binomial test checks whether an observed proportion of successes differs significantly from an expected one.
Formula & method
P(X = k) = C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏC(n, k) = n! ÷ (k! (n − k)!)P(X ≤ k) = sum of P(X = i) for i = 0 to k; P(X ≥ k) = 1 − P(X ≤ k − 1)Mean = np; standard deviation = √(np(1 − p))P(X = k) = C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏ, where C(n, k) = n! ÷ (k!(n − k)!) is the number of ways to choose k successes from n trials. Cumulative: P(X ≤ k) = Σ P(X = i) for i = 0 to k; P(X ≥ k) = 1 − P(X ≤ k − 1); P(X < k) = P(X ≤ k) − P(X = k); P(X > k) = 1 − P(X ≤ k). Mean = np; variance = np(1 − p); standard deviation = √(np(1 − p)). The calculator works with logarithms of factorials so that it stays accurate for large n. For large n, the binomial is close to a normal distribution with the same mean and standard deviation.
Worked example
Exactly 5 heads in 10 fair coin flips
- C(10, 5) = 252 arrangements.
- Each has probability 0.5⁵ × 0.5⁵ = 1 ÷ 1,024.
- P(X = 5) = 252 ÷ 1,024 ≈ 0.2461; P(X ≤ 5) ≈ 0.6230.
Answer: About 24.6% for exactly 5 heads; mean 5, standard deviation 1.58.
Frequently asked questions
What is the binomial distribution?
The distribution of the number of successes in n independent trials with the same probability.
How do I calculate P(X = k)?
C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏ.
What is the mean of a binomial distribution?
n × p.
What is the standard deviation?
√(np(1 − p)).
What does at least k mean?
k or more successes, P(X ≥ k).
When can I use a normal approximation?
When np and n(1 − p) are both reasonably large, often above 5 or 10.