A discrete random variable is a random variable for which there exists set \(D\) satisfying
Example: Suppose we flip a fair coin 3 times. The outcome of a flip is heads (H) or tails (T). The state space is
\[\Omega = \{HHH, HHT, HTH, HTT, THH, THT, TTH, TTT\}\]
Since the coin is fair, every outcome is equally likely. There are 8 outcomes, so the probability measure is \(P(\omega) = 1/8\) for every outcome \(\omega \in \Omega.\)
Let \(X\) be the number of heads flipped. Then \(X\) is a function from \(\Omega\) to \(\mathbb{R}.\) For example, \(X(TTH) = 1\) since there is one heads in \(TTH.\) Similarly, \(X(HHH) = 3\) since there are 3 heads in \(HHH.\)
Example: Flip a coin over and over until a tails comes up. Let \(X\) be the number of heads. The values on which \(X\) has non-zero probability is \[S = \{0, 1, 2, 3, \dots\}\] The space on which \(X\) is non-zero is infinite, but it is discrete. We can compute the probability that \(X\) is even by summing over all even values in \(S.\) Let \(A\) be the event "\(X\) is even." \begin{align} P(A) & = \sum_{i = 0}^\infty P(X = 2i) \\ & = \sum_{i = 0}^\infty \frac{1}{2^{2(i+1)}} \\ & = \frac{1}{2}\sum_{i = 0}^\infty \frac{1}{4^i} \\ & = \frac{1}{2} \cdot \frac{1}{1 - 1/4} \\ & = \frac{1}{2} \cdot \frac{4}{3} \\ & = \frac{2}{3} \end{align} There is a \(2/3\) chance that the number of heads is even.
Example: A bet is made in which the better may lose or win money. Let \(X\) be the amount of money the better wins, where a negative amount represents a loss. \begin{align} & P(X = 2.50) = 0.5 \\ & P(X = -1.15) = 0.25 \\ & P(X = -3.41) = 0.25 \\ \end{align} The probability that the better loses money is \[P(X < 0) = P(X = -1.15)+P(X = -3.41) = 0.25 + 0.25 = 0.5\] The take away from this example is that the values a discrete random variable takes are real values. They can be negative and non-integers.
The probability mass function of a random variable \(X\) is \[p(x) = P(X = x)\] If there are more than one discrete random variables, then subscripts are used to indicate the random variable. \[p_X(x) = P(X = x)\] The probability mass function is called the pmf for short.
Example: If a coin is flipped two times and \(X\) is the number of heads, then \begin{align} & P(X = 0) = \frac{1}{4} \\ & P(X = 1) = \frac{1}{2} \\ & P(X = 2) = \frac{1}{4} \end{align} The pmf of \(X\) is a slightly more concise way of writing this information. The pmf of \(X\) is \begin{align} & p(0) = \frac{1}{4} \\ & p(1) = \frac{1}{2} \\ & p(2) = \frac{1}{4} \end{align}
The pmf of a random variable \(X\) must satisfy certain properties since it represents a probability.
Check your understanding:
1. Which of these could be a pmf of a random variable?
Unanswered
2. A random variable \(X\) has the following distribution: \[P(X = 0) = 0.1, P(X = 1) = 0.3, P(X = 2) = 0.2, P(X = 3) = 0.4\] What is \(P(X > 1)?\)
Unanswered
3. Let \(O = \{1, 3, 5, 7, \dots\}\) be the set of positive odd integers, and let \(X\) be a discrete random variable with pmf \(p(x).\) Which computes \(P(X \in O)?\)
Unanswered
4. There is a game with \(4\) levels in which players progress from one level to the next. Players who are on level 2 have a blue star. Players who are on level 3 have an orange star. Players who are on level 4 have a silver star. Players who have passed all 4 levels have a gold star.
The players who have accounts have the following stats: