Binomial Distribution Calculator
Calculate binomial distribution probabilities with inputs for trials, probability, and successes.
Binomial Distribution Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: P(X = k) = C(n,k) x p^k x (1-p)^(n-k)
Worked example โ P(X=2) = 18.87% | P(X<=2) = 92.45% | Mean = 1.0 defect
Formula
P(X = k) = C(n,k) x p^k x (1-p)^(n-k)
The binomial probability formula calculates the chance of getting exactly k successes in n independent trials, each with success probability p. C(n,k) is the binomial coefficient (number of ways to choose k items from n), p^k is the probability of k successes, and (1-p)^(n-k) is the probability of the remaining failures.
Worked Examples
Example 1: Quality Control Inspection
Problem:A factory has a 5% defect rate. In a random sample of 20 items, what is the probability of finding exactly 2 defective items?
Solution:n = 20 trials, p = 0.05, k = 2 P(X = 2) = C(20,2) x 0.05^2 x 0.95^18 C(20,2) = 20! / (2! x 18!) = 190 P(X = 2) = 190 x 0.0025 x 0.3972 = 0.1887 Mean: 20 x 0.05 = 1.0 defects expected Std Dev: sqrt(20 x 0.05 x 0.95) = 0.9747 P(X <= 2): 0.9245 (92.45% chance of 2 or fewer defects)
Result:P(X=2) = 18.87% | P(X<=2) = 92.45% | Mean = 1.0 defect
Example 2: Medical Trial Success Rate
Problem:A drug has a 70% effectiveness rate. In a trial of 15 patients, what is the probability that at least 12 respond positively?
Solution:n = 15, p = 0.70, find P(X >= 12) P(X >= 12) = P(X=12) + P(X=13) + P(X=14) + P(X=15) P(X=12) = C(15,12) x 0.70^12 x 0.30^3 = 0.1700 P(X=13) = C(15,13) x 0.70^13 x 0.30^2 = 0.0916 P(X=14) = C(15,14) x 0.70^14 x 0.30^1 = 0.0305 P(X=15) = C(15,15) x 0.70^15 x 0.30^0 = 0.0047 P(X >= 12) = 0.2968
Result:P(X>=12) = 29.68% | Mean = 10.5 patients | Std Dev = 1.77
Frequently Asked Questions
What is the binomial distribution and when is it used?
The binomial distribution is a discrete probability distribution that models the number of successes in a fixed number of independent Bernoulli trials, each with the same probability of success. It is used when an experiment has exactly two possible outcomes (success or failure), the number of trials is fixed in advance, each trial is independent, and the probability of success remains constant. Common applications include quality control (number of defective items in a batch), medical trials (number of patients responding to treatment), survey analysis (number of respondents choosing a particular option), genetics (inheritance patterns), and marketing (conversion rates). The distribution is characterized by two parameters: n (number of trials) and p (probability of success).
How do you calculate binomial probability using the formula?
The binomial probability formula is P(X = k) = C(n,k) x p^k x (1-p)^(n-k), where n is the total number of trials, k is the desired number of successes, p is the probability of success on a single trial, and C(n,k) is the binomial coefficient calculated as n! / (k!(n-k)!). The binomial coefficient counts the number of ways to choose k successes from n trials. The term p^k represents the probability of getting exactly k successes, and (1-p)^(n-k) represents the probability of getting the remaining (n-k) failures. For example, the probability of getting exactly 3 heads in 10 coin flips is C(10,3) x 0.5^3 x 0.5^7 = 120 x 0.000977 = 0.1172 or about 11.72%.
What is the difference between PMF and CDF in binomial distribution?
The PMF (Probability Mass Function) gives the probability of getting exactly k successes, written as P(X = k). The CDF (Cumulative Distribution Function) gives the probability of getting k or fewer successes, written as P(X <= k), and is calculated by summing the PMF values from 0 to k. The CDF is particularly useful for answering questions like 'what is the probability of getting at most 3 successes?' or 'what is the probability of getting at least 4 successes?' (which equals 1 minus the CDF at 3). Understanding the distinction between PMF and CDF is essential for correctly interpreting statistical results and making decisions based on probability thresholds in hypothesis testing and quality control applications.
How do mean and standard deviation relate to the binomial distribution?
For a binomial distribution with n trials and success probability p, the mean (expected value) is simply mu = n x p, representing the average number of successes you would expect. The variance is sigma-squared = n x p x (1-p), and the standard deviation is sigma = sqrt(n x p x (1-p)). These formulas reveal important properties: the mean increases linearly with n, and the variance is maximized when p = 0.5 (maximum uncertainty). The standard deviation tells you how spread out the distribution is around the mean. For large n, approximately 68% of outcomes fall within one standard deviation of the mean, and 95% within two standard deviations, following the normal approximation to the binomial distribution.
When can you approximate the binomial distribution with other distributions?
The binomial distribution can be approximated by other distributions under certain conditions, which simplifies calculations for large sample sizes. The normal approximation is valid when both np >= 5 and n(1-p) >= 5, using a normal distribution with mean np and standard deviation sqrt(np(1-p)). A continuity correction of plus or minus 0.5 improves accuracy. The Poisson approximation is appropriate when n is large (typically over 20) and p is small (typically under 0.05), using lambda = np as the Poisson parameter. This is commonly used in rare event modeling. These approximations were historically important for hand calculations but remain conceptually valuable for understanding the relationships between probability distributions and for quick mental estimates in statistical analysis.
What is a Bernoulli trial, and what breaks the independence assumption?
A Bernoulli trial is a single experiment with two outcomes and a fixed success probability p. The binomial distribution is the count of successes across n such trials, which requires p to stay constant and each trial to be unaffected by the others. Independence fails when units influence each other, such as respondents discussing a survey, or when sampling without replacement from a small population, because removing one item changes p for the next draw.
When should I use the hypergeometric distribution instead of the binomial?
Use the hypergeometric distribution when you sample without replacement from a finite population, because the success probability shifts with every item drawn. Drawing 5 cards from a 52-card deck is hypergeometric; 5 spins of a roulette wheel is binomial. A common working rule is that the binomial remains an acceptable approximation when the sample is no more than about 10 percent of the population, since the change in p across draws is then small enough to ignore.
Why is the distribution skewed when p is far from 0.5?
Counts are bounded at 0 and n, so when p is small the mass piles up near zero with a long right tail, and when p is large the mirror image occurs. Only p = 0.5 gives a symmetric shape. This is why the normal approximation needs both np and n(1-p) to be reasonably large, commonly at least 5: with n = 20 and p = 0.05 the mean is 1 and the distribution is strongly right-skewed, so a symmetric normal curve fits badly.
How do I get 'at least k successes' from the cumulative probability?
The CDF gives P(X <= k), so the complement rule converts it: P(X >= k) = 1 - P(X <= k - 1). For at least 12 successes in 15 trials, subtract the CDF at 11 from 1. Watch the off-by-one boundary โ using 1 - P(X <= k) instead gives 'more than k', which silently drops the k itself. For 'between a and b inclusive', take P(X <= b) - P(X <= a - 1).
What is the most likely number of successes, and does it equal the mean?
The mode of a binomial distribution is floor((n + 1)p), the single most probable count, while the mean is np. They usually differ because the count must be a whole number: with n = 15 and p = 0.70 the mean is 10.5 but the mode is floor(16 x 0.7) = 11. When (n + 1)p is exactly an integer, two adjacent values tie for most probable. Report the mean for expectation and the mode when asked which outcome to bet on.
References
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer ยท Editorial policy
Related Calculators
๐งฎDescriptive Statistics Calculator
Calculate descriptive statistics with inputs, formulas, and instant results.
๐งฎBayesian Posterior Calculator
Calculate bayesian posterior with inputs, formulas, and instant results.
๐งฎFalse Discovery Rate Calculator
Calculate false discovery rate with inputs, formulas, and instant results.
๐งฎCorrelation Coefficient Calculator
Calculate correlation coefficient with inputs, formulas, and instant results.
๐งฎChi Square Test Calculator
Calculate chi square test with inputs, formulas, and instant results.
๐งฎZtest Proportions Calculator
Calculate ztest proportions with inputs, formulas, and instant results.
๐งฎEffect Size Calculator
Calculate effect size with inputs, formulas, and instant results.