PROBABILITY 06
Random Variables
A random variable converts outcomes of a random experiment into numerical values.
The definition
A random variable is a function from the sample space to numbers:
The randomness comes from which outcome occurs; once the outcome is known, the value of \(X\) is determined.
1. Example
Toss two coins and let \(X\) be the number of heads. Then
\[X(HH)=2,\quad X(HT)=1,\quad X(TH)=1,\quad X(TT)=0.\]Thus \(X\) can take the values \(0,1,2\).
2. Uppercase and lowercase notation
We usually use an uppercase letter \(X\) for the random variable and lowercase \(x\) for a possible realised value.
For example,
\[P(X=x)\]means the probability that \(X\) takes the value \(x\).
3. Discrete random variables
A discrete random variable takes a finite or countable set of possible values, such as a number of infections or number of successes.
4. Continuous random variables
A continuous random variable can take values over an interval, such as waiting time or temperature.
5. Distribution
The probability distribution tells us how probability is assigned across the possible values of \(X\).
6. Why random variables matter
They allow uncertainty to be studied using algebra and calculus. Expectation, variance, covariance and stochastic processes are all built from random variables.