If the possible values of a random variable are discrete, then the is a discrete random variable. The populations in Examples 6.2.1, 6.2.2, and 6.2.2 are all discrete.
If the values possible values of a discrete random variable are then we will write
For example, if is the outcome of rolling a standard 6-sided die, then we could write The notation would denote the event that the outcome of a roll is 2.
With a discrete random variable the manner in which probabilities of outcomes is described works as follows: for each possible value of the probability of observing is denoted by i.e.,
| (7.1) |
The function in Equation 7.1 is called a probability mass function (pmf), and Equation 7.1 can be read as “the probability of observing the value is ”
For the function to be a proper pmf, the following must hold:
For each possible value of
The sum of all of the probabilities must be exactly 1, i.e., if then
For example, suppose is the outcome of rolling a fair 6-sided die. Then etc. Discrete random variables and their corresponding pmf’s can be displayed nicely with a table. With this for example, this table completely describes the random variable:
| X | P(X=x) |
|---|---|
| 1 | 1/6 |
| 2 | 1/6 |
| 3 | 1/6 |
| 4 | 1/6 |
| 5 | 1/6 |
| 6 | 1/6 |
Additionally, a discrete random variable distribution can be graphed as follows: at each location along the horizontal axis, draw a stick with height equal to In Excel, the table and graph will could look like Figure 7.1.
Lastly, the probability notation introduced is handy. For example, suppose is the outcome of rolling a fair 6-sided die. The symbol denotes the probability that a roll results in a 3 or less, i.e., it is the probability of rolling a 1, 2, or 3. In this case, we would have
A fair coin is flipped 4 times, and let be the proportion of heads observed. Use a simulation to estimate
A fair 4-sided die has faces marked as 1, 3, 7 and 9, respectively. Let denote the outcome of a single roll. In Excel, enter the distribution of as a table, and then create a graph that displays the distribution.
A fair 4-sided die has faces marked as 1, 3, 7 and 9, respectively. The die is rolled twice, and represents the sum of the two rolls. Use a simulation to estimate
We will use discrete random variables principally for simulating taking samples from known populations. However, if you are studying a discrete random variable and if you happen to know exactly the corresponding pmf, then you can calculate the mean of the population as follows. Suppose and Then
| (7.2) |
In words, here’s what you do: for each possible value multiply it by its corresponding probability and then add up all of those products. That gives the mean 2727If the number of possible values of is infinite, then the sum 7.2 (and hence the mean) might not exist. Tackling infinite sums is a problem introduced in calculus.
Consider the discrete random variable which is the outcome of rolling a fair 6-sided die:
To compute for each compute in the adjacent column:
Then compute the sum of the entries:
As expected, the average roll of a fair 6-sided die is 3.5.
The upshot is that there are a number of simulations in this text where you can calculate the exact value of a population mean directly, namely those that use a random variable that has only finitely many values.
The variance of a discrete random variable is computed similarly. The most computationally friendly formula is follows. If random variable has pmf then
| (7.3) |
Taking the square-root of Equation 7.3 gives the standard deviation.
The calculation is demonstrated in Figure 7.3.