CalcMountain

Binomial Distribution Calculator

Enter the number of trials (n), probability of success (p), and number of successes (k) to compute exact and cumulative binomial probabilities.

The binomial distribution models the number of successes in a fixed number of independent trials, each with the same probability of success. It's the foundation of A/B testing, quality control, polling, clinical trials, and any scenario where you have a series of yes/no outcomes. The classic example: flip a coin 10 times — what's the probability of getting exactly 7 heads? The binomial distribution gives the answer: 0.117 (about 12%).

This calculator returns the exact probability P(X = k), cumulative probability P(X ≤ k), and tail probability P(X ≥ k) for binomial distributions. Use it for homework problems, hypothesis testing, sample size planning, or quick reality checks on probabilities.

The binomial requires three things: a fixed number of trials (n), independence between trials, and constant probability of success (p) across trials. The mean is np, variance is np(1-p), and the distribution is approximately normal when n is large and p isn't extreme.

Inputs

Results

P(X = k)

0.246094

P(X <= k)

0.623047

P(X > k)

0.376953

Mean

5.0000

Variance

2.5000

Std Dev

1.5811

Last updated:

Formula

**Binomial probability mass function:** P(X = k) = C(n,k) × p^k × (1-p)^(n-k) Where: - **C(n,k)** = n! / (k!(n-k)!): binomial coefficient - **n**: number of trials - **k**: number of successes - **p**: probability of success per trial **Worked example: 10 coin flips, P(exactly 5 heads)** P(X = 5) = C(10,5) × 0.5^5 × 0.5^5 = 252 × 0.03125 × 0.03125 = 0.246 So 24.6% chance of exactly 5 heads. **Cumulative probability:** P(X ≤ k) = Σ P(X = i) for i from 0 to k **Distribution statistics:** - **Mean**: μ = np - **Variance**: σ² = np(1-p) - **Standard deviation**: σ = √(np(1-p)) For n=10, p=0.5: mean = 5, variance = 2.5, SD = 1.58. **Requirements for binomial:** 1. Fixed number of trials (n). 2. Each trial independent. 3. Two possible outcomes per trial (success/failure). 4. Constant probability of success (p). 5. Trials of equal weight. **Normal approximation:** When np ≥ 5 AND n(1-p) ≥ 5: binomial ≈ Normal(np, np(1-p)). Useful for large n where exact binomial computation is unwieldy. **Continuity correction:** When using normal to approximate binomial: subtract 0.5 from upper bound (or add to lower) for accuracy. **Special cases:** - **Bernoulli**: single trial (n=1). - **Geometric**: trials until first success. - **Negative binomial**: trials until r successes. **Common applications:** | Field | Application | |---|---| | Quality control | Defective items in batch | | Polling | Number agreeing with statement | | Medicine | Drug effectiveness rate | | Sports | Free throw success rate | | Marketing | Conversion rate | | Genetics | Inheritance patterns | | Reliability | Components failing in system | | Election | Vote counts | **Common probabilities for fair coin (p=0.5):** | n | P(exactly 50%) | P(at most 50%) | |---|---|---| | 2 | 0.50 | 0.75 | | 10 | 0.246 | 0.623 | | 50 | 0.112 | 0.556 | | 100 | 0.080 | 0.539 | | 1000 | 0.025 | 0.515 |

How to use this calculator

  1. Enter number of trials (n).
  2. Enter probability of success per trial (p, between 0 and 1).
  3. Enter number of successes (k).
  4. Calculator returns P(X=k), P(X≤k), and P(X≥k).
  5. For large n with moderate p, use normal approximation.
  6. Verify: np > 5 and n(1-p) > 5 for normal approximation validity.

Worked examples

A/B test conversion rate

**Scenario:** Test version converts 10% of visitors. Run experiment with 50 visitors. What's P(8 or more conversions)? **Calculation:** n=50, p=0.10, k=8. Mean = 5; SD = 2.12. P(X≥8) using binomial: ~0.092. **Result:** ~9% probability of seeing 8+ conversions. Statistical significance threshold (α=0.05) requires more extreme; current result is borderline.

Quality control defect rate

**Scenario:** Factory produces 5% defective parts. Sample 20 parts. P(2 or fewer defective)? **Calculation:** n=20, p=0.05, k=2. P(X≤2) = P(0)+P(1)+P(2) = 0.358+0.377+0.189 = 0.924. **Result:** 92.4% probability of finding ≤2 defective parts. This is consistent with target. Sample of 20 supports the 5% defect rate hypothesis.

Free throw percentage

**Scenario:** Player makes 80% of free throws. In 10 attempts, what's P(making exactly 7)? **Calculation:** n=10, p=0.80, k=7. C(10,7) × 0.8^7 × 0.2^3 = 120 × 0.2097 × 0.008 = 0.201. **Result:** 20.1% chance of making exactly 7. Mean expected: 8. The actual outcome of 7 is plausible (within 1 SD of mean).

When to use this calculator

**Use binomial distribution for:**

- **Sample surveys**: number agreeing/disagreeing. - **Quality control**: defects in batch. - **A/B testing**: conversion rates. - **Sports statistics**: success rates per attempt. - **Genetics**: inheritance probabilities. - **Clinical trials**: response rates. - **Reliability**: component failures.

**Key checks:**

- Fixed n trials. - Each trial independent. - Probability p constant across trials. - Two outcomes per trial.

**Normal approximation when:**

- np ≥ 5 AND n(1-p) ≥ 5. - Use mean = np, variance = np(1-p). - Apply continuity correction (±0.5).

**Software:**

- **Excel**: BINOM.DIST(k, n, p, FALSE) for exact; TRUE for cumulative. - **R**: dbinom(k, n, p), pbinom(k, n, p). - **Python (scipy.stats)**: binom.pmf(k, n, p), binom.cdf(k, n, p).

**Related distributions:**

| Distribution | Difference | |---|---| | Bernoulli | n = 1 (single trial) | | Geometric | Trials until first success | | Negative binomial | Trials until r successes | | Hypergeometric | Sampling without replacement | | Poisson | Limit of binomial as n→∞, np = λ |

**Common issues:**

- Confusing with Poisson (Poisson for rate over interval). - Using when trials are dependent. - Wrong probability per trial. - Forgetting normal approximation conditions.

Common mistakes to avoid

  • Using binomial when trials are dependent. Sampling without replacement is hypergeometric.
  • Confusing exact (P(X=k)) with cumulative (P(X≤k)).
  • Applying normal approximation when np < 5.
  • Forgetting continuity correction in normal approximation.
  • Using binomial for rate events. Use Poisson when counting occurrences in interval.
  • Treating two-sided test as one-sided. Multiply p-value by 2.
  • Forgetting that "at least k" and "exactly k" differ. Use cumulative for "at least."

Frequently Asked Questions

Sources & further reading

SponsoredShop Top Deals on AmazonSupport CalcMountain — browse top-rated products at no extra cost to you.

Related Calculators