PMF/CDF Visualizer
Choose a named discrete random variable and adjust its parameters. The plots of its probability mass function and cumulative distribution function update as you go, and the buttons below the plots open tools for computing probabilities and the expected value.
Random Variable
Parameters
Probability mass function
Cumulative distribution function
The probability mass function (PMF), \(P_X(x) = P(X = x)\), gives the probability that a discrete random variable \(X\) takes exactly the value \(x\). The cumulative distribution function (CDF), \(F_X(x) = P(X \le x)\), gives the probability that \(X\) is at most \(x\); it is the running sum of the PMF. The two plots above update together, and any probability you compute is highlighted in both.
Compute probability
=
Pink marks the event: on the left, the PMF values it adds up; on the right, the steps of the CDF for those same values, between the two dashed levels.
Remember: \(X\) is discrete, so \(P_X(x) = 0\) for every \(x\) outside its integer support, while \(F_X(x)\) is defined for every real \(x\), with \(F_X(x) = F_X(\lfloor x \rfloor)\). Non-integer \(a\) and \(b\) are fine: the event keeps only the integers it contains, so \(P(X \le 2.7) = P(X \le 2)\).
Expected value
E[X] =
Blue marks E[X]: on the left, the balance point of the PMF, with a fulcrum under the axis; on the right, a dashed line at the same x.