Sub topic 1
What a Random Variable Is
A random variable is a rule that assigns a numerical value to each possible outcome of a random process. The word “random” means that the value is not known before the process occurs. The word “variable” means that the value can change from one trial to another.
For example, roll a fair six-sided die once. The outcome is one of the numbers \(1,2,3,4,5,6\). Let \(X\) be the number shown. Then \(X\) is a random variable.
The die roll already produces numbers, so the rule is direct:
- If the outcome is 1, then \(X=1\).
- If the outcome is 4, then \(X=4\).
- If the outcome is 6, then \(X=6\).
A random variable does not have to equal the original outcome. Suppose you roll two dice and let \(Y\) be the sum. The underlying outcome could be \((2,5)\), but the random variable gives \(Y=7\). Several outcomes can produce the same value of a random variable.
Prerequisites
You should be comfortable with basic probability, fractions, percentages, averages, and reading a number line. You should also understand that the probabilities of all mutually exclusive possible outcomes add to 1.
The working model
To analyze a random variable, identify three parts:
- The random process, such as rolling dice or selecting a student.
- The possible outcomes of that process.
- The numerical value assigned to each outcome.
Consider selecting one person from a group and recording the number of siblings that person has. Let \(S\) be the number of siblings. The possible values might be \(0,1,2,3,\ldots\). The person selected is random, so the value of \(S\) is uncertain before selection.
A random variable is usually written with a capital letter, such as \(X\) or \(S\). A particular observed value is written with a lowercase letter, such as \(x=4\). The statement \(P(X=4)\) means “the probability that the random variable \(X\) equals 4.”
Discrete and continuous values
A discrete random variable has separate, countable possible values. The number of defective items in a sample is discrete because the count must be a whole number.
A continuous random variable can take any value in an interval. A runner’s finishing time could be 18.2 seconds, 18.21 seconds, or a value between them. Height, temperature, and measurement errors are common continuous examples.
This distinction matters because a discrete variable can assign positive probability to an individual value, such as \(P(X=3)\). For a continuous variable, the probability of one exact measurement is generally treated as 0. Probabilities for continuous variables describe intervals, such as \(P(18<X<20)\).
| Situation | Random variable | Type |
|---|---|---|
| Number of heads in five coin tosses | \(X\) | Discrete |
| Waiting time for a bus | \(T\) | Continuous |
| Sum of two dice | \(Y\) | Discrete |
Common errors
Do not confuse a random variable with the process that generates it. “Rolling two dice” is the process; “the sum of the two dice” is a random variable.
Do not assume that every possible value is equally likely. For two dice, sums from 2 through 12 are possible, but a sum of 7 has more ways to occur than a sum of 2.
Do not treat a continuous variable as if it only takes rounded values. A recorded height of 172 cm may represent an underlying measurement such as 171.64 cm.
Exercise
Two coins are tossed. Let X be the number of heads. Is X discrete or continuous, and what values can X take?
Show answer
X is discrete because it counts heads. Its possible values are 0, 1, and 2.