Binomial Distribution Calculator
Compute P(X=k), P(X≤k), P(X≥k), mean, variance and full distribution table
Step-by-step solution
What is the Binomial Distribution?
The binomial distribution is a discrete probability distribution that models the number of successes X in n independent trials, where each trial has the same probability of success p. It answers questions like: "If I flip a coin 10 times, what is the probability of getting exactly 5 heads?" or "If a factory produces parts with a 5% defect rate, what is the probability that exactly 2 of 20 parts are defective?"
Four conditions must hold for the binomial model to apply:
- A fixed number n of trials is performed.
- Each trial is independent — the outcome of one trial does not affect any other.
- Each trial has the same probability p of success.
- Each trial has only two outcomes: success (probability p) or failure (probability 1 − p).
Binomial Probability Formula
The probability mass function (PMF) of the binomial distribution is:
Each term has a clear meaning:
- C(n,k) = n! / (k!(n−k)!) — the binomial coefficient, counting the number of ways to choose k successes from n trials.
- p^k — the probability that exactly k specific trials are successes.
- (1−p)^(n−k) — the probability that the remaining n−k trials are failures.
Mean, Variance, and Standard Deviation
| Measure | Formula | Meaning |
|---|---|---|
| Mean (μ) | n × p | Expected number of successes |
| Variance (σ²) | n × p × (1−p) | Spread of the distribution |
| Std Dev (σ) | √(n × p × (1−p)) | Typical deviation from the mean |
Worked Examples
Example 1 — Coin Flip: P(exactly 5 heads in 10 flips)
A fair coin is flipped 10 times. What is the probability of getting exactly 5 heads?
There is approximately a 24.6% chance of getting exactly 5 heads in 10 coin flips.
Example 2 — Quality Control: Defective Parts
A factory produces components where 5% are defective. A batch of 20 parts is inspected. What is the probability that exactly 2 are defective?
There is about an 18.9% chance of finding exactly 2 defective parts in 20.
Example 3 — Free Throws: Basketball Shots
A basketball player makes 80% of free throws. If they attempt 15 shots, what is the probability of making at least 12?
There is approximately a 64.8% chance that the player makes 12 or more of 15 free throws.
Cumulative vs Exact Probability
The exact (point) probability P(X=k) — also called the PMF — gives the probability of observing exactly k successes. The cumulative distribution function (CDF) P(X≤k) is the sum of all PMF values from 0 up to k:
The complementary CDF is P(X≥k) = 1 − P(X≤k−1). Strict inequalities: P(X<k) = P(X≤k−1) and P(X>k) = 1 − P(X≤k).
Applications of Binomial Distribution
- Quality control testing: Estimating the number of defective items in a production batch.
- Medical clinical trials: Modelling the number of patients who respond to a treatment.
- Election and poll predictions: Estimating vote counts from sample surveys with binary outcomes.
- Games of chance: Calculating probabilities in dice games, card draws, and coin flips.
- Insurance risk assessment: Estimating the number of claims from a group of policyholders.
- Network reliability: Computing the probability that k out of n servers remain operational.