Binomial Distribution Calculator
Compute P(X = k), cumulative probabilities, mean, and variance for a binomial experiment.
Try: n=10, p=0.5, k=5 · n=20, p=0.3, k=6 · n=100, p=0.25, k=25
About the binomial distribution
What is a binomial distribution?
A random variable X follows a binomial distribution B(n, p) when it counts the number of successes in n independent Bernoulli trials, each with probability p of success. The four conditions required are: fixed number of trials n, each trial is independent, each trial has exactly two outcomes (success/failure), and the probability p is constant across trials.
Probability mass function (PMF)
The probability of obtaining exactly k successes in n trials is: \[P(X=k)=\binom{n}{k}p^k(1-p)^{n-k},\quad k=0,1,\ldots,n\] The term \(\binom{n}{k}\) counts the arrangements, \(p^k\) is the probability of k successes, and \((1-p)^{n-k}\) is the probability of the n−k failures.
Cumulative distribution function (CDF)
The probability of at most k successes is the cumulative sum: \[P(X\le k)=\sum_{i=0}^{k}\binom{n}{i}p^i(1-p)^{n-i}\] From this, \(P(X>k)=1-P(X\le k)\).
Mean and variance
The expected value and variance of B(n, p) have elegant closed forms: \[\mu = np \qquad \sigma^2 = np(1-p) \qquad \sigma = \sqrt{np(1-p)}\] The distribution is symmetric around its mean when p = 0.5, right-skewed when p < 0.5, and left-skewed when p > 0.5.