Learning path

Full curriculum

Full curriculum

Unit content

Discrete random variables and probability mass functions

A discrete random variable takes values in a finite or countable set. Its probability distribution can therefore assign a probability directly to each possible value.

The probability mass function (PMF) of $X$ is

$$p_X(x)=P(X=x).$$

Every mass is nonnegative and the masses over all possible values add to one:

$$p_X(x)\ge0,\qquad \sum_x p_X(x)=1.$$

Example

Let $X$ be the number of heads in two fair coin flips. The possible values are

$$0,1,2,$$

with

$$P(X=0)=\frac14,$$

$$P(X=1)=\frac12,$$

$$P(X=2)=\frac14.$$

Notice that the value $1$ is not one outcome: it represents two underlying outcomes, HT and TH.

Probabilities from the PMF

Probabilities of larger events are found by adding the masses of the included values. For example,

$$P(X\ge1)=P(X=1)+P(X=2)=\frac34.$$

A PMF therefore turns the original sample-space model into a numerical distribution over the values of the random variable.