Statistics

Probability Density

Drop grains of sand where a random quantity lands. They pile up into a shape; divide each pile by its width and the shape becomes the density curve. Then the curve is a sandpile: the share of grains over a stretch is the area there, the total is always one, and a single exact point holds none.

grains: one outcome eachdensity curve f(x)the stretch from a to b

In chapter 3, drag the two edges of the stretch

—
—

squeezedspread
Now
grains—
grains in the stretch—
area over the stretch—
highest point of f—

What to observe

  1. The first grains land almost anywhere. Only after hundreds does the pile take a shape, and that shape is the same every time.
  2. Halving the bins halves how many grains each catches, so raw counts would shrink to nothing. Dividing by the width keeps the heights steady, and they settle onto one curve.
  3. Drag the stretch: the share of grains inside it and the area under the curve there are the same number. That is all a density is for.
  4. Squeeze the spread: the curve climbs past 1, yet no grain is added, so the area stays exactly 1. A density is not a probability and can be any height.
  5. Shrink the stretch around one point: the grains inside run out and the probability goes to 0, while probability ÷ width settles on the height f(x).

Shortcuts:space run/pause · r reset · f fullscreen