Binomial Distribution Calculator: P(X=k), cumulative, mean
Compute the binomial distribution P(X=k) = C(n,k)·p^k·(1-p)^(n-k), cumulative probability, mean μ = np and variance σ² = np(1-p). Four calculation modes.
Report a calculation error
Help us improve. Describe what is wrong with the calculation.
Result
| Voce | Valore |
|---|
Show full details
Share result
Disclaimer: this calculation is for informational purposes only. For important decisions, consult a qualified professional.
Binomial distribution
The binomial distribution B(n, p) models the number X of successes in n independent trials, each with probability p of success and q = 1 − p of failure (Bernoulli scheme). It's one of the most fundamental discrete distributions in statistics. Ingredients: n ∈ ℕ number of trials; p ∈ [0, 1] success probability; X ∈ {0, 1, 2, ..., n} random variable counting successes. Probability mass function: P(X = k) = C(n, k) · p^k · (1−p)^(n−k), with C(n, k) = n!/(k!(n−k)!) the binomial coefficient.
Bernoulli scheme
Each single trial is a Bernoulli experiment: two outcomes (success/failure, heads/tails, yes/no, 1/0) with probabilities p and q = 1 − p. The binomial needs three assumptions: (1) fixed number of trials n; (2) independent trials (one outcome doesn't influence the others); (3) constant p across trials. Violating these requires different models (e.g. hypergeometric for sampling without replacement).
Cumulative probability
The CDF F(k) = P(X ≤ k) = Σ_{i=0}^{k} C(n, i) · p^i · (1−p)^(n−i) gives the probability of at most k successes. P(X ≥ k) = 1 − P(X ≤ k−1). P(a ≤ X ≤ b) = F(b) − F(a−1). Example: tossing a fair coin 10 times (p = 0.5), probability of exactly 5 heads = C(10, 5)·0.5¹⁰ = 252/1024 ≈ 24.6%. Probability of at least 7 heads ≈ 17.2%.
Mean, variance, standard deviation
For X ~ B(n, p): expected value E[X] = μ = n · p; variance Var(X) = σ² = n · p · (1−p) = n · p · q; standard deviation σ = √(n·p·q). Example: n = 100 fair-coin tosses → μ = 50, σ² = 25, σ = 5. By CLT rule of thumb: ~68% of observed values within [μ − σ, μ + σ] = [45, 55]; 95% within [40, 60]; 99.7% within [35, 65]. The mode (most probable value) is ⌊(n+1)·p⌋, or ⌊(n+1)·p⌋ − 1 if (n+1)·p is integer.
Normal approximation
For large n (typically n ≥ 30 with n·p ≥ 5 and n·q ≥ 5), the binomial is approximated by the normal distribution N(μ, σ²) with μ = np, σ² = npq. With continuity correction (discrete → continuous): P(X ≤ k) ≈ Φ((k + 0.5 − μ)/σ). Example: X ~ B(100, 0.5), P(X ≤ 60) ≈ Φ(2.1) ≈ 0.9821. When p is very small and n large (np < 10), Poisson approximation is better: P(X = k) ≈ λ^k · e^(−λ) / k!, with λ = np.
Practical applications
The binomial distribution describes: quality control (probability of k defective items in a lot of n), polling (proportions estimated from samples), genetics (individuals with a given allele), sports (wins in n games), diagnostic tests (true positives in n tests), reliability (n components working), finance (defaults in a portfolio). In A/B testing it's the basis of proportion tests: Z = (p̂ − p₀)/√(p(1−p)/n) to compare a sample proportion against a null hypothesis.
Key limiting cases
- n = 1: X ~ Bernoulli(p); P(X = 1) = p, P(X = 0) = 1 − p.
- p = 0: X always 0; p = 1: X always n.
- p = 0.5: symmetric distribution around n/2.
- Sum of binomials: independent X ~ B(n₁, p), Y ~ B(n₂, p) → X + Y ~ B(n₁ + n₂, p).
- Complement: X ~ B(n, p) → Y = n − X ~ B(n, 1 − p).
- Skewness: (1 − 2p)/√(n·p·q); excess kurtosis: (1 − 6pq)/(n·pq). Symmetric when p = 0.5.
How to use
Four modes: exact probability (n, k, p → P(X = k)); cumulative (n, k, p → P(X ≤ k), P(X ≥ k), P(X > k), P(X < k)); interval (n, a, b, p → P(a ≤ X ≤ b)); mean and variance (n, p → μ, σ², σ, mode). Direct computation for n ≤ 1000 (IEEE-754 precision), normal approximation with continuity correction for larger n.
From Bernoulli to modern applications
The binomial distribution originates with Jacob Bernoulli, the Swiss mathematician of the famous family, who in the 1713 Ars Conjectandi systematically studied sequences of independent two-outcome trials, now called Bernoulli trials. In the same treatise he stated the law of large numbers, whereby the frequency of successes tends to the theoretical probability as the trials grow. The binomial is the bridge between the probability of a single event and the aggregate behaviour of many repetitions, and the basis of inferential statistics on proportions.
Where the binomial distribution is used
It is ubiquitous in applications: in quality control to estimate defective items in a batch, in clinical trials to count patients responding to a therapy, in digital marketing to model conversion rates, in system reliability and in election polls. The binomial test checks whether an observed proportion is compatible with an expected value, and underlies many statistical checks. For large numbers, the normal approximation makes the calculations feasible even by hand.
Updated July 2026
Comments (0)
Login to leave a comment.
No comments yet. Be the first!