Example 1: We roll a fair die, X is the number shown on the die
Example 2: We roll two fair dice, X is the sum of the dice
Example 3: We roll two fair dice, X is the absolute difference of the dice
Example 4: We roll two fair dice, X is the number of "sixes"
Example 5: We randomly choose 10 employees of WRInc, X is the number of employees in the sample with a job level of 1
Example 1 above: X takes one of the values {1,2,3,4,5,6}, so if we had 1000 observations drawn from this rv it would be only these numbers, repeated many times.
Example 6: We repeatedly roll a fair die. X is the number of rolls needed until the first "six", then X takes one of the values {1,2,3, ...}
Here theoretically X can take any (integer) value, but in practise we will only ever see a few of them (1-10 or so), and these would repeat many times.
The probability mass function (pmf) of a discrete random variable X is a list of the values that X takes and their respective probabilities.
Example 1 above:
| x | 1 | 2 | 3 | 4 | 5 | 6 |
| P(x) | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 |
Example 4 above:
| x | 0 | 1 | 2 |
| P(x) | 25/36 | 10/36 | 1/36 |
Notice: the probabilities always sum up to 1!
Example We randomly select 2 employees of WR Inc. Let the random variable X be the nuber of females selected. Find the pmf of X.
What are the possible values of X? 0, 1 and 2 (none, exactly one and two females). What are the probabilities of these outcomes?
P(X=0) = P(both people selected are male) = P(first is male and second is male) = P(first is male)P(second is male|first is male) = 321/527·320/526 = 0.3706
P(X=2) = P(both people selected are female) = P(first is female and second is female) = P(first is female)P(second is female|first is female) = 206/527·205/526 = 0.1523
So we get the following table:
| x | 0 | 1 | 2 |
| P(x) | 0.3706 | 0.1523 |
| x | 0 | 1 | 2 |
| P(x) | 0.3706 | 0.4771 | 0.1523 |