What is a binomial distribution?
The binomial distribution models the number of successes in a fixed number of independent trials, where each trial has only two outcomes (success/failure) and the same probability of success. If you have a process that looks like repeated yes/no events, this is often the right model.
- n = number of trials
- p = probability of success on each trial
- X = random variable representing total successes
Binomial probability formula
The probability of getting exactly k successes is:
P(X = k) = C(n, k) · pk · (1 - p)n-k
where C(n, k) is the number of ways to choose k successes out of n trials.
How to use this binomial distribution calculator
1) Enter the trial setup
Input the number of trials n and success probability p. Example: 20 coin flips with probability of heads 0.5.
2) Choose the probability type
- P(X = k): exactly k successes
- P(X ≤ k): at most k successes
- P(X ≥ k): at least k successes
- P(k1 ≤ X ≤ k2): probability of a range of outcomes
3) Interpret the output
The result area shows the probability as a decimal and percentage, along with mean, variance, and standard deviation for the selected parameters.
Worked examples
Example A: Exactly k successes
Suppose 12 customers are contacted and each has a 30% chance of buying. To compute the probability that exactly 4 buy, use n = 12, p = 0.30, and k = 4 with P(X = k).
Example B: At most k successes
If a quality check samples 15 items and defect probability is 0.08, choose P(X ≤ k) to find the chance of seeing at most 1 defect.
Example C: At least k successes
For exam performance, if each question has 70% chance of being answered correctly and there are 10 questions, use P(X ≥ 8) to estimate the chance of scoring 8 or more correct.
Mean and spread of a binomial random variable
For a binomial model, the center and spread are:
- Mean: μ = n·p
- Variance: σ² = n·p·(1 - p)
- Standard deviation: σ = √(n·p·(1 - p))
These values help you understand what outcome is typical and how much variation to expect.
Common mistakes to avoid
- Using percentages like 35 instead of probabilities like 0.35.
- Entering non-integer values for n or k.
- Applying binomial assumptions when trials are not independent.
- Forgetting that p must remain constant across all trials.
When binomial is a good fit
Use this calculator for pass/fail tests, conversion events, defect counts in fixed samples, or any repeated binary process with stable success probability. If outcomes are not binary or p changes each trial, consider a different distribution.