← Back to Interactive Labs JOHN EXPLAINS

Random Variables Explorer: PMF, PDF & CDF

Slide the two handles to select an interval [a, b]. The top chart shows the PMF (a bar per value) or the PDF (area under a curve), with your interval shaded. The bottom chart shows the matching CDF, F(x) = P(X ≤ x) — a staircase for discrete random variables, a smooth ramp for continuous ones. Watch the probability computed two independent ways always agree.

—
—

Probability Mass Function

Cumulative Distribution Function

F(x) = P(X ≤ x)

F(x) F(a) and F(b), and the gap between them

Selected-interval probability, computed two independent ways

Try Snap b → a on a continuous scenario to see P(X = a) collapse to exactly 0, then try the same snap on a discrete scenario — there, P(X = a) is just p(a), not zero. That contrast is the whole point of Lecture 3.