Statistics Comes To Life

X ~ Binomial(n, p) — the number of successes in n independent trials, each with success probability p. Drag the sliders (or type exact values) to see the distribution change.

The binomial distribution isn't an approximation of anything — it predicts the actual result of flipping n coins. Sample from a process with a known probability of success p (the odds of a coin landing heads, say) over a fixed number of trials n (how many times you flip it), repeat that experiment over and over, and the results land exactly on the binomial distribution. That's not just a classroom exercise, either — it's the same math behind calculating the odds of a match for a bone marrow transplant, or how many left-handed people to expect in a small group. It can be built directly, outcome by outcome, with no approximation involved — which is exactly what the chart above is doing.

About 100 years ago, this was done with printed tables: a book of reference tables could reproduce a great many binomial distributions directly, one page per combination of n and p. But once n grew large, working in raw counts became unwieldy, so the scale was often switched to a proportion instead (X/n rather than X). The trouble was that no tables existed for that proportional distribution, and constructing one by hand — the same term-by-term way the binomial tables had been built — simply wasn't possible at that scale.

The only way forward was to invent a stand-in: a smooth, bell-shaped (Gaussian) curve that could approximate the real distribution without ever being it. Call it a ghost — a curve that looks like the distribution but was never actually built from it. Even that ghost wasn't practical on its own, though: a Gaussian curve has no closed-form antiderivative, so it cannot be integrated over an interval by hand, no matter how much calculus you throw at it. The workaround was to rescale every ghost curve's x-axis into Z-units — standard deviations from the mean, using the real standard deviation of the binomial or proportional distribution behind it. Once every ghost is measured this way, they all collapse into the exact same single, standard normal curve. That one curve was integrated by hand exactly once, producing a master reference — the Z-table — reusable for every ghost, for any n and p, because every Gaussian curve obeys the same fixed rule: 68.27% of its area sits within 1 standard deviation of the mean, 95.45% within 2, and 99.73% within 3 — always.

There's just one thing that whole method requires: the standard deviation of the binomial or proportional distribution being approximated.

Here's what most textbooks never say out loud: you can calculate that standard deviation without ever constructing the binomial or proportional distribution at all. That's possible because variance — the standard deviation squared — is linear: it simply adds up across independent trials, so it can be worked out directly from n and p alone, with no need to build the full distribution first. (You'll see exactly how, later in this tool.)

In a standard textbook, that standard deviation quietly becomes a Z-score, where “1” just means “one standard deviation of the binomial or proportional distribution” — which is also the standard deviation of its ghost — mapped onto the one generic bell curve printed in the book. But because the book never shows you the actual ghost, scaled to your specific n and p, you only ever see one fixed, moderately plump curve, and it's easy to assume every distribution looks like that. In reality, the ghost behind any particular binomial or proportional distribution can be very tall and very skinny (a small standard deviation relative to the mean) or short and wide (a large one) — and that difference is exactly what matters when you go on to compare two populations against each other.

Try it yourself. Press the ▶ Sweep n button next to Trials (n) below and watch its effect on the variance as n climbs from 1 to 1000 — the girth of the binomial (or proportional) distribution visibly changes right along with it. That's because variance is linear. Switch the x-axis to k/n first, then press the button again, and you'll see the paradox: instead of growing, the spread narrows. Later in this tool, we'll show that a higher n doesn't just narrow that spread — it also means more accurate predictions.

Take a sample. Press the orange Take 1 sample button and watch the coins show that sample's number of heads — plotted as a dot on the binomial distribution. Then press ▶ Run automatically: as the coin keeps getting tossed, sample after sample, you'll watch those dots build up into the very same shape the mathematical distribution already predicted.

Watch the ghost appear. Turn on the 🔔 Normal curve overlay, then press ▶ Sweep n. Once n is large enough, that curve stops being just an overlay — it becomes the ghost of the binomial distribution itself, and of the proportional distribution too if you're viewing k/n.

Putting the cart before the horse. Set n to 1000 and p to .001, with the x-axis on k (the binomial count view), then turn on the 🔔 Normal curve overlay — watch it not fit. That's the famous np = 1, below the rule-of-thumb minimum of 5, telling you right there that the normal approximation is a poor one here. Now turn on 🌟 Poisson instead: the magenta dots track the binomial very closely, right where a very high n meets a very low p. Again, that's the genius of the mathematicians who worked this out — a binomial distribution like this one, at n = 1000, couldn't have been built by hand, not even back when I was in high school.

0 samples drawn
CI level (α)
Take a sample first.
Trials (n) = 1
Success prob. (p) = 0.200
Approximations
Histogram → bell
Chart
Normal approx. check
np =10.00 nq =10.00
X-axis
Mean & variance
μ=np10.0000 σ²=npq5.000000 σ=2.2361
↪ x-axis currently count (0 to 50)
P(X = k)
Probability of exactly k successes out of 20 trials
Theoretical
0.00000.05070.10130.15200.202601020304050μ = 10.0000 / f(10) = 0.1762k (number of successes)
This sample, spelled out
Take a sample to see it as coins, marbles, or a true/false quiz.