4.14 Discrete and continuous random variables
Studying this course? Keep your progress in one place.
Key facts
- Discrete: , .
- and .
- A pdf has and total area 1; probabilities are integrals.
- Mode: the maximum of . Median: the area up to is .
- Continuous mean and variance: and .
Mean and variance of a discrete variable
Weight each value, and each squared value, by its probability; variance is .
The standard deviation is . Square each value before weighting it when finding .
The expected value is the long-run mean, and the variance measures spread about it.
- Mean
- Mean of squares
- Variance
Worked example
. Find and .
- 1
.
- 2
.
- 3
.
and . What is ?
Linear transformations and fair games
Adding shifts the mean only; multiplying by scales the mean by and the variance by .
Adding shifts every value, so it changes the mean but not the spread. Multiplying by scales the standard deviation by and the variance by . This is a linear transformation.
A game is fair if the player's expected gain is 0.
- X
- Y = 2X + 3
- Mean
- Variance
Worked example
A player pays 8 dollars and wins 5 dollars per point scored, , where . Is the game fair?
- 1
The gain is .
- 2
.
- 3
.
. What is ?
Continuous variables and pdfs
A function with non-negative values and total area 1, where areas give probabilities.
A continuous random variable is described by a probability density function . Probabilities are areas: . For any single value , so and give the same probability.
A pdf may be piecewise: integrate each piece over its own interval and add. To find an unknown constant, set the total integral equal to 1.
- Non-negative for all
- Total area
Worked example
on and on . Find .
- 1
First piece: .
- 2
Second piece: .
- 3
Total area is 1: .
Is for a continuous random variable equal to ?
Mode and median
The mode is where is greatest; the median is where the area to its left is one half.
The mode is the where is greatest. Differentiate and check for a maximum, and compare with the endpoints. For on , gives the mode .
The median has area to its left. For a piecewise pdf, first find which piece contains by working out the probability of the first piece. If the equation gives two roots, reject the one outside the domain.
- Median m
Why is the median of the piecewise pdf above greater than 2?
Mean and variance of a continuous variable
Replace sums by integrals over the interval where .
Replace sums by integrals. In practice you only integrate over the interval where . The linear transformation rules hold for continuous variables too.
On Paper 2 you may use a GDC to evaluate these integrals, but write down the integral you are evaluating to earn the method mark.
- Mean
- Mean of squares
- Variance
Worked example
on . Find and , then and for .
- 1
.
- 2
.
- 3
.
- 4
.
- 5
.
Which formula gives for a continuous variable?
Try an exam question
The continuous random variable has probability density function for , and 0 otherwise. Find (a) , (b) .
[4 marks]
- [1].
- [1].
- [1].
- [1].
That's the notes covered.
Carry on to the next subtopic.
Try a question
Find .
1 mark, marked against the mark scheme
Find .
1 mark, marked against the mark scheme