3.1.3 Probability Mass Function (PMF)
If is a discrete random variable then its range is a countable set, so, we can list the elements in . In other words, we can write
Definition Let be a discrete random variable with range (finite or countably infinite). The function
Thus, the PMF is a probability measure that gives us probabilities of the possible values for a random variable. While the above notation is the standard notation for the PMF of , it might look confusing at first. The subscript here indicates that this is the PMF of the random variable . Thus, for example, shows the probability that . To better understand all of the above concepts, let's look at some examples.
Example
I toss a fair coin twice, and let be defined as the number of heads I observe. Find the range of , , as well as its probability mass function .
- Solution
- Here, our sample space is given by
The number of heads will be $0$, $1$ or $2$. ThusSince this is a finite (and thus a countable) set, the random variable is a discrete random variable. Next, we need to find PMF of . The PMF is defined asWe have
- Here, our sample space is given by
Although the PMF is usually defined for values in the range, it is sometimes convenient to extend the PMF of to all real numbers. If , we can simply write . Thus, in general we can write \begin{equation} \nonumber P_X(x) = \left{ \begin{array}{l l} P(X=x) & \quad \text{if is in } R_X\ 0 & \quad \text{otherwise} \end{array} \right. \end{equation}
To better visualize the PMF, we can plot it. Figure 3.1 shows the PMF of the above random variable . As we see, the random variable can take three possible values $0,1$ and $2$. The figure also clearly indicates that the event is twice as likely as the other two possible values. The Figure can be interpreted in the following way: If we repeat the random experiment (tossing a coin twice) a large number of times, then about half of the times we observe , about a quarter of times we observe , and about a quarter of times we observe .

Fig.3.1 - PMF for random Variable in Example 3.3.
For discrete random variables, the PMF is also called the probability distribution. Thus, when asked to find the probability distribution of a discrete random variable , we can do this by finding its PMF. The phrase distribution function is usually reserved exclusively for the cumulative distribution function CDF (as defined later in the book). The word distribution, on the other hand, in this book is used in a broader sense and could refer to PMF, probability density function (PDF), or CDF.
Example
I have an unfair coin for which , where $0 < p < 1$. I toss the coin repeatedly until I observe a heads for the first time. Let be the total number of coin tosses. Find the distribution of .
- Solution
- First, we note that the random variable can potentially take any positive integer, so we
have . To find the distribution of , we need to
find for . We have
Thus, we can write the PMF of in the following way \begin{equation} \nonumber P_Y(y) = \left{ \begin{array}{l l} (1-p)^{y-1} p& \quad \text{for } y=1,2,3,...\ 0 & \quad \text{otherwise} \end{array} \right. \end{equation}
- First, we note that the random variable can potentially take any positive integer, so we
have . To find the distribution of , we need to
find for . We have
Consider a discrete random variable with Range. Note that by definition the PMF is a probability measure, so it satisfies all properties of a probability measure. In particular, we have
- $0\leq P_X(x) \leq 1$ for all , and
- .
Also note that for any set , we can find the probability that using the PMF
Properties of PMF:
- $0\leq P_X(x) \leq 1$ for all ;
- ;
- for any set .
Example
For the random variable in Example 3.4,
- Check that .
- If , find .
- Solution
- In Example 3.4, we obtained
Thus,
to check that , we have
; if , to find P, we can write
.
- In Example 3.4, we obtained
