Skip to content
CALX
Appearance

Appearance

Light or dark

Colour
Accessibility

Binomial and Poisson distributions

P(X = k), P(X ≤ k) and P(X ≥ k) for the binomial and Poisson distributions, computed in log space, tails summed from the right side.

Parameters

The distribution
Between 0 and 1, 0.5 for a coin flip.
The question

The bars and the staircase

11 bars, from 0 to 10
00.10.2P(X = k)02468100.3770.623successes (k)P(X ≤ k)≤ k≥ kBinomial · n = 10 · p = 0.5P(X = 5) = 0.246P(X ≤ 5) = 0.623 · P(X ≥ 5) = 0.623k = 5
n = 10

Playback only moves the form entry n, integer by integer, fifteen values per second, and every frame is fully recomputed.

Calculation
P(X = 5) = C(10, 5) × 0.5⁵ × (1 − 0.5)⁵ = 0.246 094
Cumulatives
P(X ≤ 5) = P(0) + … + P(5) = 0.623 047 · P(X ≥ 5) = P(5) + … + P(10) = 0.623 047
Moments
µ = np = 10 × 0.5 = 5 · σ = √(np(1 − p)) = √2.5 = 1.58114
Note

As n grows at fixed p, the distribution centres on µ = np, its standard deviation σ = √(np(1 − p)) grows as √n and the skew fades (De Moivre-Laplace theorem).

The distribution: the bars P(X = i) and the staircase FThe requested bar, P(X = k)The two tails, dimensioned

Result

continuous computation
Exact probability
P(X = k)0.246 0945 successes in 10 trials, p = 0.5
Lower cumulative probability
0.623 047
Upper cumulative probability
0.623 047

5 successes in 10 trials, against a mean of 5.

Mean and spread
Mean
5
Variance
2.5
Standard deviation
1.58114

Calculation, assumptions and sources

OverviewBinomial distribution (k successes in n independent trials of probability p) and Poisson distribution (k events for λ expected on average): exact probability, both cumulative probabilities, mean and standard deviation.

Binomial distribution (k successes in n independent trials of probability p) and Poisson distribution (k events for λ expected on average): exact probability, both cumulative probabilities, mean and standard deviation.

Method & formulasbinomial: P(X = k) = C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ, E = np, V = np(1 − p)
binomial: P(X = k) = C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ, E = np, V = np(1 − p)Poisson: P(X = k) = e⁻λ · λᵏ / k!, E = V = λcumulatives: P(X ≤ k) = Σᵢ₌₀ᵏ P(X = i), P(X ≥ k) = Σᵢ₌ₖ P(X = i)

Poisson is the limit of the binomial as n grows and p shrinks with np = λ constant: the law of rare events (calls, failures, decays). Computations run in log space (ln C(n,k) from sums of ln i); C(10000, 5000) × p⁵⁰⁰⁰ neither overflows nor vanishes. Each cumulative is summed from its own side: P(X ≥ 95) out of 100 trials keeps its significant digits.

Independent trials
one trial’s outcome does not influence the others and p is the same at every trial (drawing with replacement). Drawing without replacement follows the hypergeometric distribution.
Mean and variance
E = np for the binomial. Over 100 flips at p = 0.5, E = 50 and P(X = 50) is 8%.
λ, mean and variance
for Poisson, mean and variance are equal. Counts whose variance clearly exceeds the mean (overdispersion) do not follow Poisson.
Validity domainn and λ are capped at 10,000; beyond that, the normal approximation (normal distribution tool) applies.

n and λ are capped at 10,000; beyond that, the normal approximation (normal distribution tool) applies. Correlated series and draws without replacement are outside the model. Probabilities smaller than ~10⁻³⁰⁰ are returned as 0.

The “at least one” eventP(X ≥ 1) = 1 − P(X = 0).

P(X ≥ 1) = 1 − P(X = 0). At p = 1/100 and n = 100 trials, P(X ≥ 1) = 1 − 0.99¹⁰⁰ ≈ 63%.

Reading the staircase and the two tailsThe staircase is the cumulative distribution function F: it rises by P(X = i) at each value i, and its height at k is P(X ≤ k).

The staircase is the cumulative distribution function F: it rises by P(X = i) at each value i, and its height at k is P(X ≤ k). Both tails count the bar k: P(X ≤ k) + P(X ≥ k) = 1 + P(X = k), and their dimension lines overlap on the step of k. The upper tail is dimensioned from F(k − 1) to 1. No normal curve is overlaid on the bars.