← Chapter 6
Statistics · Chapter 6

Is It a Valid Probability Distribution?

A discrete random variable is described by a probability distribution: a list of every value it can take, paired with the probability of each. Not every table of numbers qualifies. To be a legitimate distribution the table must satisfy two requirements and only two — every probability between 0 and 1, and the probabilities adding to exactly 1. Below you can set each probability yourself. The total re-computes as you drag, both requirements are tested live, and the ones that pass are then actually sampled, so you can see that a valid distribution really does describe a random process you could run.

The distribution you built

Requirement 2: stacking the probabilities

Does it survive contact with real draws?

stated probability proportion of the sample
A table of numbersis it a probability distribution?
A candidate table
Set each probability yourself
Values listed—
Smallest entry—
Largest entry—
Total—
Requirement 10 ≤ P(x) ≤ 1 for every x—
Requirement 2Σ P(x) = 1—
Test it by sampling
400
A sample can only be drawn from a table that passes both requirements — there is no random process that produces numbers failing either one.
Two requirements, and there are only two. A discrete probability distribution is a list of every value the random variable can take, each paired with a number P(x). For that list to be a probability distribution: first, every entry must satisfy 0 ≤ P(x) ≤ 1, and second, the entries must add to exactly 1. That is the whole test. Both parts come from what a probability means. A probability is the share of the long run on which something happens, so it can be as small as never and as large as always — but nothing is rarer than never or commoner than always, which is why 0 and 1 are the floor and ceiling. And the list of values has to be exhaustive (the variable must land on one of them every single time) and mutually exclusive (it cannot land on two at once), so the shares have to divide up the whole run and nothing more: they sum to 1. Notice that 0 and 1 are allowed, because the inequality is not strict. An entry of P(x) = 0 means you listed a value that never actually happens, which is untidy but legal. An entry of P(x) = 1 means that value is certain and every other entry is 0 — a degenerate distribution, a random variable that is not really random, and still perfectly valid. Notice too that neither requirement implies the other. You can build a table that sums to 1 with a negative entry hiding inside it, and a table where every entry is a believable-looking number between 0 and 1 that quietly sums to 0.90. Both are shown among the candidates below; both fail. Finally, watch what rounding does. Three outcomes with probability one-third each form a valid distribution, but write them as 0.33, 0.33, 0.33 and the total is 0.99 — the rounded table is not a distribution. Carry fractions, or carry enough decimals that the total is exactly 1. The reason all of this matters early is that everything downstream treats P(x) as a weight: the mean of a discrete random variable is Σ x·P(x), a weighted average whose weights are assumed to sum to 1. If the total is 0.90 or 1.15, every expected value, variance, and standard deviation you compute afterwards is quietly wrong. Check the two requirements first, always.
Six ways this goes wrong. First, testing only the sum. "They add to 1, so it's a distribution" is the most common error in the chapter. Set the sliders to 0.60, 0.55, and −0.15 and the total is exactly 1.000 — and the table is still garbage, because an event cannot happen a negative share of the time. Second, testing only the range. "Every number is between 0 and 1, so it's fine" fails just as fast: 0.10, 0.35, 0.30, 0.15 are all perfectly respectable probabilities that add to 0.90, which means 10% of the time the variable does something you did not list. Either you left a value out, or one of your numbers is wrong. You must run both tests, every time. Third, letting an entry exceed 1. This usually means percents were pasted in without converting — 45 instead of 0.45 — or that odds were confused with probability. Odds of 3 to 1 are a probability of 0.75, not 3. Fourth, disqualifying a table because it contains a zero. Zero is a legal probability; the requirement is 0 ≤ P(x), not 0 < P(x). A value with probability 0 is simply one you listed that will not occur. Fifth, believing that rescaling repairs anything. Dividing every entry by the total does fix requirement 2 — the new entries always sum to 1 — but only when every entry is already 0 or greater. Divide a negative number by a positive total and it is still negative, so the repaired table fails requirement 1 exactly as the original did. Try the button on the table containing −0.15 and watch it refuse. Rescaling is arithmetic, not absolution: it is only legitimate when your numbers were unnormalized counts or weights in the first place, never when one of them is impossible. Sixth, expecting a sample to reproduce the probabilities exactly. Draw 400 observations from a valid distribution and the observed proportions will miss the stated ones by a few hundredths; that is sampling variability, not a broken table. Two things are worth noticing in that sampling chart. The gap shrinks as you increase the number of draws, but it is not required to reach zero at any particular sample size. And the observed proportions themselves always satisfy both requirements automatically — a count divided by the sample size can never be negative or exceed 1, and the counts always add back to the whole sample. The two requirements are not arbitrary rules imposed on the table; they are simply the properties that any set of real relative frequencies is guaranteed to have.