Numbers Governed by Chance
A random variable assigns a number to each outcome of a random experiment — turning "heads or tails" into "number of heads." This lets us do arithmetic and calculus with chance. Random variables come in two kinds:
- Discrete — takes countable, separate values (a die roll, a count). Its probability mass function gives for each value, and the masses sum to 1.
- Continuous — takes any value in a range (a height, a time). Its probability density function gives probabilities via areas: , and the total area is 1.
A key subtlety for continuous variables: the probability of any single exact value is zero — probability lives in intervals (areas under the density), not at points. This is the integral calculus of Unit 6 applied to chance.
Two numbers summarise a random variable:
- Expected value (mean) — the long-run average, a probability-weighted sum for discrete (or for continuous). It is the "centre of mass" of the distribution.
- Variance — the expected squared deviation, measuring spread, with standard deviation its square root.
Expectation is linear: , and for any (independent or not). Variance is not linear — , and variances add only for independent variables. Random variables are the bridge from raw probability to statistics and the modelling of real quantities.
Common pitfall: thinking a continuous random variable has a positive probability at a single exact value. For a continuous distribution, for any specific — probability is the area under the density over an interval, and a single point has zero width, hence zero area. Only for discrete variables does an individual value carry positive probability.