Discrete Random Variables
When you roll two dice, you usually care about one number: the sum. A random variable turns each outcome of an experiment into a number like that, so you can organize all the probabilities in one table or graph. This idea is the starting point for everything else in this unit: expected value, the binomial distribution, and the hypergeometric distribution.
Key ideas
Section titled “Key ideas”Random variables
Section titled “Random variables”A random variable is a variable whose value is a number decided by the outcome of an experiment. We name it with a capital letter, like , and write its possible values in lower case, like .
- Roll two dice and let be the sum. The possible values are .
- Flip a coin times and let be the number of heads. The possible values are .
A random variable is discrete if you can list its values (usually whole numbers you get by counting). Measured quantities like time or mass are continuous; they come later, in continuous random variables.
means “the probability that takes the value ”. For two dice, .
Probability distributions
Section titled “Probability distributions”A probability distribution of matches each value with its probability . You can think of it as a mapping , and it’s usually shown in a table:
Every probability distribution has two properties:
- each probability is between and : ;
- the probabilities add to : .
(The symbol , the Greek capital sigma, means “add up all of these”.)
Building a distribution
Section titled “Building a distribution”Without technology: list the sample space (with a table or tree diagram), find the value of for each outcome, then count. The sums table on probability and sample spaces gives the two-dice distribution above.
With technology: a spreadsheet makes the counting quick. List all pairs of dice in two columns, add them in a third column, then use COUNTIF to count how many times each sum appears and divide by . You can also simulate: =RANDBETWEEN(1,6)+RANDBETWEEN(1,6) copied down rows gives an experimental distribution that should come out close to the theoretical one.
Probability histograms
Section titled “Probability histograms”A probability histogram is a bar graph of a distribution:
- each value gets a bar of width , centred on (so the bar for runs from to );
- the bar’s height is ;
- the bars touch, because the values are consecutive whole numbers.
Since each bar has width , its area equals its probability, and the total area of all the bars is .
A frequency histogram looks similar but shows what actually happened in an experiment: bar heights are counts (or relative frequencies). It changes every time you repeat the experiment. A probability histogram shows what should happen in theory. With more and more trials, a relative frequency histogram gets closer and closer to the probability histogram.
The uniform distribution
Section titled “The uniform distribution”A random variable has a uniform distribution if all its values are equally likely:
Rolling one fair die is uniform with : each value has probability . Its probability histogram is six bars of the same height, a flat “rectangle” shape.
To count the values from to (whole numbers), use . The numbers to have values; the numbers to have .
Worked examples
Section titled “Worked examples”Example 1: Using the two-dice distribution
Section titled “Example 1: Using the two-dice distribution”Let be the sum of two fair dice. Use the table above to find and .
Solution. Add the probabilities of the values that fit.
On the histogram, these are the total areas of the bars for to , and for to .
Example 2: Building a distribution by hand
Section titled “Example 2: Building a distribution by hand”A bag holds red and blue marbles. Two are drawn without replacement, and is the number of red marbles drawn. Make the probability distribution of .
Solution. Use the tree diagram from independent and dependent events. The four paths are RR, RB, BR, BB.
- : only BB, so .
- : RB or BR, so .
- : only RR, so .
Check: . ✓
Example 3: A uniform distribution
Section titled “Example 3: A uniform distribution”At a school assembly, one ticket is drawn at random from tickets numbered to . Let be the number drawn. Find , , and .
Solution. All numbers are equally likely, so is uniform with .
The multiples of are : six values.
The values greater than are to , which is values.
Example 4: Frequency versus probability
Section titled “Example 4: Frequency versus probability”Two coins are flipped times, and is the number of heads each time. The results were: heads times, head times, heads times. Compare the relative frequencies with the theoretical probabilities.
Solution. The sample space is HH, HT, TH, TT, so the theoretical distribution is , , .
| Frequency | |||
| Relative frequency | |||
| Probability |
The frequency histogram has the same general shape (tallest in the middle), but the heights don’t match exactly. That’s normal for only trials. With thousands of trials, the relative frequencies would get very close to , , .
Common mistakes
Section titled “Common mistakes”Assuming every value of X is equally likely. The sums of two dice go from to , but they are not uniform. Only use when each value really is equally likely, like one fair die.
Forgetting to check that the probabilities add to 1. If your table adds to or , a value is missing or a probability is wrong. Check every distribution you build.
Miscounting the values from a to b. From to there are whole numbers, not . Use .
Drawing histogram bars in the wrong place. In a probability histogram, the bar for goes from to , centred on , with height . The bars touch.
Treating experimental results as the theoretical distribution. A frequency histogram from a small experiment is only an estimate. The probability histogram comes from the sample space, not from data.
Practice
Section titled “Practice”1. (Warm-up) Is each random variable discrete or continuous?
- (a) the number of texts you get in a day
- (b) the time it takes to get to school
- (c) the number of heads in coin flips
- (d) the mass of your backpack
Solution
(a) Discrete. (b) Continuous. (c) Discrete. (d) Continuous.
2. (Warm-up) Is this a valid probability distribution? Explain.
Solution
No. Each probability is between and , but they add to , not .
3. (Warm-up) A spinner has equal sections numbered to , and is the number spun. Write the distribution of in words, and find .
Solution
is uniform: for . The values give:
4. (Core) A random variable has this distribution. Find , then find .
Solution
The probabilities add to : , so .
5. (Core) A coin is flipped times, and is the number of heads. Make the probability distribution of , and find .
Solution
There are equally likely outcomes. Counting the outcomes with each number of heads (from a tree diagram, or row of Pascal’s triangle) gives .
6. (Core) Two dice are rolled, and is the difference between the larger and smaller numbers ( for doubles). Make the probability distribution of . Which value is most likely?
Solution
Make a table of differences and count each value:
Check: . ✓ The most likely difference is .
7. (Core) A die is rolled times with these results:
| Face | ||||||
|---|---|---|---|---|---|---|
| Frequency |
- (a) Find the relative frequency of each face, to decimal places.
- (b) Describe the probability histogram for a fair die, and how the frequency histogram differs from it.
- (c) What would you expect to see if the die were rolled times?
Solution
(a) Divide each count by : , , , , , .
(b) The probability histogram is uniform: six touching bars, each of height . The relative frequency histogram is bumpy: some bars are above (faces , , ) and some below (faces , , ).
(c) The relative frequencies would all be much closer to , so the frequency histogram would look almost flat, like the probability histogram.
8. (Challenge) You roll a die until you get a , but you stop after rolls no matter what. Let be the number of rolls you make. Find the probability distribution of .
Solution
- : the first roll is a , so .
- : not a , then a , so .
- : the first two rolls aren’t s (the third roll happens whatever it shows), so .
Check: . ✓
9. (Challenge) A computer picks a two-digit whole number at random (from to , all equally likely). Find the probability that its digits add up to .
Solution
This is a uniform distribution with values. The numbers whose digits add to are : nine of them.
Homework
Section titled “Homework”Try these independently after the practice questions. Show your setup and explain your reasoning. Use exact answers where possible, and check that your answers fit the question. Homework solutions are not provided on the published site.
Foundations
Section titled “Foundations”H1. Define a numerical variable. Explain why “the colour spun” is not itself a numerical random variable. Define a discrete random variable for whether a spinner lands on red, and list its values. Classify the exact unrounded mass of a parcel and the number of parcels delivered as continuous or discrete.
H2. Check distributions. A variable takes values with probabilities . Find and check both distribution rules. Another proposed distribution has probabilities : is it valid even though they sum to 1?
H3. Uniform integers. Choose an integer uniformly from 12 to 35 inclusive. Write the distribution in words. Find the probability of a multiple of 5 and of a value from 18 to 24 inclusive.
H4. Coin scores. Flip a fair coin three times independently. Score 2 points for each head and lose 1 point for each tail. Let be the total score. List the possible scores and their probabilities, and find .
H5. Marbles as a variable. Draw two marbles without replacement from a bag of four red and two blue. Let count the reds. Build the full probability distribution and check its sum. Sketch a probability histogram with bars of width 1 centred at each value; explain why the total area is 1.
H6. Data versus theory. A spinner has four equal sectors labelled . In 120 spins, the frequencies of are . Find the relative-frequency distribution to four decimal places and the theoretical distribution. Explain why neither the labels nor the observed frequencies give a uniform theoretical distribution.
Challenge
Section titled “Challenge”H7. A stopping rule. Flip a fair coin until the first head, but stop after four flips even if no head appears. Let be the number of flips made. Make its probability distribution. Explain why the probability of does not require the fourth flip to be heads.
H8. Products from spinners. Spin two fair spinners labelled independently and let be the product. Use all 16 ordered outcomes to make the distribution of . Find and the most likely value. Is the product uniform?
H9. A descending distribution. For , a distribution is defined by .
- (a) Find , and write the full probability table.
- (b) Find and .
- (c) Sketch the histogram, state its tallest bar, and use bar areas to check the total probability.
H10. Transforming a die. Roll a fair die and let be the result. Define . Make a table mapping every value of to , then give the distribution of . Explain why a function of a uniform variable need not be uniform.