Conditional Probability Function
Study guide: Exam P-1
A Conditional Probability Function gives the distribution of one random variable given the value of another. The conditional probability function of X given Y = y is
f_{X \mid Y}(x \mid y) = \frac{f(x, y)}{f_Y(y)}
f(x, y)is the joint probability function ofXandY.f_Y(y) > 0is the marginal probability thatY = y.
For continuous random variables, the same formula divides the joint density by the marginal density. It is conditional probability applied to every value of X at once.
The idea Knowing
Y = yleaves only the slice of the joint distribution at thaty, and dividing by the slice's total makes it add to 1.
XandYare the numbers of auto and home claims, with the joint probability function below. Given one auto claim, what is the distribution of home claims? The joint probability function:
Y = 0Y = 1Y = 2X = 00.30 0.15 0.05 X = 10.20 0.20 0.10
- Only the row
X = 1can still happen. It adds tof_X(1) = 0.50.- Dividing each value by 0.50 gives 0.40, 0.40 and 0.20.
- So
P(Y = 2 \mid X = 1) = 0.20, and the three probabilities add to 1.
Dividing by the wrong total
P(Y = 2 \mid X = 1)divides byf_X(1) = 0.50, the total of the row that is given. Dividing byf_Y(2) = 0.15gives\frac{0.10}{0.15} = 0.67, which answers the reverse question,P(X = 1 \mid Y = 2).
Conditioning on an event
The conditional probability function of X given an event E is
P(X = x \mid E) = \frac{P(X = x \text{ and } E)}{P(E)}
When E is a condition on X alone, the numerator is P(X = x) for each x in E and 0 otherwise.
A fair die is rolled. Given that the roll is at least 4, what is the distribution of the roll
X?
- The event "at least 4" has probability
\frac{3}{6} = \frac{1}{2}.- For
x = 4, 5, 6,P(X = x \mid X \ge 4)is\frac{1/6}{1/2} = \frac{1}{3}.- For
x = 1, 2, 3the conditional probability is 0.
The conditional mean
A conditional distribution has its own mean:
E[Y \mid X = x] = \sum_y y\, f_{Y \mid X}(y \mid x)
How the conditional means and variances combine into the overall variance is on Variance for Conditional and Marginal Distributions.
For the auto and home claims above, what is the expected number of home claims given one auto claim?
- Given
X = 1,Yis 0, 1 or 2 with probabilities 0.40, 0.40 and 0.20.E[Y \mid X = 1]is1(0.40) + 2(0.20) = 0.80.
Continuous random variables
For a joint density, the conditional density lives on the slice of the support at the given value, not on the whole range. A constant factor of f(x, y) cancels between the numerator and the denominator.
XandYhave joint densityf(x, y) = 6xfor0 < x < y < 1. What is the conditional density ofXgivenY = y, and its mean?
- For a fixed
y,xruns from 0 toy, sof_Y(y) = \int_0^y 6x\, dx = 3y^2.- The conditional density is
\frac{6x}{3y^2} = \frac{2x}{y^2}for0 < x < y.- Its mean is
E[X \mid Y = y] = \int_0^y x \cdot \frac{2x}{y^2}\, dx = \frac{2y}{3}
Practice questions
- SOA Exam P Sample Question 82
- SOA Exam P Sample Question 83
- SOA Exam P Sample Question 89
- SOA Exam P Sample Question 110
- SOA Exam P Sample Question 150
- SOA Exam P Sample Question 172
- SOA Exam P Sample Question 173
- SOA Exam P Sample Question 338
- SOA Exam P Sample Question 382
- SOA Exam P Sample Question 457
- SOA Exam P Sample Question 476
- SOA Exam P Sample Question 520
- Exam P Practice Question 908
- Exam P Practice Question 939
- Exam P Practice Question 954
- Exam P Practice Question 6