← Chapter 6
Statistics · Chapter 6

Discrete or Continuous?

A random variable is a number produced by chance. Before you can do anything else with one you have to answer a question about the kind of number it is: can you list every value it might take, or does it live on a continuous scale where between any two values there is always another? That single fork decides whether you add up probabilities or integrate an area — and it is decided by the variable itself, never by the data you happened to write down. Below, ten variables are actually sampled and then recorded at finer and finer precision. Watch which ones keep producing values you have never seen before, and which ones hit a wall.

Every value you recorded

Does measuring more finely find new values?

different values recorded one different value per observation

The chance of one exact value

share at the single commonest value share inside a fixed interval
A random variablepick one to sample it
The random variable
Your call, before you look at the evidence
Choose one. The three charts are computed from a real sample either way — the guess only decides whether you get to be right.
1
600
Observations—
Different values—
Closest two values—
Share at one value—
Recorded to the nearestDifferent valuesCommonest valueIts shareIn the interval
The definition is one sentence each. A random variable is discrete if its possible values can be listed — first value, second value, third value, and so on — even if that list never ends. It is continuous if its possible values fill an interval, so that between any two of them there is always another, and no list can ever reach them all. Notice what the test is not. It is not “are there decimals”: shoe sizes go 8, 8½, 9 and are perfectly discrete, while a height recorded as a flat 170 cm belongs to a continuous variable. It is not “is the list short”: the number of rolls until your first six could in principle be 1, or 2, or 4,000, and that endless list is still a list. It is not a fact about your dataset at all — every dataset ever collected is discrete, because every instrument rounds. Ask instead what the quantity could be before anyone measured it. A count answers “how many” and lands on separated values with gaps between them that nothing can occupy: there is no household with 2.4 children, however often the average says so. A measurement answers “how much” — length, weight, time, temperature — and the gaps are an artefact of the ruler, not of the world. Slide the precision to its finest setting and the difference stops being philosophical: the counts stop yielding new values, and the measurements never do.
Five ways this goes wrong. First, judging by the data instead of the variable. Your recorded heights have a finite list of values, so by the letter of the definition your column of numbers is discrete. That tells you about the tape measure, not the human being. The classification is a claim about what the quantity could be, and it decides which mathematics is legitimate later on. Second, equating discrete with whole numbers. Shoe sizes, quarter-point course credits, and prices in cents all step through non-integers and are all discrete; what matters is that the values are separated, with a fixed gap that no value falls inside. Third, equating discrete with finite. Rolls until the first six, calls arriving before noon, defects on a roll of wire — the list of possible values runs 1, 2, 3, … forever and is discrete every step of the way. Discrete means listable, not few. Fourth, being startled that a continuous variable gives every single value probability zero. It genuinely does: P(X = 170.000… cm exactly) = 0, for every value, and yet somebody has a height. Probability zero is not the same as impossible — it is what is left when you slice a fixed amount of probability into infinitely many pieces. That is precisely why continuous variables are only ever asked about intervals, and why the gold line on the third chart holds steady while the red one falls away. Fifth, forgetting that the model is a choice. Money is discrete — the register cannot charge you a third of a cent — but with millions of possible values, treating it as continuous is a harmless and enormously convenient approximation. Conversely a continuous variable coarsely recorded (age in whole years) is often handled as discrete. Classify honestly first; approximate deliberately second.