Probability mass function explained using fair die example, mapping each outcome to its probability P(X = x)

What is a Probability Mass Function?

If $X$ is a discrete random variable, we can list the values it takes.

If $x$ is one of these values, the probability $X$ takes that value is $\mathbb{P}(X=x)$.

This defines a function from $x$ to $\mathbb{P}(X=x)$; the probability mass function of $X$.

The PMF of $X$ gives its “personality”, or typical behaviour. It used to uncover further features of $X$ as a random variable, such as its expectation.

Background: