The binomial distribution describes the number of successes in a fixed number of independent trials that each succeed with the same probability : heads in ten coin tosses, correct guesses on a multiple-choice quiz, defective parts in a sample of 50, patients who respond to a treatment. Write it .
This calculator gives the whole distribution, not just one number. Enter and , then either a single number of successes or an interval from to . You get the exact probabilities , , , and — the values a calculator's binompdf and binomcdf functions return — or , together with the mean, variance, standard deviation, mode and skewness. A bar chart and a table list the probability of every value of around the mean with its cumulative probabilities, so you can read off any tail without a printed table.
When the distribution is wide enough ( and ), the calculator also shows the normal approximation with continuity correction, so you can check a textbook answer worked by hand. The exact values never rely on that approximation: they are computed in log space and with the regularized incomplete beta function, which stays accurate up to a million trials.
For questions about two events, conditional probability or "at least one success", the probability calculator is the better starting point; this page is for studying the binomial law itself.
How to use this calculator
- Enter the number of trials (a whole number).
- Enter the probability of success on each trial as a decimal (0.25 for one chance in four).
- Choose k successes to get exact and cumulative probabilities around a single value, or Between a and b for an interval; both bounds are included.
- Read the headline probability, the other tails, the mean and standard deviation, then scroll the chart and table to see how the probability spreads over all values of .
Check the binomial conditions before you trust the answer: a fixed number of trials, only two outcomes per trial, the same every time and independent trials. Drawing without replacement from a small population breaks independence — the hypergeometric distribution applies there.
The formula
For and (NIST e-Handbook §1.3.6.6.18):
is the regularized incomplete beta function (DLMF 8.17.5); it gives the cumulative sum directly, without adding thousands of terms. When is a whole number, the distribution has two modes, and .
Normal approximation with continuity correction, used when and :
Worked example
Ten coin tosses. , , : 0.24609375. Exactly five heads happens in fewer than one try in four. The probability of at most five heads is 0.623.
Guessing on a quiz. Ten questions with four choices each, answered at random: , . The chance of exactly 3 correct answers is 0.2503 (25 %), and the chance of passing with at least 6 correct is only 0.0197 (1.97 %). The mean is correct answers with a standard deviation of 1.369.
Normal approximation. , , so and 3.24. Both and exceed 10. The exact probability of 10 to 20 successes is 0.912; the approximation gives 0.9104 — close, but the exact value is the one to report.
Reading the shape of the distribution
With the binomial distribution is perfectly symmetric around . When is small the bars pile up near zero and the distribution has a long right tail (positive skewness); when is close to 1 it leans the other way. As grows, the shape becomes more and more bell-like, which is why the normal approximation works for large samples.
The standard deviation is largest at . About 95 % of the probability lies within two standard deviations of the mean once the distribution looks roughly normal — compare with the empirical rule.
Exactly, at most, at least: choosing the right tail
Word problems translate into one of five probabilities:
| Phrase | Probability |
|---|---|
| exactly | |
| at most , no more than | |
| fewer than | |
| at least , or more | |
| more than |
Because only takes whole values, "fewer than 5" and "at most 4" are the same event. Most mistakes on exams come from that off-by-one step.
Frequently asked questions
What is the difference between binompdf and binomcdf?
binompdf gives the probability of exactly k successes, P(X = k). binomcdf gives the cumulative probability of at most k successes, P(X ≤ k). This calculator shows both at once, plus the strict and upper tails.
When can I use the normal approximation?
A common rule is np ≥ 10 and n(1 − p) ≥ 10; some textbooks accept 5. Always add or subtract 0.5 (continuity correction), because a discrete count is being replaced by a continuous curve. With a computer, the exact binomial value is always preferable.
How do I find the expected value of a binomial distribution?
Multiply the number of trials by the probability of success: E(X) = np. With 50 trials and p = 0.3 you expect 15 successes on average. The variance is np(1 − p) and the standard deviation its square root.
Why can the distribution have two modes?
When (n + 1)p is a whole number, the values (n + 1)p − 1 and (n + 1)p have exactly the same probability. For example, with n = 9 and p = 0.5, both 4 and 5 successes have probability 126/512.
Can I use this when sampling without replacement?
Only if the sample is small compared with the population (under about 5 % of it). Otherwise the probability of success changes from draw to draw and the hypergeometric distribution is the correct model.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.6.6.18 Binomial distribution
- OpenStax, Introductory Statistics 2e, §4.3 Binomial distribution
- NIST Digital Library of Mathematical Functions, §8.17 Incomplete beta functions
- Penn State STAT 414, Lesson 28: Approximations for discrete distributions (normal approximation to the binomial)
Last updated: