Statistics

Probability Density

For a continuous quantity no single value has any probability at all: only stretches do. A density is the height whose area is that probability, so every question becomes an integral. Drag the interval on the curve, or drag a region across a two-dimensional density, and read the area you enclosed.

P(a ≤ X ≤ b)
Total area
Tallest the density gets
Width b − a

In one dimension, drag either end of the shaded stretch. In two, drag the circle around. The number is always the same thing: the amount of density you have enclosed.

What to observe

  1. Press Shrink it to a point. The shaded area collapses and the probability goes to zero, even though the density there is perfectly healthy. For a continuous quantity, P(X = c) = 0 always, and that is not a paradox: it takes a stretch to hold any probability.
  2. Pick narrow. The curve shoots past height 4, which no probability may do. A density is not a probability; it is probabilityper unit of x, and only its area has to behave.
  3. The curve underneath is the running total, the CDF. The shaded area upstairs is exactly the vertical step F(b) − F(a) downstairs. Two pictures of one number.
  4. Try decay and slide the stretch to the right. Equal widths keep giving smaller probabilities, because the density is what changes, never the width.
  5. Switch to two dimensions. Now the density is a height over the plane, the region is a patch of ground, and the probability is the volume standing on it. Every one-dimensional idea survives with an extra integral.
  6. In two dimensions, watch the dots as you move the circle. The share of dots caught inside tracks the integral, which is exactly what makes Monte Carlo work.

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