Module 8 · Lesson 8.2

Random Variables & Distributions

See how the outcomes of a random process settle into a predictable shape once you plot enough of them.

Intuition

A random variable is just a number attached to the outcome of something uncertain — the value on a die, the reading off a noisy sensor, the number of clicks an ad gets in an hour. On its own, one draw looks unpredictable. But if you roll, measure, or sample the same process over and over and stack up the results into a histogram, a shape emerges. That shape — which values show up often, which show up rarely — is the variable's distribution.

Core concept

A distribution doesn't tell you what any single draw will be. It tells you the long-run shape: which outcomes are common, which are rare, and how the probability is spread across all the values the variable could take. The more samples you collect, the more clearly that shape appears — a single roll is noise, but a thousand rolls reveal the pattern hiding underneath.

sum = 7
Ways to roll a sum of 76
Total two-dice outcomes (6×6)36
AnswerP(X=7) = 6/36 ≈ 0.167

Interactive Lab

Pick one die or two, then keep rolling. Watch the bars grow and settle into a shape as the sample count builds up.

0 rolls

Key Idea

$$ P(X = x) = \frac{\text{number of outcomes where } X = x}{\text{total number of possible outcomes}} $$

This is the same rule from carving up a circle, just applied value by value. For each possible value $x$ the random variable could take, its probability is the share of all outcomes that land on that value. Line those probabilities up across every possible value and you get the full distribution — the shape you saw settle into place in the lab above.

$X$The random variable — a number tied to an uncertain outcome
$x$One specific value X could take, like a sum of 7
$P(X=x)$The probability that X lands on that particular value

Think Further

  1. Why does a sum of 7 come up more often than a sum of 2 when rolling two dice?
  2. If you switched to one die instead of two, how would the shape of the histogram change, and why?
  3. A sensor's reading is the true value plus lots of small, independent random errors added together. Why might that produce a bell-shaped distribution rather than a flat one?
Show suggested answers
  1. There's only one way to roll a 2 (1+1), but six different pairs of dice values add up to 7 — more combinations means more ways for that outcome to occur, so it happens more often.
  2. With one die, every value from 1 to 6 has exactly one way to occur, so the histogram flattens into a uniform shape instead of a triangle peaked in the middle.
  3. When many small random errors are added together, extreme errors mostly cancel each other out while typical-sized errors combine more often, so results pile up near the true value and thin out toward the extremes — the same "more combinations near the middle" effect seen with the two dice, just with many more terms.