7 Probability Mass Functions
- The (probability) distribution of a collection of random variables identifies the possible values that the random variables can take and their relative likelihoods.
- We will see many ways of describing a distribution, depending on how many random variables are involved and their types (discrete or continuous).
- The probability distribution of a single discrete random variable \(X\) is often displayed in a table containing the probability of the event \(\{X=x\}\) for each possible value \(x\).
- In some cases, a distribution has a “formulaic” shape. For a discrete random variable \(X\), the probability mass function (pmf) \(p_X\) expresses \(\text{P}(X=x)\) as a function of \(x\): \(p_X(x) = \text{P}(X = x)\).
- Be sure to specify the possible values of the random variable!
Example 7.1 Continuing Example 6.1. Roll a four-sided die twice, and record the result of each roll in sequence. Let \(X\) be the sum of the two dice, and let \(Y\) be the larger of the two rolls (or the common value if both rolls are the same). Assume the die is fair and the rolls are independent.
Verify that the pmf of \(X\) is \[ p_X(x) = \frac{4 - |x - 5|}{16}, \qquad x = 2, 3, \ldots, 8 \]
Example 7.2 Suppose a very large number of applicants have applied for a job, and you’ll interview one applicant at a time until you find one that is qualified, whom you’ll hire, and then you stop interviewing people. Let \(X\) be the total number of applicants interviewed (including the hire)
Assume that 30% of applicants are qualified, and applicants are interviewed one at a time in random order, independently.
- Compute \(\text{P}(X = 1)\).
- Compute \(\text{P}(X = 2)\).
- Compute \(\text{P}(X = 3)\).
- Compute \(\text{P}(X = 4)\).
- Specify the probability mass function of \(X\).
- In a sequence of Bernoulli(\(p\)) trials
- There are only two possible outcomes, “success” (1) or not (0, “failure”), on each trial.
- The unconditional/marginal probability of success is the same on every trial, and equal to \(p\).
- The trials are independent.
- Perform Bernoulli(\(p\)) trials until a success occurs and then stop. Let \(X\) count the total number of trials, including the single success. The distribution of \(X\) is defined to be the Geometric(\(p\)) distribution.
- A discrete random variable \(X\) has a Geometric(\(p\)) distribution if and only if its probability mass function is \[\begin{align*} p_{X}(x) & = p (1-p)^{x-1}, & x=1, 2, 3, \ldots \end{align*}\]
- The Geometric(\(p\)) probability mass function follows from the fact that if \(X\) has a Geometric distribution, then \(X = x\) if and only if
- the first \(x-1\) trials are failures, and
- the \(x\)th (last) trial results in success.
Example 7.3 Randomly select a county in the U.S. Let \(X\) be the leading digit in the county’s population. For example, if the county’s population is 10,040,000 (Los Angeles County) then \(X=1\); if 3,170,000 (Orange County) then \(X=3\); if 283,000 (SLO County) then \(X=2\); if 30,600 (Lassen County) then \(X=3\). The possible values of \(X\) are \(1, 2, \ldots, 9\). You might think that \(X\) is equally likely to be any of its possible values. However, a more appropriate model is to assume that \(X\) has pmf \[ p_X(x) = \begin{cases} \log_{10}(1+\frac{1}{x}), & x = 1, 2, \ldots, 9,\\ 0, & \text{otherwise} \end{cases} \] This distribution is known as Benford’s law.
- Construct a table specifying the distribution of \(X\), and the corresponding spinner.
- Find \(\text{P}(X \ge 3)\)
- Certain common distributions have special names and properties.
- Learn to identify these special situations and use their “shortcut” formulas.
7.1 Exercises
Exercise 7.1 Continuing Example 7.1. Is the following the pmf of \(Y\)? Discuss. \[
p_Y(u) = \frac{2u - 1}{16}
\]
Exercise 7.2 Shishito peppers are typically relatively mild, but about 10% are spicy. Suppose you eat Shishito peppers one at a time until you eat a spicy one and then you stop. Let \(X\) be the total number of peppers you eat (including the spicy one).
- Explain why it is reasonable to assume eating the peppers constitutes a sequence of Bernoulli trials.
- Describe in full detail how you could use simulation to approximate the distribution of \(X\).
- Identify the distribution of \(X\) by name, including the values of any relevant parameters.
- Specify the probability mass function of \(X\).
- Make a table representing the distribution of \(X\). (You can cut it off after the probabilities get small.)
- Compute \(\text{P}(X>10)\) without summing terms.
Exercise 7.3 Recall the matching problem from Example 6.3 with a general \(n\) and let \(X\) be the number of matches. Finding the distribution of \(X\) by enumerating the \(n!\) possible outcomes as we did for \(n=3\) is not feasible in general. But we can approximate the distribution of \(X\) with simulation, as we did in an earlier exercise using this applet. Simulation shows that the distribution of the number of matches \(X\) is approximately the same for all \(n\) (unless \(n\) is very small, i.e., \(n\le 5\)). In particular, for any \(n>5\), the probability mass function of \(X\) is approximately \[ p_X(x) = \frac{e^{-1}}{x!}, \qquad x = 0, 1, 2, \ldots \]
We will study where this distribution—called the Poisson(1) distribution—comes from in more detail later. For now we’ll just use the pmf formula.
- Construct a table, plot, and spinner corresponding to the above pmf. Compare to the simulation results for general \(n\).
- Use the pmf to approximate the probability of at least one match, and compare to the simulation results for general \(n\).
- Interpret the probability both as a long relative frequency and as a relative likelihood.