User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Integer from 0 to 10,000
Value from 0 to 1
Integer from 0 to n
Presets:
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Miscalculating binomial probabilities leads to flawed A/B tests, incorrect quality control decisions, and unreliable risk models. The binomial distribution models the number of successes X in n independent Bernoulli trials, each with success probability p. This calculator computes exact point probabilities P(X = k), cumulative probabilities P(X โ‰ค k) and P(X โ‰ฅ k), and range probabilities using log-gamma arithmetic to avoid overflow for trials up to n = 10,000. It also derives the mean ฮผ = np, variance ฯƒ2 = np(1 โˆ’ p), and skewness. This tool approximates using IEEE 754 double-precision floating point. For n > 1,000 with extreme p, probabilities below 10โˆ’15 may round to zero.

binomial distribution probability calculator PMF CDF statistics binomial probability combinatorics

Formulas

The probability mass function (PMF) of the binomial distribution gives the probability of exactly k successes in n trials:

P(X = k) = n!k!(n โˆ’ k)! โ‹… pk โ‹… (1 โˆ’ p)n โˆ’ k

where n = number of independent trials, k = number of successes (0 โ‰ค k โ‰ค n), p = probability of success on a single trial, and (1 โˆ’ p) = probability of failure, often denoted q.

The cumulative distribution function (CDF) sums probabilities up to k:

P(X โ‰ค k) = kโˆ‘i = 0 n!i!(n โˆ’ i)! โ‹… pi โ‹… qn โˆ’ i

To avoid factorial overflow for large n, computation uses log-space arithmetic via the Lanczos approximation of the log-gamma function:

ln P(X = k) = lnฮ“(n + 1) โˆ’ lnฮ“(k + 1) โˆ’ lnฮ“(n โˆ’ k + 1) + k โ‹… ln(p) + (n โˆ’ k) โ‹… ln(q)

Descriptive statistics derived from the parameters:

Mean: ฮผ = np โ€ƒ Variance: ฯƒ2 = npq โ€ƒ Skewness: ฮณ = 1 โˆ’ 2pโˆšnpq

where q = 1 โˆ’ p.

Reference Data

ScenarionpMean (ฮผ)Variance (ฯƒ2)Std Dev (ฯƒ)SkewnessApplication
Coin Flips (Fair)100.505.002.501.580.00Probability teaching
Quality Control1000.022.001.961.400.69Defect rate monitoring
Drug Efficacy Trial500.8040.008.002.83โˆ’0.21Clinical trials
Survey Response2000.3060.0042.006.480.06Market research
Network Packet Loss10000.0110.009.903.150.31Network reliability
Free Throw Shooting200.7515.003.751.94โˆ’0.26Sports analytics
Email Open Rate5000.22110.0085.809.260.06Email marketing
Genetic Inheritance40.251.000.750.870.58Mendelian genetics
A/B Test Conversion10000.0550.0047.506.890.13Web optimization
Insurance Claims100000.00110.009.993.160.32Actuarial science
Dice Rolling (6)120.1672.001.671.290.52Gaming probability
Election Poll Sample4000.52208.0099.849.99โˆ’0.004Political forecasting
Rare Disease Screening50000.00052.502.501.580.63Epidemiology
Server Uptime (daily)3650.999364.630.370.60โˆ’1.63SLA compliance
Lottery (match 1 number)60.1020.610.550.741.07Gambling odds

Frequently Asked Questions

The normal approximation is generally reliable when both np โ‰ฅ 5 and n(1 โˆ’ p) โ‰ฅ 5. Under these conditions, the binomial distribution is approximately symmetric and bell-shaped. For stricter accuracy, some sources require both products to exceed 10. This calculator uses exact log-gamma computation, so the normal approximation is unnecessary regardless of n.
IEEE 754 double-precision floating point has a minimum positive subnormal near 5 ร— 10โˆ’324. When n is large (e.g., 10,000) and k is far from the mean ฮผ = np, the log-probability ln P falls below โˆ’745, which exponentiates to zero. These probabilities are genuinely negligible for practical purposes. The calculator displays them as < 10โˆ’15 when they underflow.
When p = 0, the only possible outcome is k = 0 with probability 1. When p = 1, the only possible outcome is k = n with probability 1. The calculator detects these degenerate cases before invoking log-space arithmetic (since ln(0) is undefined) and returns deterministic results directly.
The PMF P(X = k) answers questions like "What is the probability of exactly 3 defects?" The CDF P(X โ‰ค k) answers "What is the probability of at most 3 defects?" For quality control and hypothesis testing, CDF-based thresholds are standard. For instance, an acceptance sampling plan rejects a batch if the number of defects exceeds a critical value c, computed from P(X โ‰ค c) โ‰ฅ 0.95.
Yes. For a one-sided test of H0: p = p0 vs. H1: p > p0, compute P(X โ‰ฅ k) under p0 using the "P(X โ‰ฅ k)" mode. If this p-value falls below your significance level ฮฑ (typically 0.05), reject H0. For two-sided tests, compute both tails and sum them.
Skewness ฮณ = (1 โˆ’ 2p) รท โˆšnpq. When p < 0.5, skewness is positive (right-tailed), meaning the distribution has a long right tail and the mean exceeds the mode. When p > 0.5, the distribution is left-skewed. At p = 0.5, skewness is zero (symmetric). Higher n reduces skewness magnitude, making the distribution more symmetric regardless of p.