Binomial Distribution
calculator.
Binomial probability gives the chance of a set number of successes in a fixed run of trials.
- P(X = 4)
- 0.070003
- P(X ≤ 4)
- 0.971806
- P(X ≥ 4)
- 0.098197
You should expect about 1.8 successes, give or take 1.27. Getting at least 4 is off to one side of the average.
The chance of each count
Bars show the chance of each count. The bars counted in P(X ≥ 4) are in the main colour and add up to 0.098197.
Probability table
| k | P(X = k) | P(X ≤ k) |
|---|---|---|
| 0 | 0.150095 | 0.150095 |
| 1 | 0.300189 | 0.450284 |
| 2 | 0.283512 | 0.733796 |
| 3 | 0.168007 | 0.901803 |
| 4 | 0.070003 | 0.971806 |
| 5 | 0.021779 | 0.993585 |
| 6 | 0.005243 | 0.998828 |
| 7 | 0.000999 | 0.999827 |
| 8 | 0.000153 | 0.999979 |
| 9 | 0.000019 | 0.999998 |
| 10 | 1.884 × 10⁻⁶ | 1 |
| 11 | 1.522 × 10⁻⁷ | 1 |
Exact against the normal curve
- Exact
- 0.098197
- Normal curve, continuity corrected
- 0.090832
- Gap
- 0.007364
If p is a little off
| p | P(X ≥ 4) |
|---|---|
| 0.08 | 0.050592 |
| 0.09 | 0.072263 |
| 0.1 | 0.098197 |
| 0.11 | 0.128164 |
| 0.12 | 0.161802 |
Each row multiplies p by 0.8, 0.9, 1, 1.1 or 1.2. A tail chance can move far more than p does.
How many trials would you need?
- Fewest trials for at least 4 successes
- 76
- Your trials
- 18
Working
- 1Count the ways to choose which trials succeedC(18, 4) =18!4! × 14!= 3,060
- 2Probability of exactly kP(X = 4) = 3,060 × 0.14 × 0.914 = 0.070003
- 3Add the probabilities in your rangeP(4 ≤ X ≤ 18) = 0.098197
- 4Mean and standard deviationnp = 1.8, and the square root of np(1 − p) is 1.2728
- 5Check: your counts and the rest add to 10.098197 + 0.901803 = 1
How it's worked out
A count is binomial when each trial has exactly two outcomes and the chance of success stays fixed across n trials. The trials must also not affect each other, and n must be set in advance. Defective parts in a batch, heads in a run of flips and free throws made all fit this.
Here n is the number of trials, k the number of successes and p the chance of success on one trial. The first part counts the ways to choose which k trials succeed. A question such as "at most 3" adds these terms, and the tool sums whichever side is shorter, so very small tails keep their digits. It works in logarithms of factorials, which lets it reach 100,000 trials.
The most likely count is the whole part of . When is itself a whole number there are two, that number and the one below it.
Worked examples
Testing 18 water samples for a pollutant
Each sample has a 10% chance of containing the pollutant, and 18 are tested independently. You should expect 1.8 contaminated samples. The chance of exactly 2 is 0.2835, the chance of at least 4 is 0.0982, and the chance of 3 to 6 is 0.265.
Tails react strongly to p. If the true rate were 8% in place of 10%, the chance of at least 4 falls to 0.0506. At 12% it rises to 0.1618. So a rate you only roughly know gives a rough tail.
The Chevalier de Méré's two dice bets
The story goes that de Méré did well betting on at least one six in four rolls of a die, then lost on at least one double six in 24 rolls of two dice. The first chance is 0.5177, which is above even. The second is 0.4914, which is just below it.
He took the problem to Pascal, who worked on it with Fermat. The second bet needs 25 rolls to pass even odds, and the tool's trials finder gives that directly. You can type a chance as a fraction, a decimal or a percentage.
At most 2 defects in a batch of 100
A process makes 2% defects, and a batch has 100 parts. The chance of at most 2 defects is 0.6767. The normal curve gives 0.6024, so the shortcut is off by a visible amount, because np is only 2.
Compare 100 fair coin flips, where np is 50. The exact chance of 45 to 55 heads is 0.7287, and the normal curve gives 0.7287, the same to four places. Rare events are where the exact sum earns its keep.
Reading your result
Match the words to the inequality. "At least 3" means 3 or more, "more than 3" means 4 or more, "at most 3" means 3 or fewer and "fewer than 3" means 2 or fewer. On a count these are different numbers, so pick the matching option and do not adjust k by hand. As a check, the chance of at least k is 1 minus the chance of at most k − 1.
Use the mean and standard deviation for a quick sense of scale. For 100 fair flips they are 50 and 5, so 45 to 55 heads is within about one standard deviation either way.
Trust the normal shortcut only when it fits. A common rule of thumb asks for both np and n(1 − p) to be at least 5, and closer to 10 is better. It needs a continuity correction of 0.5 at the edges. Outside that range, or far into a tail, use the exact value.
Spot when the model does not apply. Sampling without replacement changes p from draw to draw. A common rule is that the binomial is close enough when the sample is at most 5% of the population. Beyond that, use the hypergeometric distribution. Counts with no fixed number of trials, such as calls per hour, suit the Poisson distribution. NIST notes that Poisson also approximates the binomial well when n is at least 100 and np is at most 10.
| Heads | P(X = k) | P(X ≤ k) |
|---|---|---|
| 0 | 0.000977 | 0.000977 |
| 1 | 0.009766 | 0.010742 |
| 2 | 0.043945 | 0.054688 |
| 3 | 0.117188 | 0.171875 |
| 4 | 0.205078 | 0.376953 |
| 5 | 0.246094 | 0.623047 |
| 6 | 0.205078 | 0.828125 |
| 7 | 0.117188 | 0.945313 |
| 8 | 0.043945 | 0.989258 |
| 9 | 0.009766 | 0.999023 |
| 10 | 0.000977 | 1 |
Common mistakes
- Multiplying instead of using the complement. The chance of at least one success is not n times p. Four rolls at one in six would then give two thirds, when the real figure is 0.52.
- Mixing up "at least" and "more than". They differ by one whole count, and that count can hold much of the probability.
- Using it when trials influence each other. Parts from one bad machine fail together. Real counts then spread wider than the formula predicts.
- Using a p from a small sample as if it were exact. Any error in p carries through, and it grows in the tails.
Questions people ask
Sources
- NIST/SEMATECH e-Handbook, section 1.3.6.6.18, Binomial Distribution
- NIST/SEMATECH e-Handbook, section 6.3.3.1, Counts control charts
- Microsoft Support, BINOM.DIST function
- LibreTexts Statistics, Normal Approximation to the Binomial Distribution
- Freie Universität Berlin, SOGA, Binomial Approximation to the Hypergeometric Distribution
- Cut the Knot, Chevalier de Méré's Problem