Multivariate Probability Distributions
After completing this chapter, you will be able to:
Define and compute joint probability distributions (discrete and continuous)
Derive marginal distributions from joint distributions
Compute conditional distributions and conditional expectations
Determine whether random variables are independent
Calculate covariance and correlation between random variables
Find the expected value and variance of linear combinations of random variables
Prerequisites: Chapters 4–5. Builds on: PMFs, PDFs, CDFs, expected values, named distributions.
Content current as of April 2026.
Portfolio Risk. An investor holds two stocks. Stock A has an expected annual return of 12% with a standard deviation of 20%. Stock B has an expected return of 8% with a standard deviation of 15%. The investor puts 60% in A and 40% in B. What is the expected return and risk (standard deviation) of the portfolio?
If the stocks move independently, the answer is one number. If they tend to rise and fall together (positive correlation), the portfolio is riskier. If they move in opposite directions (negative correlation), the portfolio is safer — diversification works.
To answer this question precisely, we need to describe the joint behavior of two random variables simultaneously. That is what this chapter is about. Every concept from Chapters 4 and 5 — expected value, variance, distributions — generalizes from one variable to many.
1 Joint Probability Distributions ¶ Until now, every probability distribution we studied described a single random variable. But real-world problems almost always involve multiple random variables observed together. A medical study records both blood pressure and cholesterol. A manufacturer measures both length and diameter of each part. A portfolio tracks returns on multiple stocks simultaneously.
A joint distribution describes the probability behavior of two or more random variables considered together. It tells us not just about each variable individually, but about how they relate to each other.
1.1 Discrete Case ¶ If Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 are discrete random variables, their joint PMF is
p ( y 1 , y 2 ) = P ( Y 1 = y 1 , Y 2 = y 2 ) p(y_1, y_2) = P(Y_1 = y_1, Y_2 = y_2) p ( y 1 , y 2 ) = P ( Y 1 = y 1 , Y 2 = y 2 ) for every pair ( y 1 , y 2 ) (y_1, y_2) ( y 1 , y 2 ) . The joint PMF must satisfy:
p ( y 1 , y 2 ) ≥ 0 p(y_1, y_2) \geq 0 p ( y 1 , y 2 ) ≥ 0 for all ( y 1 , y 2 ) (y_1, y_2) ( y 1 , y 2 )
∑ y 1 ∑ y 2 p ( y 1 , y 2 ) = 1 \displaystyle\sum_{y_1}\sum_{y_2} p(y_1, y_2) = 1 y 1 ∑ y 2 ∑ p ( y 1 , y 2 ) = 1
EXAMPLE: Smartphone Defects. A quality inspector checks smartphones for two types of defects: screen defects (Y 1 Y_1 Y 1 ) and battery defects (Y 2 Y_2 Y 2 ). Each phone has 0 or 1 of each type. The joint distribution is:
y 2 = 0 y_2 = 0 y 2 = 0 y 2 = 1 y_2 = 1 y 2 = 1 Row Total y 1 = 0 y_1 = 0 y 1 = 0 0.80 0.05 0.85 y 1 = 1 y_1 = 1 y 1 = 1 0.10 0.05 0.15 Col Total 0.90 0.10 1.00
Reading: p ( 0 , 0 ) = 0.80 p(0, 0) = 0.80 p ( 0 , 0 ) = 0.80 means 80% of phones have neither defect. p ( 1 , 1 ) = 0.05 p(1, 1) = 0.05 p ( 1 , 1 ) = 0.05 means 5% have both.
1.2 Continuous Case ¶ If Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 are continuous random variables, their joint PDF f ( y 1 , y 2 ) f(y_1, y_2) f ( y 1 , y 2 ) satisfies:
f ( y 1 , y 2 ) ≥ 0 f(y_1, y_2) \geq 0 f ( y 1 , y 2 ) ≥ 0 for all ( y 1 , y 2 ) (y_1, y_2) ( y 1 , y 2 )
∫ − ∞ ∞ ∫ − ∞ ∞ f ( y 1 , y 2 ) d y 1 d y 2 = 1 \displaystyle\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} f(y_1, y_2)\, dy_1\, dy_2 = 1 ∫ − ∞ ∞ ∫ − ∞ ∞ f ( y 1 , y 2 ) d y 1 d y 2 = 1
Probabilities are computed as double integrals:
P ( ( Y 1 , Y 2 ) ∈ A ) = ∬ A f ( y 1 , y 2 ) d y 1 d y 2 P((Y_1, Y_2) \in A) = \iint_A f(y_1, y_2)\, dy_1\, dy_2 P (( Y 1 , Y 2 ) ∈ A ) = ∬ A f ( y 1 , y 2 ) d y 1 d y 2 A double integral ∫ ∫ f ( y 1 , y 2 ) d y 1 d y 2 \int\int f(y_1, y_2)\, dy_1\, dy_2 ∫∫ f ( y 1 , y 2 ) d y 1 d y 2 is computed by iterated integration : integrate with respect to one variable while treating the other as a constant, then integrate the result.
∫ a b ∫ c d f ( y 1 , y 2 ) d y 2 d y 1 = ∫ a b [ ∫ c d f ( y 1 , y 2 ) d y 2 ] d y 1 \int_a^b \int_c^d f(y_1, y_2)\, dy_2\, dy_1 = \int_a^b \left[\int_c^d f(y_1, y_2)\, dy_2\right] dy_1 ∫ a b ∫ c d f ( y 1 , y 2 ) d y 2 d y 1 = ∫ a b [ ∫ c d f ( y 1 , y 2 ) d y 2 ] d y 1 The inner integral is done first (here, with respect to y 2 y_2 y 2 ), producing a function of y 1 y_1 y 1 alone, which is then integrated.
EXAMPLE: Joint Continuous Distribution. Let f ( y 1 , y 2 ) = 2 ( 1 − y 1 ) f(y_1, y_2) = 2(1 - y_1) f ( y 1 , y 2 ) = 2 ( 1 − y 1 ) for 0 ≤ y 1 ≤ 1 0 \leq y_1 \leq 1 0 ≤ y 1 ≤ 1 , 0 ≤ y 2 ≤ 1 0 \leq y_2 \leq 1 0 ≤ y 2 ≤ 1 .
Verification: ∫ 0 1 ∫ 0 1 2 ( 1 − y 1 ) d y 2 d y 1 = ∫ 0 1 2 ( 1 − y 1 ) [ y 2 ] 0 1 d y 1 = ∫ 0 1 2 ( 1 − y 1 ) d y 1 = [ 2 y 1 − y 1 2 ] 0 1 = 2 − 1 = 1. ✓ \int_0^1\int_0^1 2(1-y_1)\, dy_2\, dy_1 = \int_0^1 2(1-y_1)[y_2]_0^1\, dy_1 = \int_0^1 2(1-y_1)\, dy_1 = [2y_1 - y_1^2]_0^1 = 2 - 1 = 1. \checkmark ∫ 0 1 ∫ 0 1 2 ( 1 − y 1 ) d y 2 d y 1 = ∫ 0 1 2 ( 1 − y 1 ) [ y 2 ] 0 1 d y 1 = ∫ 0 1 2 ( 1 − y 1 ) d y 1 = [ 2 y 1 − y 1 2 ] 0 1 = 2 − 1 = 1. ✓
Find P ( Y 1 + Y 2 ≤ 1 ) P(Y_1 + Y_2 \leq 1) P ( Y 1 + Y 2 ≤ 1 ) :
P ( Y 1 + Y 2 ≤ 1 ) = ∫ 0 1 ∫ 0 1 − y 1 2 ( 1 − y 1 ) d y 2 d y 1 = ∫ 0 1 2 ( 1 − y 1 ) 2 d y 1 = [ − 2 ( 1 − y 1 ) 3 3 ] 0 1 = 2 3 P(Y_1 + Y_2 \leq 1) = \int_0^1 \int_0^{1-y_1} 2(1-y_1)\, dy_2\, dy_1 = \int_0^1 2(1-y_1)^2\, dy_1 = \left[-\frac{2(1-y_1)^3}{3}\right]_0^1 = \frac{2}{3} P ( Y 1 + Y 2 ≤ 1 ) = ∫ 0 1 ∫ 0 1 − y 1 2 ( 1 − y 1 ) d y 2 d y 1 = ∫ 0 1 2 ( 1 − y 1 ) 2 d y 1 = [ − 3 2 ( 1 − y 1 ) 3 ] 0 1 = 3 2 1.3 Non-Rectangular Support Regions: Where Students Get Lost ¶ The example above had a rectangular support: 0 ≤ y 1 ≤ 1 0 \leq y_1 \leq 1 0 ≤ y 1 ≤ 1 , 0 ≤ y 2 ≤ 1 0 \leq y_2 \leq 1 0 ≤ y 2 ≤ 1 . The limits of integration were constants, and life was easy. Most interesting joint distributions don’t have rectangular support. The region where f ( y 1 , y 2 ) > 0 f(y_1, y_2) > 0 f ( y 1 , y 2 ) > 0 is often a triangle, wedge, or other shape — and getting the integration limits right is the single most important skill in this chapter.
When the support is NOT rectangular, the limits of the inner integral are functions of the outer variable , not constants. Students who blindly write ∫ 0 1 ∫ 0 1 \int_0^1 \int_0^1 ∫ 0 1 ∫ 0 1 when the support is a triangle will get every subsequent calculation wrong — marginals, conditionals, covariance, everything.
The fix: ALWAYS sketch the support region before writing any integral.
When the support region is not a rectangle, follow this procedure:
Step 1. Sketch the region in the ( y 1 , y 2 ) (y_1, y_2) ( y 1 , y 2 ) -plane. Shade it.
Step 2. Choose the order of integration. If integrating d y 2 dy_2 d y 2 first (inner) then d y 1 dy_1 d y 1 (outer):
Outer limits (for y 1 y_1 y 1 ): constants — the leftmost and rightmost extent of the region.
Inner limits (for y 2 y_2 y 2 ): functions of y 1 y_1 y 1 — for a fixed y 1 y_1 y 1 , what are the lowest and highest y 2 y_2 y 2 values in the region?
Step 3. Write: ∫ y 1 = a b ∫ y 2 = g ( y 1 ) h ( y 1 ) f ( y 1 , y 2 ) d y 2 d y 1 \int_{y_1 = a}^{b} \int_{y_2 = g(y_1)}^{h(y_1)} f(y_1, y_2)\, dy_2\, dy_1 ∫ y 1 = a b ∫ y 2 = g ( y 1 ) h ( y 1 ) f ( y 1 , y 2 ) d y 2 d y 1
You can also integrate in the opposite order (d y 1 dy_1 d y 1 first). Sometimes one order is much easier than the other.
The Problem.
Let f ( y 1 , y 2 ) = 6 y 1 f(y_1, y_2) = 6y_1 f ( y 1 , y 2 ) = 6 y 1 for 0 < y 1 < y 2 < 1 0 < y_1 < y_2 < 1 0 < y 1 < y 2 < 1 , and f = 0 f = 0 f = 0 otherwise.
(a) Verify this is a valid PDF. (b) Find P ( Y 2 < 0.5 ) P(Y_2 < 0.5) P ( Y 2 < 0.5 ) .
Solution.
The support region is the triangle where y 1 < y 2 y_1 < y_2 y 1 < y 2 , both between 0 and 1. Sketch it: it’s the triangle above the line y 1 = y 2 y_1 = y_2 y 1 = y 2 in the unit square.
(a) Verify ∫ ∫ f = 1 \int\int f = 1 ∫∫ f = 1 .
Integrate d y 2 dy_2 d y 2 first (inner). For a fixed y 1 y_1 y 1 , y 2 y_2 y 2 ranges from y 1 y_1 y 1 to 1 (above the diagonal). Then y 1 y_1 y 1 ranges from 0 to 1:
∫ 0 1 ∫ y 1 1 6 y 1 d y 2 d y 1 = ∫ 0 1 6 y 1 ( 1 − y 1 ) d y 1 = ∫ 0 1 ( 6 y 1 − 6 y 1 2 ) d y 1 \int_0^1 \int_{y_1}^{1} 6y_1\, dy_2\, dy_1 = \int_0^1 6y_1(1 - y_1)\, dy_1 = \int_0^1 (6y_1 - 6y_1^2)\, dy_1 ∫ 0 1 ∫ y 1 1 6 y 1 d y 2 d y 1 = ∫ 0 1 6 y 1 ( 1 − y 1 ) d y 1 = ∫ 0 1 ( 6 y 1 − 6 y 1 2 ) d y 1 = [ 3 y 1 2 − 2 y 1 3 ] 0 1 = 3 − 2 = 1 ✓ = \left[3y_1^2 - 2y_1^3\right]_0^1 = 3 - 2 = 1 \quad \checkmark = [ 3 y 1 2 − 2 y 1 3 ] 0 1 = 3 − 2 = 1 ✓ (b) P ( Y 2 < 0.5 ) P(Y_2 < 0.5) P ( Y 2 < 0.5 ) : the region is 0 < y 1 < y 2 < 0.5 0 < y_1 < y_2 < 0.5 0 < y 1 < y 2 < 0.5 .
P ( Y 2 < 0.5 ) = ∫ 0 0.5 ∫ y 1 0.5 6 y 1 d y 2 d y 1 = ∫ 0 0.5 6 y 1 ( 0.5 − y 1 ) d y 1 = ∫ 0 0.5 ( 3 y 1 − 6 y 1 2 ) d y 1 P(Y_2 < 0.5) = \int_0^{0.5} \int_{y_1}^{0.5} 6y_1\, dy_2\, dy_1 = \int_0^{0.5} 6y_1(0.5 - y_1)\, dy_1 = \int_0^{0.5}(3y_1 - 6y_1^2)\, dy_1 P ( Y 2 < 0.5 ) = ∫ 0 0.5 ∫ y 1 0.5 6 y 1 d y 2 d y 1 = ∫ 0 0.5 6 y 1 ( 0.5 − y 1 ) d y 1 = ∫ 0 0.5 ( 3 y 1 − 6 y 1 2 ) d y 1 = [ 3 y 1 2 2 − 2 y 1 3 ] 0 0.5 = 3 8 − 1 4 = 1 8 = 0.125 = \left[\frac{3y_1^2}{2} - 2y_1^3\right]_0^{0.5} = \frac{3}{8} - \frac{1}{4} = \frac{1}{8} = 0.125 = [ 2 3 y 1 2 − 2 y 1 3 ] 0 0.5 = 8 3 − 4 1 = 8 1 = 0.125 The Problem.
Find the constant c c c that makes f ( y 1 , y 2 ) = c ( y 1 + y 2 ) f(y_1, y_2) = c(y_1 + y_2) f ( y 1 , y 2 ) = c ( y 1 + y 2 ) a valid joint PDF on the triangular region 0 ≤ y 1 ≤ 1 0 \leq y_1 \leq 1 0 ≤ y 1 ≤ 1 , 0 ≤ y 2 ≤ 1 − y 1 0 \leq y_2 \leq 1 - y_1 0 ≤ y 2 ≤ 1 − y 1 .
Solution.
The support is the triangle with vertices ( 0 , 0 ) (0,0) ( 0 , 0 ) , ( 1 , 0 ) (1,0) ( 1 , 0 ) , ( 0 , 1 ) (0,1) ( 0 , 1 ) . For a fixed y 1 y_1 y 1 , y 2 y_2 y 2 ranges from 0 to 1 − y 1 1 - y_1 1 − y 1 .
Set ∫ ∫ f = 1 \int\int f = 1 ∫∫ f = 1 :
c ∫ 0 1 ∫ 0 1 − y 1 ( y 1 + y 2 ) d y 2 d y 1 = 1 c\int_0^1 \int_0^{1-y_1} (y_1 + y_2)\, dy_2\, dy_1 = 1 c ∫ 0 1 ∫ 0 1 − y 1 ( y 1 + y 2 ) d y 2 d y 1 = 1 Inner integral (treat y 1 y_1 y 1 as constant):
∫ 0 1 − y 1 ( y 1 + y 2 ) d y 2 = [ y 1 y 2 + y 2 2 2 ] 0 1 − y 1 = y 1 ( 1 − y 1 ) + ( 1 − y 1 ) 2 2 \int_0^{1-y_1}(y_1 + y_2)\, dy_2 = \left[y_1 y_2 + \frac{y_2^2}{2}\right]_0^{1-y_1} = y_1(1-y_1) + \frac{(1-y_1)^2}{2} ∫ 0 1 − y 1 ( y 1 + y 2 ) d y 2 = [ y 1 y 2 + 2 y 2 2 ] 0 1 − y 1 = y 1 ( 1 − y 1 ) + 2 ( 1 − y 1 ) 2 = ( 1 − y 1 ) [ y 1 + 1 − y 1 2 ] = ( 1 − y 1 ) ⋅ 1 + y 1 2 = 1 − y 1 2 2 = (1-y_1)\left[y_1 + \frac{1-y_1}{2}\right] = (1-y_1) \cdot \frac{1+y_1}{2} = \frac{1-y_1^2}{2} = ( 1 − y 1 ) [ y 1 + 2 1 − y 1 ] = ( 1 − y 1 ) ⋅ 2 1 + y 1 = 2 1 − y 1 2 Outer integral:
c ∫ 0 1 1 − y 1 2 2 d y 1 = c 2 [ y 1 − y 1 3 3 ] 0 1 = c 2 ⋅ 2 3 = c 3 = 1 c \int_0^1 \frac{1-y_1^2}{2}\, dy_1 = \frac{c}{2}\left[y_1 - \frac{y_1^3}{3}\right]_0^1 = \frac{c}{2} \cdot \frac{2}{3} = \frac{c}{3} = 1 c ∫ 0 1 2 1 − y 1 2 d y 1 = 2 c [ y 1 − 3 y 1 3 ] 0 1 = 2 c ⋅ 3 2 = 3 c = 1 Therefore c = 3 c = 3 c = 3 .
The Problem.
The total time at a service window is Y 1 Y_1 Y 1 and the waiting time in line is Y 2 Y_2 Y 2 , with joint density f ( y 1 , y 2 ) = e − y 1 f(y_1, y_2) = e^{-y_1} f ( y 1 , y 2 ) = e − y 1 for 0 ≤ y 2 ≤ y 1 < ∞ 0 \leq y_2 \leq y_1 < \infty 0 ≤ y 2 ≤ y 1 < ∞ .
(a) Verify this is a valid PDF. (b) Find P ( Y 1 > 2 ) P(Y_1 > 2) P ( Y 1 > 2 ) .
Solution.
The support is the infinite wedge below the line y 2 = y 1 y_2 = y_1 y 2 = y 1 in the first quadrant. Since y 2 ≤ y 1 y_2 \leq y_1 y 2 ≤ y 1 , for a fixed y 1 y_1 y 1 , y 2 y_2 y 2 ranges from 0 to y 1 y_1 y 1 .
(a) ∫ 0 ∞ ∫ 0 y 1 e − y 1 d y 2 d y 1 = ∫ 0 ∞ y 1 e − y 1 d y 1 \int_0^{\infty}\int_0^{y_1} e^{-y_1}\, dy_2\, dy_1 = \int_0^{\infty} y_1 e^{-y_1}\, dy_1 ∫ 0 ∞ ∫ 0 y 1 e − y 1 d y 2 d y 1 = ∫ 0 ∞ y 1 e − y 1 d y 1
This is E ( Y ) E(Y) E ( Y ) for Y ∼ Exponential ( 1 ) Y \sim \text{Exponential}(1) Y ∼ Exponential ( 1 ) , which equals 1. ✓ \checkmark ✓
(Or by integration by parts: ∫ 0 ∞ y 1 e − y 1 d y 1 = [ − y 1 e − y 1 ] 0 ∞ + ∫ 0 ∞ e − y 1 d y 1 = 0 + 1 = 1 \int_0^{\infty} y_1 e^{-y_1}\, dy_1 = [-y_1 e^{-y_1}]_0^{\infty} + \int_0^{\infty} e^{-y_1}\, dy_1 = 0 + 1 = 1 ∫ 0 ∞ y 1 e − y 1 d y 1 = [ − y 1 e − y 1 ] 0 ∞ + ∫ 0 ∞ e − y 1 d y 1 = 0 + 1 = 1 .)
(b) P ( Y 1 > 2 ) = ∫ 2 ∞ ∫ 0 y 1 e − y 1 d y 2 d y 1 = ∫ 2 ∞ y 1 e − y 1 d y 1 P(Y_1 > 2) = \int_2^{\infty}\int_0^{y_1} e^{-y_1}\, dy_2\, dy_1 = \int_2^{\infty} y_1 e^{-y_1}\, dy_1 P ( Y 1 > 2 ) = ∫ 2 ∞ ∫ 0 y 1 e − y 1 d y 2 d y 1 = ∫ 2 ∞ y 1 e − y 1 d y 1
By integration by parts: = [ − y 1 e − y 1 ] 2 ∞ + ∫ 2 ∞ e − y 1 d y 1 = 2 e − 2 + e − 2 = 3 e − 2 ≈ 0.4060 = [-y_1 e^{-y_1}]_2^{\infty} + \int_2^{\infty} e^{-y_1}\, dy_1 = 2e^{-2} + e^{-2} = 3e^{-2} \approx 0.4060 = [ − y 1 e − y 1 ] 2 ∞ + ∫ 2 ∞ e − y 1 d y 1 = 2 e − 2 + e − 2 = 3 e − 2 ≈ 0.4060 .
The Problem.
Let f ( y 1 , y 2 ) = 24 y 1 y 2 f(y_1, y_2) = 24y_1 y_2 f ( y 1 , y 2 ) = 24 y 1 y 2 for 0 < y 1 < 1 0 < y_1 < 1 0 < y 1 < 1 , 0 < y 2 < 1 0 < y_2 < 1 0 < y 2 < 1 , y 1 + y 2 < 1 y_1 + y_2 < 1 y 1 + y 2 < 1 . Find P ( Y 1 > Y 2 ) P(Y_1 > Y_2) P ( Y 1 > Y 2 ) .
Solution.
The support is the triangle with vertices ( 0 , 0 ) (0,0) ( 0 , 0 ) , ( 1 , 0 ) (1,0) ( 1 , 0 ) , ( 0 , 1 ) (0,1) ( 0 , 1 ) — the same region as Example M.2. The additional constraint for this probability is y 1 > y 2 y_1 > y_2 y 1 > y 2 .
The region where y 1 > y 2 y_1 > y_2 y 1 > y 2 AND y 1 + y 2 < 1 y_1 + y_2 < 1 y 1 + y 2 < 1 is the triangle below y 2 = y 1 y_2 = y_1 y 2 = y 1 and below y 2 = 1 − y 1 y_2 = 1 - y_1 y 2 = 1 − y 1 .
Order 1: d y 2 dy_2 d y 2 first. For fixed y 1 y_1 y 1 , y 2 y_2 y 2 ranges from 0 to min ( y 1 , 1 − y 1 ) \min(y_1, 1-y_1) min ( y 1 , 1 − y 1 ) . When y 1 < 0.5 y_1 < 0.5 y 1 < 0.5 : upper limit is y 1 y_1 y 1 . When y 1 ≥ 0.5 y_1 \geq 0.5 y 1 ≥ 0.5 : upper limit is 1 − y 1 1 - y_1 1 − y 1 . This requires splitting into two integrals — messy.
Order 2: d y 1 dy_1 d y 1 first. For fixed y 2 y_2 y 2 , y 1 y_1 y 1 ranges from y 2 y_2 y 2 (since y 1 > y 2 y_1 > y_2 y 1 > y 2 ) to 1 − y 2 1 - y_2 1 − y 2 (since y 1 + y 2 < 1 y_1 + y_2 < 1 y 1 + y 2 < 1 ). Then y 2 y_2 y 2 ranges from 0 to 0.5 (at y 2 = 0.5 y_2 = 0.5 y 2 = 0.5 , y 1 = y 2 y_1 = y_2 y 1 = y 2 meets y 1 + y 2 = 1 y_1 + y_2 = 1 y 1 + y 2 = 1 ). One integral — much cleaner.
P ( Y 1 > Y 2 ) = ∫ 0 0.5 ∫ y 2 1 − y 2 24 y 1 y 2 d y 1 d y 2 P(Y_1 > Y_2) = \int_0^{0.5}\int_{y_2}^{1-y_2} 24y_1 y_2\, dy_1\, dy_2 P ( Y 1 > Y 2 ) = ∫ 0 0.5 ∫ y 2 1 − y 2 24 y 1 y 2 d y 1 d y 2 Inner: ∫ y 2 1 − y 2 24 y 1 y 2 d y 1 = 24 y 2 ⋅ y 1 2 2 ∣ y 2 1 − y 2 = 12 y 2 [ ( 1 − y 2 ) 2 − y 2 2 ] = 12 y 2 ( 1 − 2 y 2 ) \int_{y_2}^{1-y_2} 24y_1 y_2\, dy_1 = 24y_2 \cdot \frac{y_1^2}{2}\Big|_{y_2}^{1-y_2} = 12y_2[(1-y_2)^2 - y_2^2] = 12y_2(1-2y_2) ∫ y 2 1 − y 2 24 y 1 y 2 d y 1 = 24 y 2 ⋅ 2 y 1 2 ∣ ∣ y 2 1 − y 2 = 12 y 2 [( 1 − y 2 ) 2 − y 2 2 ] = 12 y 2 ( 1 − 2 y 2 )
Outer: ∫ 0 0.5 12 y 2 ( 1 − 2 y 2 ) d y 2 = 12 ∫ 0 0.5 ( y 2 − 2 y 2 2 ) d y 2 = 12 [ y 2 2 2 − 2 y 2 3 3 ] 0 0.5 \int_0^{0.5} 12y_2(1-2y_2)\, dy_2 = 12\int_0^{0.5}(y_2 - 2y_2^2)\, dy_2 = 12\left[\frac{y_2^2}{2} - \frac{2y_2^3}{3}\right]_0^{0.5} ∫ 0 0.5 12 y 2 ( 1 − 2 y 2 ) d y 2 = 12 ∫ 0 0.5 ( y 2 − 2 y 2 2 ) d y 2 = 12 [ 2 y 2 2 − 3 2 y 2 3 ] 0 0.5
= 12 [ 1 8 − 1 12 ] = 12 ⋅ 1 24 = 1 2 = 12\left[\frac{1}{8} - \frac{1}{12}\right] = 12 \cdot \frac{1}{24} = \frac{1}{2} = 12 [ 8 1 − 12 1 ] = 12 ⋅ 24 1 = 2 1 By symmetry of 24 y 1 y 2 24y_1 y_2 24 y 1 y 2 in y 1 y_1 y 1 and y 2 y_2 y 2 on this symmetric region, P ( Y 1 > Y 2 ) = 1 / 2 P(Y_1 > Y_2) = 1/2 P ( Y 1 > Y 2 ) = 1/2 makes perfect sense.
1.4 Section Exercises: Joint Distributions ¶ J.1. Let f ( y 1 , y 2 ) = c f(y_1, y_2) = c f ( y 1 , y 2 ) = c for 0 ≤ y 2 ≤ y 1 ≤ 2 0 \leq y_2 \leq y_1 \leq 2 0 ≤ y 2 ≤ y 1 ≤ 2 . Find c c c , then find P ( Y 1 ≤ 1 ) P(Y_1 \leq 1) P ( Y 1 ≤ 1 ) .
J.2. Let f ( y 1 , y 2 ) = 2 f(y_1, y_2) = 2 f ( y 1 , y 2 ) = 2 for 0 < y 1 < 1 0 < y_1 < 1 0 < y 1 < 1 , 0 < y 2 < 1 − y 1 0 < y_2 < 1-y_1 0 < y 2 < 1 − y 1 . Verify it integrates to 1. Find P ( Y 1 > 0.5 ) P(Y_1 > 0.5) P ( Y 1 > 0.5 ) .
J.3. Let f ( y 1 , y 2 ) = e − ( y 1 + y 2 ) f(y_1, y_2) = e^{-(y_1+y_2)} f ( y 1 , y 2 ) = e − ( y 1 + y 2 ) for y 1 > 0 y_1 > 0 y 1 > 0 , y 2 > 0 y_2 > 0 y 2 > 0 . (a) Verify it’s a valid joint PDF. (b) Is the support rectangular? (c) Find P ( Y 1 + Y 2 < 1 ) P(Y_1 + Y_2 < 1) P ( Y 1 + Y 2 < 1 ) .
J.4. Let f ( y 1 , y 2 ) = 6 ( 1 − y 2 ) f(y_1, y_2) = 6(1-y_2) f ( y 1 , y 2 ) = 6 ( 1 − y 2 ) for 0 < y 1 < y 2 < 1 0 < y_1 < y_2 < 1 0 < y 1 < y 2 < 1 . (a) Verify. (b) Find P ( Y 1 < 0.25 , Y 2 > 0.5 ) P(Y_1 < 0.25, Y_2 > 0.5) P ( Y 1 < 0.25 , Y 2 > 0.5 ) .
2 Marginal Distributions ¶ Given the joint distribution of ( Y 1 , Y 2 ) (Y_1, Y_2) ( Y 1 , Y 2 ) , we often want the distribution of Y 1 Y_1 Y 1 alone — ignoring Y 2 Y_2 Y 2 . This is the marginal distribution . It’s obtained by “summing out” (discrete) or “integrating out” (continuous) the other variable.
The critical warning: When the support is not rectangular, the limits of integration for the marginal depend on the variable you’re keeping. This is where most errors occur.
Discrete: p 1 ( y 1 ) = ∑ y 2 p ( y 1 , y 2 ) p_1(y_1) = \sum_{y_2} p(y_1, y_2) p 1 ( y 1 ) = ∑ y 2 p ( y 1 , y 2 ) and p 2 ( y 2 ) = ∑ y 1 p ( y 1 , y 2 ) p_2(y_2) = \sum_{y_1} p(y_1, y_2) p 2 ( y 2 ) = ∑ y 1 p ( y 1 , y 2 )
Continuous: f 1 ( y 1 ) = ∫ − ∞ ∞ f ( y 1 , y 2 ) d y 2 f_1(y_1) = \int_{-\infty}^{\infty} f(y_1, y_2)\, dy_2 f 1 ( y 1 ) = ∫ − ∞ ∞ f ( y 1 , y 2 ) d y 2 and f 2 ( y 2 ) = ∫ − ∞ ∞ f ( y 1 , y 2 ) d y 1 f_2(y_2) = \int_{-\infty}^{\infty} f(y_1, y_2)\, dy_1 f 2 ( y 2 ) = ∫ − ∞ ∞ f ( y 1 , y 2 ) d y 1
Key point for non-rectangular support: The “− ∞ -\infty − ∞ to ∞ \infty ∞ ” limits really mean “over all y 2 y_2 y 2 values where f ( y 1 , y 2 ) > 0 f(y_1, y_2) > 0 f ( y 1 , y 2 ) > 0 for this particular y 1 y_1 y 1 .” When the support is a triangle, these limits are functions of y 1 y_1 y 1 .
EXAMPLE (Discrete marginals). From the smartphone table, the marginal of Y 1 Y_1 Y 1 (screen defects) is:
p 1 ( 0 ) = 0.80 + 0.05 = 0.85 , p 1 ( 1 ) = 0.10 + 0.05 = 0.15 p_1(0) = 0.80 + 0.05 = 0.85, \quad p_1(1) = 0.10 + 0.05 = 0.15 p 1 ( 0 ) = 0.80 + 0.05 = 0.85 , p 1 ( 1 ) = 0.10 + 0.05 = 0.15 This is the row totals column — the distribution of screen defects ignoring battery status.
EXAMPLE (Rectangular support). For f ( y 1 , y 2 ) = 2 ( 1 − y 1 ) f(y_1, y_2) = 2(1-y_1) f ( y 1 , y 2 ) = 2 ( 1 − y 1 ) on [ 0 , 1 ] 2 [0,1]^2 [ 0 , 1 ] 2 :
f 1 ( y 1 ) = ∫ 0 1 2 ( 1 − y 1 ) d y 2 = 2 ( 1 − y 1 ) , 0 ≤ y 1 ≤ 1 f_1(y_1) = \int_0^1 2(1-y_1)\, dy_2 = 2(1-y_1), \quad 0 \leq y_1 \leq 1 f 1 ( y 1 ) = ∫ 0 1 2 ( 1 − y 1 ) d y 2 = 2 ( 1 − y 1 ) , 0 ≤ y 1 ≤ 1 f 2 ( y 2 ) = ∫ 0 1 2 ( 1 − y 1 ) d y 1 = [ 2 y 1 − y 1 2 ] 0 1 = 1 , 0 ≤ y 2 ≤ 1 f_2(y_2) = \int_0^1 2(1-y_1)\, dy_1 = [2y_1 - y_1^2]_0^1 = 1, \quad 0 \leq y_2 \leq 1 f 2 ( y 2 ) = ∫ 0 1 2 ( 1 − y 1 ) d y 1 = [ 2 y 1 − y 1 2 ] 0 1 = 1 , 0 ≤ y 2 ≤ 1 So Y 2 ∼ Uniform ( 0 , 1 ) Y_2 \sim \text{Uniform}(0,1) Y 2 ∼ Uniform ( 0 , 1 ) but Y 1 Y_1 Y 1 has the triangular density 2 ( 1 − y 1 ) 2(1-y_1) 2 ( 1 − y 1 ) .
The Problem.
From Example M.1: f ( y 1 , y 2 ) = 6 y 1 f(y_1, y_2) = 6y_1 f ( y 1 , y 2 ) = 6 y 1 for 0 < y 1 < y 2 < 1 0 < y_1 < y_2 < 1 0 < y 1 < y 2 < 1 . Find f 1 ( y 1 ) f_1(y_1) f 1 ( y 1 ) and f 2 ( y 2 ) f_2(y_2) f 2 ( y 2 ) .
Solution.
Finding f 1 ( y 1 ) f_1(y_1) f 1 ( y 1 ) : Integrate out y 2 y_2 y 2 . For a fixed y 1 y_1 y 1 , y 2 y_2 y 2 ranges from y 1 y_1 y 1 to 1 (the support constraint y 1 < y 2 < 1 y_1 < y_2 < 1 y 1 < y 2 < 1 ):
f 1 ( y 1 ) = ∫ y 1 1 6 y 1 d y 2 = 6 y 1 ( 1 − y 1 ) , 0 < y 1 < 1 f_1(y_1) = \int_{y_1}^{1} 6y_1\, dy_2 = 6y_1(1 - y_1), \quad 0 < y_1 < 1 f 1 ( y 1 ) = ∫ y 1 1 6 y 1 d y 2 = 6 y 1 ( 1 − y 1 ) , 0 < y 1 < 1 Common error: Writing ∫ 0 1 6 y 1 d y 2 = 6 y 1 \int_0^1 6y_1\, dy_2 = 6y_1 ∫ 0 1 6 y 1 d y 2 = 6 y 1 — WRONG! The lower limit is y 1 y_1 y 1 , not 0, because y 2 > y 1 y_2 > y_1 y 2 > y 1 in this support.
Finding f 2 ( y 2 ) f_2(y_2) f 2 ( y 2 ) : Integrate out y 1 y_1 y 1 . For a fixed y 2 y_2 y 2 , y 1 y_1 y 1 ranges from 0 to y 2 y_2 y 2 (the constraint 0 < y 1 < y 2 0 < y_1 < y_2 0 < y 1 < y 2 ):
f 2 ( y 2 ) = ∫ 0 y 2 6 y 1 d y 1 = 6 ⋅ y 1 2 2 ∣ 0 y 2 = 3 y 2 2 , 0 < y 2 < 1 f_2(y_2) = \int_0^{y_2} 6y_1\, dy_1 = 6 \cdot \frac{y_1^2}{2}\Big|_0^{y_2} = 3y_2^2, \quad 0 < y_2 < 1 f 2 ( y 2 ) = ∫ 0 y 2 6 y 1 d y 1 = 6 ⋅ 2 y 1 2 ∣ ∣ 0 y 2 = 3 y 2 2 , 0 < y 2 < 1 Verification: ∫ 0 1 6 y 1 ( 1 − y 1 ) d y 1 = [ 3 y 1 2 − 2 y 1 3 ] 0 1 = 1 ✓ \int_0^1 6y_1(1-y_1)\, dy_1 = [3y_1^2 - 2y_1^3]_0^1 = 1 \checkmark ∫ 0 1 6 y 1 ( 1 − y 1 ) d y 1 = [ 3 y 1 2 − 2 y 1 3 ] 0 1 = 1 ✓ and ∫ 0 1 3 y 2 2 d y 2 = [ y 2 3 ] 0 1 = 1 ✓ \int_0^1 3y_2^2\, dy_2 = [y_2^3]_0^1 = 1 \checkmark ∫ 0 1 3 y 2 2 d y 2 = [ y 2 3 ] 0 1 = 1 ✓ .
The Problem.
From Example M.3: f ( y 1 , y 2 ) = e − y 1 f(y_1, y_2) = e^{-y_1} f ( y 1 , y 2 ) = e − y 1 for 0 ≤ y 2 ≤ y 1 < ∞ 0 \leq y_2 \leq y_1 < \infty 0 ≤ y 2 ≤ y 1 < ∞ . Find both marginals.
Solution.
f 1 ( y 1 ) f_1(y_1) f 1 ( y 1 ) : Integrate out y 2 y_2 y 2 from 0 to y 1 y_1 y 1 :
f 1 ( y 1 ) = ∫ 0 y 1 e − y 1 d y 2 = y 1 e − y 1 , y 1 > 0 f_1(y_1) = \int_0^{y_1} e^{-y_1}\, dy_2 = y_1 e^{-y_1}, \quad y_1 > 0 f 1 ( y 1 ) = ∫ 0 y 1 e − y 1 d y 2 = y 1 e − y 1 , y 1 > 0 This is a Gamma ( 2 , 1 ) \text{Gamma}(2, 1) Gamma ( 2 , 1 ) distribution. Check: ∫ 0 ∞ y 1 e − y 1 d y 1 = 1 ✓ \int_0^{\infty} y_1 e^{-y_1}\, dy_1 = 1 \checkmark ∫ 0 ∞ y 1 e − y 1 d y 1 = 1 ✓ .
f 2 ( y 2 ) f_2(y_2) f 2 ( y 2 ) : Integrate out y 1 y_1 y 1 from y 2 y_2 y 2 to ∞ \infty ∞ (since y 1 ≥ y 2 y_1 \geq y_2 y 1 ≥ y 2 ):
f 2 ( y 2 ) = ∫ y 2 ∞ e − y 1 d y 1 = e − y 2 , y 2 ≥ 0 f_2(y_2) = \int_{y_2}^{\infty} e^{-y_1}\, dy_1 = e^{-y_2}, \quad y_2 \geq 0 f 2 ( y 2 ) = ∫ y 2 ∞ e − y 1 d y 1 = e − y 2 , y 2 ≥ 0 This is an Exponential ( 1 ) \text{Exponential}(1) Exponential ( 1 ) distribution. Check: ∫ 0 ∞ e − y 2 d y 2 = 1 ✓ \int_0^{\infty} e^{-y_2}\, dy_2 = 1 \checkmark ∫ 0 ∞ e − y 2 d y 2 = 1 ✓ .
Interpretation: The total service time (Y 1 Y_1 Y 1 ) follows a Gamma(2,1), while the waiting time (Y 2 Y_2 Y 2 ) follows an Exponential(1).
2.1 Section Exercises: Marginal Distributions ¶ MG.1. For f ( y 1 , y 2 ) = 3 ( y 1 + y 2 ) f(y_1, y_2) = 3(y_1 + y_2) f ( y 1 , y 2 ) = 3 ( y 1 + y 2 ) on the triangle 0 ≤ y 1 ≤ 1 0 \leq y_1 \leq 1 0 ≤ y 1 ≤ 1 , 0 ≤ y 2 ≤ 1 − y 1 0 \leq y_2 \leq 1-y_1 0 ≤ y 2 ≤ 1 − y 1 (from Example M.2 with c = 3 c = 3 c = 3 ), find f 1 ( y 1 ) f_1(y_1) f 1 ( y 1 ) and f 2 ( y 2 ) f_2(y_2) f 2 ( y 2 ) . Verify each integrates to 1.
MG.2. For f ( y 1 , y 2 ) = 24 y 1 y 2 f(y_1, y_2) = 24y_1 y_2 f ( y 1 , y 2 ) = 24 y 1 y 2 on y 1 > 0 y_1 > 0 y 1 > 0 , y 2 > 0 y_2 > 0 y 2 > 0 , y 1 + y 2 < 1 y_1 + y_2 < 1 y 1 + y 2 < 1 , find f 1 ( y 1 ) f_1(y_1) f 1 ( y 1 ) .
MG.3. For f ( y 1 , y 2 ) = 2 e − y 1 − y 2 f(y_1, y_2) = 2e^{-y_1-y_2} f ( y 1 , y 2 ) = 2 e − y 1 − y 2 on 0 < y 1 < y 2 < ∞ 0 < y_1 < y_2 < \infty 0 < y 1 < y 2 < ∞ , find both marginals. (Hint: For f 1 f_1 f 1 , y 2 y_2 y 2 ranges from y 1 y_1 y 1 to ∞ \infty ∞ .)
3 Conditional Distributions ¶ In Chapter 3, we defined P ( A ∣ B ) = P ( A ∩ B ) / P ( B ) P(A|B) = P(A \cap B)/P(B) P ( A ∣ B ) = P ( A ∩ B ) / P ( B ) . The same idea extends to random variables: the conditional distribution of Y 1 Y_1 Y 1 given Y 2 = y 2 Y_2 = y_2 Y 2 = y 2 describes Y 1 Y_1 Y 1 ’s behavior when we know the value of Y 2 Y_2 Y 2 .
Why this is hard: For non-rectangular support, the range of Y 1 Y_1 Y 1 changes depending on the value of Y 2 Y_2 Y 2 . When f ( y 1 , y 2 ) = 6 y 1 f(y_1, y_2) = 6y_1 f ( y 1 , y 2 ) = 6 y 1 on 0 < y 1 < y 2 < 1 0 < y_1 < y_2 < 1 0 < y 1 < y 2 < 1 , the conditional distribution of Y 1 Y_1 Y 1 given Y 2 = 0.8 Y_2 = 0.8 Y 2 = 0.8 has support ( 0 , 0.8 ) (0, 0.8) ( 0 , 0.8 ) , but given Y 2 = 0.3 Y_2 = 0.3 Y 2 = 0.3 it has support ( 0 , 0.3 ) (0, 0.3) ( 0 , 0.3 ) .
Discrete: p ( y 1 ∣ y 2 ) = p ( y 1 , y 2 ) p 2 ( y 2 ) p(y_1 | y_2) = \frac{p(y_1, y_2)}{p_2(y_2)} p ( y 1 ∣ y 2 ) = p 2 ( y 2 ) p ( y 1 , y 2 ) , provided p 2 ( y 2 ) > 0 p_2(y_2) > 0 p 2 ( y 2 ) > 0 .
Continuous: f ( y 1 ∣ y 2 ) = f ( y 1 , y 2 ) f 2 ( y 2 ) f(y_1 | y_2) = \frac{f(y_1, y_2)}{f_2(y_2)} f ( y 1 ∣ y 2 ) = f 2 ( y 2 ) f ( y 1 , y 2 ) , provided f 2 ( y 2 ) > 0 f_2(y_2) > 0 f 2 ( y 2 ) > 0 .
EXAMPLE (Discrete). From the smartphone data: P ( Y 1 = 1 ∣ Y 2 = 1 ) = p ( 1 , 1 ) p 2 ( 1 ) = 0.05 0.10 = 0.50. P(Y_1 = 1 | Y_2 = 1) = \frac{p(1,1)}{p_2(1)} = \frac{0.05}{0.10} = 0.50. P ( Y 1 = 1∣ Y 2 = 1 ) = p 2 ( 1 ) p ( 1 , 1 ) = 0.10 0.05 = 0.50.
Among phones with battery defects, 50% also have screen defects — much higher than the unconditional rate of 15%. The two defect types are associated.
The Problem.
For f ( y 1 , y 2 ) = 6 y 1 f(y_1, y_2) = 6y_1 f ( y 1 , y 2 ) = 6 y 1 on 0 < y 1 < y 2 < 1 0 < y_1 < y_2 < 1 0 < y 1 < y 2 < 1 (Example M.1), find f ( y 1 ∣ y 2 ) f(y_1 | y_2) f ( y 1 ∣ y 2 ) and compute E ( Y 1 ∣ Y 2 = 0.8 ) E(Y_1 | Y_2 = 0.8) E ( Y 1 ∣ Y 2 = 0.8 ) .
Solution.
From Example M.5, f 2 ( y 2 ) = 3 y 2 2 f_2(y_2) = 3y_2^2 f 2 ( y 2 ) = 3 y 2 2 .
f ( y 1 ∣ y 2 ) = f ( y 1 , y 2 ) f 2 ( y 2 ) = 6 y 1 3 y 2 2 = 2 y 1 y 2 2 , 0 < y 1 < y 2 f(y_1 | y_2) = \frac{f(y_1, y_2)}{f_2(y_2)} = \frac{6y_1}{3y_2^2} = \frac{2y_1}{y_2^2}, \quad 0 < y_1 < y_2 f ( y 1 ∣ y 2 ) = f 2 ( y 2 ) f ( y 1 , y 2 ) = 3 y 2 2 6 y 1 = y 2 2 2 y 1 , 0 < y 1 < y 2 Verify it’s a valid density:
∫ 0 y 2 2 y 1 y 2 2 d y 1 = 2 y 2 2 ⋅ y 1 2 2 ∣ 0 y 2 = y 2 2 y 2 2 = 1 ✓ \int_0^{y_2} \frac{2y_1}{y_2^2}\, dy_1 = \frac{2}{y_2^2} \cdot \frac{y_1^2}{2}\Big|_0^{y_2} = \frac{y_2^2}{y_2^2} = 1 \quad \checkmark ∫ 0 y 2 y 2 2 2 y 1 d y 1 = y 2 2 2 ⋅ 2 y 1 2 ∣ ∣ 0 y 2 = y 2 2 y 2 2 = 1 ✓ Conditional expectation:
E ( Y 1 ∣ Y 2 = y 2 ) = ∫ 0 y 2 y 1 ⋅ 2 y 1 y 2 2 d y 1 = 2 y 2 2 ∫ 0 y 2 y 1 2 d y 1 = 2 y 2 2 ⋅ y 2 3 3 = 2 y 2 3 E(Y_1 | Y_2 = y_2) = \int_0^{y_2} y_1 \cdot \frac{2y_1}{y_2^2}\, dy_1 = \frac{2}{y_2^2}\int_0^{y_2} y_1^2\, dy_1 = \frac{2}{y_2^2} \cdot \frac{y_2^3}{3} = \frac{2y_2}{3} E ( Y 1 ∣ Y 2 = y 2 ) = ∫ 0 y 2 y 1 ⋅ y 2 2 2 y 1 d y 1 = y 2 2 2 ∫ 0 y 2 y 1 2 d y 1 = y 2 2 2 ⋅ 3 y 2 3 = 3 2 y 2 At y 2 = 0.8 y_2 = 0.8 y 2 = 0.8 : E ( Y 1 ∣ Y 2 = 0.8 ) = 2 ( 0.8 ) 3 = 1.6 3 ≈ 0.533 E(Y_1 | Y_2 = 0.8) = \frac{2(0.8)}{3} = \frac{1.6}{3} \approx 0.533 E ( Y 1 ∣ Y 2 = 0.8 ) = 3 2 ( 0.8 ) = 3 1.6 ≈ 0.533 .
Notice: E ( Y 1 ∣ Y 2 = y 2 ) = 2 y 2 3 E(Y_1 | Y_2 = y_2) = \frac{2y_2}{3} E ( Y 1 ∣ Y 2 = y 2 ) = 3 2 y 2 is a function of y 2 y_2 y 2 , not a single number. The larger Y 2 Y_2 Y 2 is, the larger Y 1 Y_1 Y 1 tends to be — which makes sense because Y 1 < Y 2 Y_1 < Y_2 Y 1 < Y 2 .
The Problem.
Using Example M.7, verify that E [ E ( Y 1 ∣ Y 2 ) ] = E ( Y 1 ) E[E(Y_1 | Y_2)] = E(Y_1) E [ E ( Y 1 ∣ Y 2 )] = E ( Y 1 ) .
Solution.
We found E ( Y 1 ∣ Y 2 = y 2 ) = 2 y 2 3 E(Y_1 | Y_2 = y_2) = \frac{2y_2}{3} E ( Y 1 ∣ Y 2 = y 2 ) = 3 2 y 2 , so E ( Y 1 ∣ Y 2 ) = 2 Y 2 3 E(Y_1 | Y_2) = \frac{2Y_2}{3} E ( Y 1 ∣ Y 2 ) = 3 2 Y 2 as a random variable.
E [ 2 Y 2 3 ] = 2 3 E ( Y 2 ) = 2 3 ∫ 0 1 y 2 ⋅ 3 y 2 2 d y 2 = 2 3 ∫ 0 1 3 y 2 3 d y 2 = 2 3 ⋅ 3 4 = 1 2 E\left[\frac{2Y_2}{3}\right] = \frac{2}{3} E(Y_2) = \frac{2}{3}\int_0^1 y_2 \cdot 3y_2^2\, dy_2 = \frac{2}{3}\int_0^1 3y_2^3\, dy_2 = \frac{2}{3} \cdot \frac{3}{4} = \frac{1}{2} E [ 3 2 Y 2 ] = 3 2 E ( Y 2 ) = 3 2 ∫ 0 1 y 2 ⋅ 3 y 2 2 d y 2 = 3 2 ∫ 0 1 3 y 2 3 d y 2 = 3 2 ⋅ 4 3 = 2 1 Check directly: E ( Y 1 ) = ∫ 0 1 y 1 ⋅ 6 y 1 ( 1 − y 1 ) d y 1 = ∫ 0 1 ( 6 y 1 2 − 6 y 1 3 ) d y 1 = 2 − 3 2 = 1 2 ✓ E(Y_1) = \int_0^1 y_1 \cdot 6y_1(1-y_1)\, dy_1 = \int_0^1 (6y_1^2 - 6y_1^3)\, dy_1 = 2 - \frac{3}{2} = \frac{1}{2} \quad \checkmark E ( Y 1 ) = ∫ 0 1 y 1 ⋅ 6 y 1 ( 1 − y 1 ) d y 1 = ∫ 0 1 ( 6 y 1 2 − 6 y 1 3 ) d y 1 = 2 − 2 3 = 2 1 ✓
The Tower Property holds: E [ E ( Y 1 ∣ Y 2 ) ] = E ( Y 1 ) = 1 / 2 E[E(Y_1|Y_2)] = E(Y_1) = 1/2 E [ E ( Y 1 ∣ Y 2 )] = E ( Y 1 ) = 1/2 .
3.1 Section Exercises: Conditional Distributions ¶ CD.1. For f ( y 1 , y 2 ) = e − y 1 f(y_1,y_2) = e^{-y_1} f ( y 1 , y 2 ) = e − y 1 on 0 ≤ y 2 ≤ y 1 < ∞ 0 \leq y_2 \leq y_1 < \infty 0 ≤ y 2 ≤ y 1 < ∞ (Example M.3), find f ( y 2 ∣ y 1 ) f(y_2|y_1) f ( y 2 ∣ y 1 ) and E ( Y 2 ∣ Y 1 = y 1 ) E(Y_2|Y_1 = y_1) E ( Y 2 ∣ Y 1 = y 1 ) .
CD.2. For f ( y 1 , y 2 ) = 3 ( y 1 + y 2 ) f(y_1,y_2) = 3(y_1+y_2) f ( y 1 , y 2 ) = 3 ( y 1 + y 2 ) on the triangle 0 ≤ y 1 ≤ 1 0 \leq y_1 \leq 1 0 ≤ y 1 ≤ 1 , 0 ≤ y 2 ≤ 1 − y 1 0 \leq y_2 \leq 1-y_1 0 ≤ y 2 ≤ 1 − y 1 , find f ( y 1 ∣ y 2 ) f(y_1|y_2) f ( y 1 ∣ y 2 ) . What is its support for a given y 2 y_2 y 2 ?
CD.3. If f ( y 1 ∣ y 2 ) = f 1 ( y 1 ) f(y_1|y_2) = f_1(y_1) f ( y 1 ∣ y 2 ) = f 1 ( y 1 ) for all y 2 y_2 y 2 , prove that Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 are independent.
4 Independence of Random Variables ¶ Two random variables are independent if knowing the value of one tells you nothing about the other. Mathematically, their joint distribution factors into the product of marginals.
A powerful shortcut: If the support region is not rectangular , the variables are automatically dependent — no calculation needed. Independence requires both that the support is rectangular AND that f f f factors.
Quick test for dependence: If the support region of f ( y 1 , y 2 ) f(y_1, y_2) f ( y 1 , y 2 ) is NOT rectangular (e.g., triangular, wedge, circular), then Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 are automatically dependent — no calculation needed.
Why? If the support is 0 < y 1 < y 2 < 1 0 < y_1 < y_2 < 1 0 < y 1 < y 2 < 1 , knowing Y 2 = 0.3 Y_2 = 0.3 Y 2 = 0.3 restricts Y 1 Y_1 Y 1 to ( 0 , 0.3 ) (0, 0.3) ( 0 , 0.3 ) . That’s information — so they can’t be independent.
Quick test for independence: If the support IS rectangular AND f ( y 1 , y 2 ) = g ( y 1 ) ⋅ h ( y 2 ) f(y_1, y_2) = g(y_1) \cdot h(y_2) f ( y 1 , y 2 ) = g ( y 1 ) ⋅ h ( y 2 ) (the density factors into a function of y 1 y_1 y 1 alone times a function of y 2 y_2 y 2 alone), then Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 are independent.
Checking the smartphone example: p ( 0 , 0 ) = 0.80 p(0,0) = 0.80 p ( 0 , 0 ) = 0.80 but p 1 ( 0 ) ⋅ p 2 ( 0 ) = 0.85 × 0.90 = 0.765 ≠ 0.80 p_1(0) \cdot p_2(0) = 0.85 \times 0.90 = 0.765 \neq 0.80 p 1 ( 0 ) ⋅ p 2 ( 0 ) = 0.85 × 0.90 = 0.765 = 0.80 . Not independent. The defects are associated.
Checking f ( y 1 , y 2 ) = 2 ( 1 − y 1 ) f(y_1,y_2) = 2(1-y_1) f ( y 1 , y 2 ) = 2 ( 1 − y 1 ) on [ 0 , 1 ] 2 [0,1]^2 [ 0 , 1 ] 2 : Support is rectangular ✓. Does f f f factor? f = 2 ( 1 − y 1 ) ⋅ 1 = g ( y 1 ) ⋅ h ( y 2 ) f = 2(1-y_1) \cdot 1 = g(y_1) \cdot h(y_2) f = 2 ( 1 − y 1 ) ⋅ 1 = g ( y 1 ) ⋅ h ( y 2 ) ✓. Independent!
Checking f ( y 1 , y 2 ) = 6 y 1 f(y_1,y_2) = 6y_1 f ( y 1 , y 2 ) = 6 y 1 on 0 < y 1 < y 2 < 1 0 < y_1 < y_2 < 1 0 < y 1 < y 2 < 1 : Support is triangular (NOT rectangular). Dependent — no calculation needed! We confirmed this: E ( Y 1 ∣ Y 2 = y 2 ) = 2 y 2 / 3 E(Y_1|Y_2 = y_2) = 2y_2/3 E ( Y 1 ∣ Y 2 = y 2 ) = 2 y 2 /3 , which depends on y 2 y_2 y 2 .
If Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 are independent, then for any functions g 1 g_1 g 1 and g 2 g_2 g 2 :
E [ g 1 ( Y 1 ) ⋅ g 2 ( Y 2 ) ] = E [ g 1 ( Y 1 ) ] ⋅ E [ g 2 ( Y 2 ) ] E[g_1(Y_1) \cdot g_2(Y_2)] = E[g_1(Y_1)] \cdot E[g_2(Y_2)] E [ g 1 ( Y 1 ) ⋅ g 2 ( Y 2 )] = E [ g 1 ( Y 1 )] ⋅ E [ g 2 ( Y 2 )] Proof. E [ g 1 ( Y 1 ) g 2 ( Y 2 ) ] = ∫ ∫ g 1 ( y 1 ) g 2 ( y 2 ) f ( y 1 , y 2 ) d y 1 d y 2 E[g_1(Y_1)g_2(Y_2)] = \int\int g_1(y_1)g_2(y_2)f(y_1,y_2)\,dy_1\,dy_2 E [ g 1 ( Y 1 ) g 2 ( Y 2 )] = ∫∫ g 1 ( y 1 ) g 2 ( y 2 ) f ( y 1 , y 2 ) d y 1 d y 2 . Since f = f 1 ⋅ f 2 f = f_1 \cdot f_2 f = f 1 ⋅ f 2 by independence:
= ∫ ∫ g 1 ( y 1 ) g 2 ( y 2 ) f 1 ( y 1 ) f 2 ( y 2 ) d y 1 d y 2 = [ ∫ g 1 ( y 1 ) f 1 ( y 1 ) d y 1 ] [ ∫ g 2 ( y 2 ) f 2 ( y 2 ) d y 2 ] = \int\int g_1(y_1)g_2(y_2)f_1(y_1)f_2(y_2)\,dy_1\,dy_2 = \left[\int g_1(y_1)f_1(y_1)\,dy_1\right]\left[\int g_2(y_2)f_2(y_2)\,dy_2\right] = ∫∫ g 1 ( y 1 ) g 2 ( y 2 ) f 1 ( y 1 ) f 2 ( y 2 ) d y 1 d y 2 = [ ∫ g 1 ( y 1 ) f 1 ( y 1 ) d y 1 ] [ ∫ g 2 ( y 2 ) f 2 ( y 2 ) d y 2 ] = E [ g 1 ( Y 1 ) ] ⋅ E [ g 2 ( Y 2 ) ] . ■ = E[g_1(Y_1)] \cdot E[g_2(Y_2)]. \quad \blacksquare = E [ g 1 ( Y 1 )] ⋅ E [ g 2 ( Y 2 )] . ■ The factoring step works because g 1 ( y 1 ) f 1 ( y 1 ) g_1(y_1)f_1(y_1) g 1 ( y 1 ) f 1 ( y 1 ) does not depend on y 2 y_2 y 2 , so it factors out of the d y 2 dy_2 d y 2 integral.
5 Expected Values for Multivariate Distributions ¶ E [ g ( Y 1 , Y 2 ) ] = { ∑ y 1 ∑ y 2 g ( y 1 , y 2 ) ⋅ p ( y 1 , y 2 ) (discrete) ∫ ∫ g ( y 1 , y 2 ) ⋅ f ( y 1 , y 2 ) d y 1 d y 2 (continuous) E[g(Y_1, Y_2)] = \begin{cases} \sum_{y_1}\sum_{y_2} g(y_1, y_2) \cdot p(y_1, y_2) & \text{(discrete)} \\ \int\int g(y_1, y_2) \cdot f(y_1, y_2)\, dy_1\, dy_2 & \text{(continuous)} \end{cases} E [ g ( Y 1 , Y 2 )] = { ∑ y 1 ∑ y 2 g ( y 1 , y 2 ) ⋅ p ( y 1 , y 2 ) ∫∫ g ( y 1 , y 2 ) ⋅ f ( y 1 , y 2 ) d y 1 d y 2 (discrete) (continuous) EXAMPLE. For the smartphone data, E ( Y 1 + Y 2 ) = ∑ ∑ ( y 1 + y 2 ) p ( y 1 , y 2 ) E(Y_1 + Y_2) = \sum\sum (y_1+y_2)p(y_1,y_2) E ( Y 1 + Y 2 ) = ∑∑ ( y 1 + y 2 ) p ( y 1 , y 2 ) :
= ( 0 + 0 ) ( 0.80 ) + ( 1 + 0 ) ( 0.10 ) + ( 0 + 1 ) ( 0.05 ) + ( 1 + 1 ) ( 0.05 ) = 0 + 0.10 + 0.05 + 0.10 = 0.25 = (0+0)(0.80)+(1+0)(0.10)+(0+1)(0.05)+(1+1)(0.05) = 0 + 0.10 + 0.05 + 0.10 = 0.25 = ( 0 + 0 ) ( 0.80 ) + ( 1 + 0 ) ( 0.10 ) + ( 0 + 1 ) ( 0.05 ) + ( 1 + 1 ) ( 0.05 ) = 0 + 0.10 + 0.05 + 0.10 = 0.25 Note: E ( Y 1 ) = 0 ( 0.85 ) + 1 ( 0.15 ) = 0.15 E(Y_1) = 0(0.85)+1(0.15) = 0.15 E ( Y 1 ) = 0 ( 0.85 ) + 1 ( 0.15 ) = 0.15 and E ( Y 2 ) = 0 ( 0.90 ) + 1 ( 0.10 ) = 0.10 E(Y_2) = 0(0.90)+1(0.10) = 0.10 E ( Y 2 ) = 0 ( 0.90 ) + 1 ( 0.10 ) = 0.10 . So E ( Y 1 + Y 2 ) = 0.25 = 0.15 + 0.10 = E ( Y 1 ) + E ( Y 2 ) E(Y_1+Y_2) = 0.25 = 0.15 + 0.10 = E(Y_1) + E(Y_2) E ( Y 1 + Y 2 ) = 0.25 = 0.15 + 0.10 = E ( Y 1 ) + E ( Y 2 ) . Linearity of expectation holds — even when the variables are not independent.
6 Covariance and Correlation ¶ Covariance measures how two random variables move together. Positive covariance means they tend to increase together; negative means one tends to increase when the other decreases. Correlation standardizes this to the interval [ − 1 , 1 ] [-1, 1] [ − 1 , 1 ] .
Strategy: Expand the product ( Y 1 − μ 1 ) ( Y 2 − μ 2 ) (Y_1 - \mu_1)(Y_2 - \mu_2) ( Y 1 − μ 1 ) ( Y 2 − μ 2 ) and apply linearity of expectation.
E [ ( Y 1 − μ 1 ) ( Y 2 − μ 2 ) ] = E [ Y 1 Y 2 − μ 2 Y 1 − μ 1 Y 2 + μ 1 μ 2 ] E[(Y_1-\mu_1)(Y_2-\mu_2)] = E[Y_1 Y_2 - \mu_2 Y_1 - \mu_1 Y_2 + \mu_1\mu_2] E [( Y 1 − μ 1 ) ( Y 2 − μ 2 )] = E [ Y 1 Y 2 − μ 2 Y 1 − μ 1 Y 2 + μ 1 μ 2 ] By linearity: = E ( Y 1 Y 2 ) − μ 2 E ( Y 1 ) − μ 1 E ( Y 2 ) + μ 1 μ 2 = E(Y_1 Y_2) - \mu_2 E(Y_1) - \mu_1 E(Y_2) + \mu_1\mu_2 = E ( Y 1 Y 2 ) − μ 2 E ( Y 1 ) − μ 1 E ( Y 2 ) + μ 1 μ 2
Substituting E ( Y 1 ) = μ 1 E(Y_1) = \mu_1 E ( Y 1 ) = μ 1 , E ( Y 2 ) = μ 2 E(Y_2) = \mu_2 E ( Y 2 ) = μ 2 :
= E ( Y 1 Y 2 ) − μ 1 μ 2 − μ 1 μ 2 + μ 1 μ 2 = E ( Y 1 Y 2 ) − μ 1 μ 2 ■ = E(Y_1 Y_2) - \mu_1\mu_2 - \mu_1\mu_2 + \mu_1\mu_2 = E(Y_1 Y_2) - \mu_1\mu_2 \quad \blacksquare = E ( Y 1 Y 2 ) − μ 1 μ 2 − μ 1 μ 2 + μ 1 μ 2 = E ( Y 1 Y 2 ) − μ 1 μ 2 ■ Key fact: If Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 are independent, then E ( Y 1 Y 2 ) = E ( Y 1 ) E ( Y 2 ) E(Y_1 Y_2) = E(Y_1)E(Y_2) E ( Y 1 Y 2 ) = E ( Y 1 ) E ( Y 2 ) , so Cov ( Y 1 , Y 2 ) = 0 \text{Cov}(Y_1, Y_2) = 0 Cov ( Y 1 , Y 2 ) = 0 .
The converse is FALSE. Zero covariance does not imply independence. Covariance only detects linear association.
EXAMPLE (Smartphone). E ( Y 1 Y 2 ) = ( 0 ) ( 0 ) ( 0.80 ) + ( 1 ) ( 0 ) ( 0.10 ) + ( 0 ) ( 1 ) ( 0.05 ) + ( 1 ) ( 1 ) ( 0.05 ) = 0.05 E(Y_1 Y_2) = (0)(0)(0.80)+(1)(0)(0.10)+(0)(1)(0.05)+(1)(1)(0.05) = 0.05 E ( Y 1 Y 2 ) = ( 0 ) ( 0 ) ( 0.80 ) + ( 1 ) ( 0 ) ( 0.10 ) + ( 0 ) ( 1 ) ( 0.05 ) + ( 1 ) ( 1 ) ( 0.05 ) = 0.05 .
Cov ( Y 1 , Y 2 ) = 0.05 − ( 0.15 ) ( 0.10 ) = 0.05 − 0.015 = 0.035 > 0. \text{Cov}(Y_1, Y_2) = 0.05 - (0.15)(0.10) = 0.05 - 0.015 = 0.035 > 0. Cov ( Y 1 , Y 2 ) = 0.05 − ( 0.15 ) ( 0.10 ) = 0.05 − 0.015 = 0.035 > 0.
Positive covariance: screen and battery defects tend to occur together.
ρ = Corr ( Y 1 , Y 2 ) = Cov ( Y 1 , Y 2 ) σ 1 σ 2 \rho = \text{Corr}(Y_1, Y_2) = \frac{\text{Cov}(Y_1, Y_2)}{\sigma_1 \sigma_2} ρ = Corr ( Y 1 , Y 2 ) = σ 1 σ 2 Cov ( Y 1 , Y 2 ) where σ 1 = V ( Y 1 ) \sigma_1 = \sqrt{V(Y_1)} σ 1 = V ( Y 1 ) and σ 2 = V ( Y 2 ) \sigma_2 = \sqrt{V(Y_2)} σ 2 = V ( Y 2 ) .
Properties: − 1 ≤ ρ ≤ 1 -1 \leq \rho \leq 1 − 1 ≤ ρ ≤ 1 . ∣ ρ ∣ = 1 |\rho| = 1 ∣ ρ ∣ = 1 if and only if Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 are perfectly linearly related.
7 Variance of Linear Combinations ¶ This is the payoff section — the formulas that make portfolio theory, error propagation, and sampling theory work. We derive E E E and V V V of a 1 Y 1 + a 2 Y 2 + ⋯ + a n Y n a_1 Y_1 + a_2 Y_2 + \cdots + a_n Y_n a 1 Y 1 + a 2 Y 2 + ⋯ + a n Y n .
Let Y 1 , … , Y n Y_1, \ldots, Y_n Y 1 , … , Y n be random variables (not necessarily independent) with means μ i \mu_i μ i and variances σ i 2 \sigma_i^2 σ i 2 . Let a 1 , … , a n a_1, \ldots, a_n a 1 , … , a n be constants.
Expected value (always, no conditions):
E ( ∑ i = 1 n a i Y i ) = ∑ i = 1 n a i μ i E\left(\sum_{i=1}^n a_i Y_i\right) = \sum_{i=1}^n a_i \mu_i E ( i = 1 ∑ n a i Y i ) = i = 1 ∑ n a i μ i Variance (general case):
V ( ∑ i = 1 n a i Y i ) = ∑ i = 1 n a i 2 σ i 2 + 2 ∑ i < j a i a j Cov ( Y i , Y j ) V\left(\sum_{i=1}^n a_i Y_i\right) = \sum_{i=1}^n a_i^2 \sigma_i^2 + 2\sum_{i<j} a_i a_j \text{Cov}(Y_i, Y_j) V ( i = 1 ∑ n a i Y i ) = i = 1 ∑ n a i 2 σ i 2 + 2 i < j ∑ a i a j Cov ( Y i , Y j ) If Y 1 , … , Y n Y_1, \ldots, Y_n Y 1 , … , Y n are independent (all covariances are zero):
V ( ∑ i = 1 n a i Y i ) = ∑ i = 1 n a i 2 σ i 2 V\left(\sum_{i=1}^n a_i Y_i\right) = \sum_{i=1}^n a_i^2 \sigma_i^2 V ( i = 1 ∑ n a i Y i ) = i = 1 ∑ n a i 2 σ i 2 Expected value: E ( a 1 Y 1 + a 2 Y 2 ) = a 1 E ( Y 1 ) + a 2 E ( Y 2 ) = a 1 μ 1 + a 2 μ 2 E(a_1 Y_1 + a_2 Y_2) = a_1 E(Y_1) + a_2 E(Y_2) = a_1\mu_1 + a_2\mu_2 E ( a 1 Y 1 + a 2 Y 2 ) = a 1 E ( Y 1 ) + a 2 E ( Y 2 ) = a 1 μ 1 + a 2 μ 2 . (Linearity.)
Variance: Let W = a 1 Y 1 + a 2 Y 2 W = a_1 Y_1 + a_2 Y_2 W = a 1 Y 1 + a 2 Y 2 . Then E ( W ) = a 1 μ 1 + a 2 μ 2 E(W) = a_1\mu_1 + a_2\mu_2 E ( W ) = a 1 μ 1 + a 2 μ 2 .
V ( W ) = E [ ( W − E ( W ) ) 2 ] = E [ ( a 1 ( Y 1 − μ 1 ) + a 2 ( Y 2 − μ 2 ) ) 2 ] V(W) = E[(W - E(W))^2] = E[(a_1(Y_1-\mu_1) + a_2(Y_2-\mu_2))^2] V ( W ) = E [( W − E ( W ) ) 2 ] = E [( a 1 ( Y 1 − μ 1 ) + a 2 ( Y 2 − μ 2 ) ) 2 ] Expanding the square:
= E [ a 1 2 ( Y 1 − μ 1 ) 2 + 2 a 1 a 2 ( Y 1 − μ 1 ) ( Y 2 − μ 2 ) + a 2 2 ( Y 2 − μ 2 ) 2 ] = E[a_1^2(Y_1-\mu_1)^2 + 2a_1 a_2(Y_1-\mu_1)(Y_2-\mu_2) + a_2^2(Y_2-\mu_2)^2] = E [ a 1 2 ( Y 1 − μ 1 ) 2 + 2 a 1 a 2 ( Y 1 − μ 1 ) ( Y 2 − μ 2 ) + a 2 2 ( Y 2 − μ 2 ) 2 ] By linearity:
= a 1 2 E [ ( Y 1 − μ 1 ) 2 ] + 2 a 1 a 2 E [ ( Y 1 − μ 1 ) ( Y 2 − μ 2 ) ] + a 2 2 E [ ( Y 2 − μ 2 ) 2 ] = a_1^2 E[(Y_1-\mu_1)^2] + 2a_1 a_2 E[(Y_1-\mu_1)(Y_2-\mu_2)] + a_2^2 E[(Y_2-\mu_2)^2] = a 1 2 E [( Y 1 − μ 1 ) 2 ] + 2 a 1 a 2 E [( Y 1 − μ 1 ) ( Y 2 − μ 2 )] + a 2 2 E [( Y 2 − μ 2 ) 2 ] = a 1 2 σ 1 2 + 2 a 1 a 2 Cov ( Y 1 , Y 2 ) + a 2 2 σ 2 2 ■ = a_1^2 \sigma_1^2 + 2a_1 a_2 \text{Cov}(Y_1, Y_2) + a_2^2 \sigma_2^2 \quad \blacksquare = a 1 2 σ 1 2 + 2 a 1 a 2 Cov ( Y 1 , Y 2 ) + a 2 2 σ 2 2 ■ EXAMPLE: Portfolio Risk (Solving the Opening Problem).
Stock A: μ A = 0.12 \mu_A = 0.12 μ A = 0.12 , σ A = 0.20 \sigma_A = 0.20 σ A = 0.20 . Stock B: μ B = 0.08 \mu_B = 0.08 μ B = 0.08 , σ B = 0.15 \sigma_B = 0.15 σ B = 0.15 . Portfolio: R = 0.6 Y A + 0.4 Y B R = 0.6Y_A + 0.4Y_B R = 0.6 Y A + 0.4 Y B .
Expected return: E ( R ) = 0.6 ( 0.12 ) + 0.4 ( 0.08 ) = 0.072 + 0.032 = 0.104 = 10.4 % E(R) = 0.6(0.12) + 0.4(0.08) = 0.072 + 0.032 = 0.104 = 10.4\% E ( R ) = 0.6 ( 0.12 ) + 0.4 ( 0.08 ) = 0.072 + 0.032 = 0.104 = 10.4%
Variance (if independent, ρ = 0 \rho = 0 ρ = 0 ):
V ( R ) = ( 0.6 ) 2 ( 0.04 ) + ( 0.4 ) 2 ( 0.0225 ) = 0.0144 + 0.0036 = 0.018 V(R) = (0.6)^2(0.04) + (0.4)^2(0.0225) = 0.0144 + 0.0036 = 0.018 V ( R ) = ( 0.6 ) 2 ( 0.04 ) + ( 0.4 ) 2 ( 0.0225 ) = 0.0144 + 0.0036 = 0.018 σ R = 0.018 = 0.1342 = 13.42 % \sigma_R = \sqrt{0.018} = 0.1342 = 13.42\% σ R = 0.018 = 0.1342 = 13.42% Variance (if ρ = 0.5 \rho = 0.5 ρ = 0.5 ): Cov ( Y A , Y B ) = ρ σ A σ B = 0.5 ( 0.20 ) ( 0.15 ) = 0.015 \text{Cov}(Y_A, Y_B) = \rho \sigma_A \sigma_B = 0.5(0.20)(0.15) = 0.015 Cov ( Y A , Y B ) = ρ σ A σ B = 0.5 ( 0.20 ) ( 0.15 ) = 0.015
V ( R ) = 0.018 + 2 ( 0.6 ) ( 0.4 ) ( 0.015 ) = 0.018 + 0.0072 = 0.0252 V(R) = 0.018 + 2(0.6)(0.4)(0.015) = 0.018 + 0.0072 = 0.0252 V ( R ) = 0.018 + 2 ( 0.6 ) ( 0.4 ) ( 0.015 ) = 0.018 + 0.0072 = 0.0252 σ R = 0.0252 = 0.1587 = 15.87 % \sigma_R = \sqrt{0.0252} = 0.1587 = 15.87\% σ R = 0.0252 = 0.1587 = 15.87% Positive correlation increases risk. This is why diversification (low or negative ρ \rho ρ ) reduces portfolio volatility.
8 Conditional Expectation ¶ 9 Conditional Variance and the Law of Total Variance ¶ The Tower Property tells us how conditional means relate to the overall mean. There is an equally important decomposition for variance — the Law of Total Variance (also called Eve’s Law or the EVVE formula ). It decomposes V ( Y ) V(Y) V ( Y ) into two interpretable pieces: the average “within-group” variance and the “between-group” variance of the conditional means. This decomposition is the mathematical foundation for ANOVA and plays a central role in Bayesian statistics, credibility theory in actuarial science, and hierarchical modeling.
The conditional variance of Y 1 Y_1 Y 1 given Y 2 = y 2 Y_2 = y_2 Y 2 = y 2 is:
V ( Y 1 ∣ Y 2 = y 2 ) = E [ ( Y 1 − E ( Y 1 ∣ Y 2 = y 2 ) ) 2 | Y 2 = y 2 ] = E ( Y 1 2 ∣ Y 2 = y 2 ) − [ E ( Y 1 ∣ Y 2 = y 2 ) ] 2 V(Y_1 | Y_2 = y_2) = E\!\left[(Y_1 - E(Y_1|Y_2=y_2))^2 \,\middle|\, Y_2 = y_2\right] = E(Y_1^2 | Y_2 = y_2) - [E(Y_1|Y_2 = y_2)]^2 V ( Y 1 ∣ Y 2 = y 2 ) = E [ ( Y 1 − E ( Y 1 ∣ Y 2 = y 2 ) ) 2 ∣ ∣ Y 2 = y 2 ] = E ( Y 1 2 ∣ Y 2 = y 2 ) − [ E ( Y 1 ∣ Y 2 = y 2 ) ] 2 This is the variance of the conditional distribution of Y 1 Y_1 Y 1 given Y 2 = y 2 Y_2 = y_2 Y 2 = y 2 . It measures the remaining uncertainty in Y 1 Y_1 Y 1 after observing Y 2 Y_2 Y 2 . If Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 are independent, the conditional variance equals the unconditional variance: knowing Y 2 Y_2 Y 2 doesn’t reduce our uncertainty about Y 1 Y_1 Y 1 .
For any random variables Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 with V ( Y 1 ) < ∞ V(Y_1) < \infty V ( Y 1 ) < ∞ :
V ( Y 1 ) = E [ V ( Y 1 ∣ Y 2 ) ] + V ( E ( Y 1 ∣ Y 2 ) ) V(Y_1) = E\!\left[V(Y_1 | Y_2)\right] + V\!\left(E(Y_1 | Y_2)\right) V ( Y 1 ) = E [ V ( Y 1 ∣ Y 2 ) ] + V ( E ( Y 1 ∣ Y 2 ) ) In words:
Total variance = E [ conditional variance ] ⏟ average within-group spread + V ( conditional mean ) ⏟ between-group spread of means \text{Total variance} = \underbrace{E[\text{conditional variance}]}_{\text{average within-group spread}} + \underbrace{V(\text{conditional mean})}_{\text{between-group spread of means}} Total variance = average within-group spread E [ conditional variance ] + between-group spread of means V ( conditional mean ) The first term measures the average spread within groups defined by Y 2 Y_2 Y 2 . The second term measures how much the group means differ from each other. Together, they account for all the variability in Y 1 Y_1 Y 1 .
Strategy: Write both terms on the right in terms of E ( Y 1 2 ) E(Y_1^2) E ( Y 1 2 ) and E ( Y 1 ) 2 E(Y_1)^2 E ( Y 1 ) 2 , and show they sum to V ( Y 1 ) = E ( Y 1 2 ) − [ E ( Y 1 ) ] 2 V(Y_1) = E(Y_1^2) - [E(Y_1)]^2 V ( Y 1 ) = E ( Y 1 2 ) − [ E ( Y 1 ) ] 2 .
Let g ( Y 2 ) = E ( Y 1 ∣ Y 2 ) g(Y_2) = E(Y_1 | Y_2) g ( Y 2 ) = E ( Y 1 ∣ Y 2 ) . By the Tower Property, E [ g ( Y 2 ) ] = E ( Y 1 ) E[g(Y_2)] = E(Y_1) E [ g ( Y 2 )] = E ( Y 1 ) .
First term: E [ V ( Y 1 ∣ Y 2 ) ] = E [ E ( Y 1 2 ∣ Y 2 ) − g ( Y 2 ) 2 ] = E [ E ( Y 1 2 ∣ Y 2 ) ] − E [ g ( Y 2 ) 2 ] E[V(Y_1|Y_2)] = E[E(Y_1^2|Y_2) - g(Y_2)^2] = E[E(Y_1^2|Y_2)] - E[g(Y_2)^2] E [ V ( Y 1 ∣ Y 2 )] = E [ E ( Y 1 2 ∣ Y 2 ) − g ( Y 2 ) 2 ] = E [ E ( Y 1 2 ∣ Y 2 )] − E [ g ( Y 2 ) 2 ]
By the Tower Property applied to Y 1 2 Y_1^2 Y 1 2 : E [ E ( Y 1 2 ∣ Y 2 ) ] = E ( Y 1 2 ) E[E(Y_1^2|Y_2)] = E(Y_1^2) E [ E ( Y 1 2 ∣ Y 2 )] = E ( Y 1 2 ) . So:
E [ V ( Y 1 ∣ Y 2 ) ] = E ( Y 1 2 ) − E [ g ( Y 2 ) 2 ] (i) E[V(Y_1|Y_2)] = E(Y_1^2) - E[g(Y_2)^2] \tag{i} E [ V ( Y 1 ∣ Y 2 )] = E ( Y 1 2 ) − E [ g ( Y 2 ) 2 ] ( i ) Second term: V(E(Y_1|Y_2)) = V(g(Y_2)) = E[g(Y_2)^2] - [E(g(Y_2))]^2 = E[g(Y_2)^2] - [E(Y_1)]^2 \tag{ii}
Adding (i) and (ii): The E [ g ( Y 2 ) 2 ] E[g(Y_2)^2] E [ g ( Y 2 ) 2 ] terms cancel:
E [ V ( Y 1 ∣ Y 2 ) ] + V ( E ( Y 1 ∣ Y 2 ) ) = E ( Y 1 2 ) − [ E ( Y 1 ) ] 2 = V ( Y 1 ) ■ E[V(Y_1|Y_2)] + V(E(Y_1|Y_2)) = E(Y_1^2) - [E(Y_1)]^2 = V(Y_1) \quad \blacksquare E [ V ( Y 1 ∣ Y 2 )] + V ( E ( Y 1 ∣ Y 2 )) = E ( Y 1 2 ) − [ E ( Y 1 ) ] 2 = V ( Y 1 ) ■ The Problem.
For f ( y 1 , y 2 ) = 6 y 1 f(y_1, y_2) = 6y_1 f ( y 1 , y 2 ) = 6 y 1 on 0 < y 1 < y 2 < 1 0 < y_1 < y_2 < 1 0 < y 1 < y 2 < 1 (our running example), verify Eve’s Law.
Solution.
From earlier examples: E ( Y 1 ∣ Y 2 = y 2 ) = 2 y 2 3 E(Y_1|Y_2 = y_2) = \frac{2y_2}{3} E ( Y 1 ∣ Y 2 = y 2 ) = 3 2 y 2 and f 2 ( y 2 ) = 3 y 2 2 f_2(y_2) = 3y_2^2 f 2 ( y 2 ) = 3 y 2 2 .
Step 1: Find V ( Y 1 ∣ Y 2 = y 2 ) V(Y_1|Y_2 = y_2) V ( Y 1 ∣ Y 2 = y 2 ) .
E ( Y 1 2 ∣ Y 2 = y 2 ) = ∫ 0 y 2 y 1 2 ⋅ 2 y 1 y 2 2 d y 1 = 2 y 2 2 ⋅ y 2 4 4 = y 2 2 2 E(Y_1^2|Y_2=y_2) = \int_0^{y_2} y_1^2 \cdot \frac{2y_1}{y_2^2}\, dy_1 = \frac{2}{y_2^2}\cdot\frac{y_2^4}{4} = \frac{y_2^2}{2} E ( Y 1 2 ∣ Y 2 = y 2 ) = ∫ 0 y 2 y 1 2 ⋅ y 2 2 2 y 1 d y 1 = y 2 2 2 ⋅ 4 y 2 4 = 2 y 2 2
V ( Y 1 ∣ Y 2 = y 2 ) = y 2 2 2 − ( 2 y 2 3 ) 2 = y 2 2 2 − 4 y 2 2 9 = y 2 2 18 V(Y_1|Y_2=y_2) = \frac{y_2^2}{2} - \left(\frac{2y_2}{3}\right)^2 = \frac{y_2^2}{2} - \frac{4y_2^2}{9} = \frac{y_2^2}{18} V ( Y 1 ∣ Y 2 = y 2 ) = 2 y 2 2 − ( 3 2 y 2 ) 2 = 2 y 2 2 − 9 4 y 2 2 = 18 y 2 2
Step 2: Compute E [ V ( Y 1 ∣ Y 2 ) ] E[V(Y_1|Y_2)] E [ V ( Y 1 ∣ Y 2 )] .
E [ Y 2 2 18 ] = 1 18 ∫ 0 1 y 2 2 ⋅ 3 y 2 2 d y 2 = 1 18 ∫ 0 1 3 y 2 4 d y 2 = 1 18 ⋅ 3 5 = 1 30 E\!\left[\frac{Y_2^2}{18}\right] = \frac{1}{18}\int_0^1 y_2^2 \cdot 3y_2^2\, dy_2 = \frac{1}{18}\int_0^1 3y_2^4\, dy_2 = \frac{1}{18}\cdot\frac{3}{5} = \frac{1}{30} E [ 18 Y 2 2 ] = 18 1 ∫ 0 1 y 2 2 ⋅ 3 y 2 2 d y 2 = 18 1 ∫ 0 1 3 y 2 4 d y 2 = 18 1 ⋅ 5 3 = 30 1
Step 3: Compute V ( E ( Y 1 ∣ Y 2 ) ) V(E(Y_1|Y_2)) V ( E ( Y 1 ∣ Y 2 )) .
V ( 2 Y 2 3 ) = 4 9 V ( Y 2 ) V\!\left(\frac{2Y_2}{3}\right) = \frac{4}{9}V(Y_2) V ( 3 2 Y 2 ) = 9 4 V ( Y 2 )
E ( Y 2 ) = ∫ 0 1 y 2 ⋅ 3 y 2 2 d y 2 = 3 4 E(Y_2) = \int_0^1 y_2 \cdot 3y_2^2\, dy_2 = \frac{3}{4} E ( Y 2 ) = ∫ 0 1 y 2 ⋅ 3 y 2 2 d y 2 = 4 3 , E ( Y 2 2 ) = ∫ 0 1 y 2 2 ⋅ 3 y 2 2 d y 2 = 3 5 \quad E(Y_2^2) = \int_0^1 y_2^2 \cdot 3y_2^2\, dy_2 = \frac{3}{5} E ( Y 2 2 ) = ∫ 0 1 y 2 2 ⋅ 3 y 2 2 d y 2 = 5 3
V ( Y 2 ) = 3 5 − 9 16 = 48 − 45 80 = 3 80 V(Y_2) = \frac{3}{5} - \frac{9}{16} = \frac{48-45}{80} = \frac{3}{80} V ( Y 2 ) = 5 3 − 16 9 = 80 48 − 45 = 80 3
V ( E ( Y 1 ∣ Y 2 ) ) = 4 9 ⋅ 3 80 = 12 720 = 1 60 V(E(Y_1|Y_2)) = \frac{4}{9}\cdot\frac{3}{80} = \frac{12}{720} = \frac{1}{60} V ( E ( Y 1 ∣ Y 2 )) = 9 4 ⋅ 80 3 = 720 12 = 60 1
Step 4: Verify.
E [ V ( Y 1 ∣ Y 2 ) ] + V ( E ( Y 1 ∣ Y 2 ) ) = 1 30 + 1 60 = 2 60 + 1 60 = 3 60 = 1 20 E[V(Y_1|Y_2)] + V(E(Y_1|Y_2)) = \frac{1}{30} + \frac{1}{60} = \frac{2}{60} + \frac{1}{60} = \frac{3}{60} = \frac{1}{20} E [ V ( Y 1 ∣ Y 2 )] + V ( E ( Y 1 ∣ Y 2 )) = 30 1 + 60 1 = 60 2 + 60 1 = 60 3 = 20 1
Check directly: E ( Y 1 2 ) = ∫ 0 1 ∫ y 1 1 y 1 2 ⋅ 6 y 1 d y 2 d y 1 = ∫ 0 1 6 y 1 3 ( 1 − y 1 ) d y 1 = 6 4 − 6 5 = 3 10 E(Y_1^2) = \int_0^1 \int_{y_1}^1 y_1^2 \cdot 6y_1\, dy_2\, dy_1 = \int_0^1 6y_1^3(1-y_1)\, dy_1 = \frac{6}{4} - \frac{6}{5} = \frac{3}{10} E ( Y 1 2 ) = ∫ 0 1 ∫ y 1 1 y 1 2 ⋅ 6 y 1 d y 2 d y 1 = ∫ 0 1 6 y 1 3 ( 1 − y 1 ) d y 1 = 4 6 − 5 6 = 10 3
V ( Y 1 ) = 3 10 − ( 1 2 ) 2 = 3 10 − 1 4 = 1 20 ✓ V(Y_1) = \frac{3}{10} - \left(\frac{1}{2}\right)^2 = \frac{3}{10} - \frac{1}{4} = \frac{1}{20} \quad \checkmark V ( Y 1 ) = 10 3 − ( 2 1 ) 2 = 10 3 − 4 1 = 20 1 ✓
9.1 Section Exercises: Conditional Variance ¶ CV.1. For independent Y 1 , Y 2 Y_1, Y_2 Y 1 , Y 2 with V ( Y 1 ) = σ 2 V(Y_1) = \sigma^2 V ( Y 1 ) = σ 2 , show that Eve’s Law gives V ( Y 1 ) = σ 2 V(Y_1) = \sigma^2 V ( Y 1 ) = σ 2 (the first term equals σ 2 \sigma^2 σ 2 and the second equals 0).
CV.2. Let N ∼ Poisson ( λ ) N \sim \text{Poisson}(\lambda) N ∼ Poisson ( λ ) and given N = n N = n N = n , let X ∣ N = n ∼ Binomial ( n , p ) X | N=n \sim \text{Binomial}(n, p) X ∣ N = n ∼ Binomial ( n , p ) . Use Eve’s Law to find V ( X ) V(X) V ( X ) . (Hint: E ( X ∣ N ) = N p E(X|N) = Np E ( X ∣ N ) = Np , V ( X ∣ N ) = N p ( 1 − p ) V(X|N) = Np(1-p) V ( X ∣ N ) = Np ( 1 − p ) .)
10 The Bivariate Normal Distribution ¶ The bivariate normal distribution is the most important joint continuous distribution in all of statistics. It describes the joint behavior of two normally distributed random variables that may be correlated. It has a remarkable property that no other distribution shares: for bivariate normal, zero correlation implies independence. This section defines the distribution, states its key properties (with proofs where instructive), and shows how conditional distributions lead directly to the idea of linear regression.
Random variables Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 have a bivariate normal distribution with parameters μ 1 , μ 2 , σ 1 2 , σ 2 2 , ρ \mu_1, \mu_2, \sigma_1^2, \sigma_2^2, \rho μ 1 , μ 2 , σ 1 2 , σ 2 2 , ρ (five parameters) if their joint PDF is:
f ( y 1 , y 2 ) = 1 2 π σ 1 σ 2 1 − ρ 2 exp { − 1 2 ( 1 − ρ 2 ) [ ( y 1 − μ 1 σ 1 ) 2 − 2 ρ ( y 1 − μ 1 σ 1 ) ( y 2 − μ 2 σ 2 ) + ( y 2 − μ 2 σ 2 ) 2 ] } f(y_1, y_2) = \frac{1}{2\pi\sigma_1\sigma_2\sqrt{1-\rho^2}} \exp\!\left\{-\frac{1}{2(1-\rho^2)}\left[\left(\frac{y_1 - \mu_1}{\sigma_1}\right)^2 - 2\rho\left(\frac{y_1-\mu_1}{\sigma_1}\right)\left(\frac{y_2-\mu_2}{\sigma_2}\right) + \left(\frac{y_2-\mu_2}{\sigma_2}\right)^2\right]\right\} f ( y 1 , y 2 ) = 2 π σ 1 σ 2 1 − ρ 2 1 exp { − 2 ( 1 − ρ 2 ) 1 [ ( σ 1 y 1 − μ 1 ) 2 − 2 ρ ( σ 1 y 1 − μ 1 ) ( σ 2 y 2 − μ 2 ) + ( σ 2 y 2 − μ 2 ) 2 ] } for all ( y 1 , y 2 ) ∈ R 2 (y_1, y_2) \in \mathbb{R}^2 ( y 1 , y 2 ) ∈ R 2 .
Parameter meanings:
μ 1 , μ 2 \mu_1, \mu_2 μ 1 , μ 2 : the means of Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2
σ 1 2 , σ 2 2 \sigma_1^2, \sigma_2^2 σ 1 2 , σ 2 2 : the variances of Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2
ρ = Corr ( Y 1 , Y 2 ) \rho = \text{Corr}(Y_1, Y_2) ρ = Corr ( Y 1 , Y 2 ) : the correlation between Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 , with − 1 < ρ < 1 -1 < \rho < 1 − 1 < ρ < 1
We write ( Y 1 , Y 2 ) ∼ BVN ( μ 1 , μ 2 , σ 1 2 , σ 2 2 , ρ ) (Y_1, Y_2) \sim \text{BVN}(\mu_1, \mu_2, \sigma_1^2, \sigma_2^2, \rho) ( Y 1 , Y 2 ) ∼ BVN ( μ 1 , μ 2 , σ 1 2 , σ 2 2 , ρ ) .
The formula looks intimidating, but you rarely need to evaluate it directly. What matters are the properties .
10.1 Key Properties of the Bivariate Normal ¶ If ( Y 1 , Y 2 ) ∼ BVN ( μ 1 , μ 2 , σ 1 2 , σ 2 2 , ρ ) (Y_1, Y_2) \sim \text{BVN}(\mu_1, \mu_2, \sigma_1^2, \sigma_2^2, \rho) ( Y 1 , Y 2 ) ∼ BVN ( μ 1 , μ 2 , σ 1 2 , σ 2 2 , ρ ) , then:
1. Marginals are normal. Y 1 ∼ N ( μ 1 , σ 1 2 ) Y_1 \sim N(\mu_1, \sigma_1^2) Y 1 ∼ N ( μ 1 , σ 1 2 ) and Y 2 ∼ N ( μ 2 , σ 2 2 ) Y_2 \sim N(\mu_2, \sigma_2^2) Y 2 ∼ N ( μ 2 , σ 2 2 ) .
2. Conditionals are normal. The conditional distribution of Y 1 Y_1 Y 1 given Y 2 = y 2 Y_2 = y_2 Y 2 = y 2 is:
Y 1 ∣ Y 2 = y 2 ∼ N ( μ 1 + ρ σ 1 σ 2 ( y 2 − μ 2 ) , σ 1 2 ( 1 − ρ 2 ) ) Y_1 | Y_2 = y_2 \sim N\!\left(\mu_1 + \rho\frac{\sigma_1}{\sigma_2}(y_2 - \mu_2), \quad \sigma_1^2(1-\rho^2)\right) Y 1 ∣ Y 2 = y 2 ∼ N ( μ 1 + ρ σ 2 σ 1 ( y 2 − μ 2 ) , σ 1 2 ( 1 − ρ 2 ) ) In particular:
E ( Y 1 ∣ Y 2 = y 2 ) = μ 1 + ρ σ 1 σ 2 ( y 2 − μ 2 ) E(Y_1|Y_2 = y_2) = \mu_1 + \rho\frac{\sigma_1}{\sigma_2}(y_2 - \mu_2) E ( Y 1 ∣ Y 2 = y 2 ) = μ 1 + ρ σ 2 σ 1 ( y 2 − μ 2 ) V ( Y 1 ∣ Y 2 = y 2 ) = σ 1 2 ( 1 − ρ 2 ) V(Y_1|Y_2 = y_2) = \sigma_1^2(1-\rho^2) V ( Y 1 ∣ Y 2 = y 2 ) = σ 1 2 ( 1 − ρ 2 ) 3. Zero correlation implies independence. If ρ = 0 \rho = 0 ρ = 0 , then Y 1 Y_1 Y 1 and Y 2 Y_2 Y 2 are independent.
4. Linear combinations are normal. a Y 1 + b Y 2 aY_1 + bY_2 a Y 1 + b Y 2 is normally distributed for any constants a , b a, b a , b .
Why Property 3 is remarkable: For general distributions, Cov = 0 \text{Cov} = 0 Cov = 0 does NOT imply independence — it only rules out linear association. The bivariate normal is special: uncorrelated does mean independent. This is because the joint PDF factors when ρ = 0 \rho = 0 ρ = 0 :
When ρ = 0 \rho = 0 ρ = 0 , the exponent becomes − 1 2 [ ( y 1 − μ 1 σ 1 ) 2 + ( y 2 − μ 2 σ 2 ) 2 ] -\frac{1}{2}\left[\left(\frac{y_1-\mu_1}{\sigma_1}\right)^2 + \left(\frac{y_2-\mu_2}{\sigma_2}\right)^2\right] − 2 1 [ ( σ 1 y 1 − μ 1 ) 2 + ( σ 2 y 2 − μ 2 ) 2 ] , which is a sum of two terms — one depending only on y 1 y_1 y 1 , the other only on y 2 y_2 y 2 . So f ( y 1 , y 2 ) = f 1 ( y 1 ) ⋅ f 2 ( y 2 ) f(y_1,y_2) = f_1(y_1) \cdot f_2(y_2) f ( y 1 , y 2 ) = f 1 ( y 1 ) ⋅ f 2 ( y 2 ) .
Why Property 2 matters for regression: The conditional mean E ( Y 1 ∣ Y 2 = y 2 ) = μ 1 + ρ σ 1 σ 2 ( y 2 − μ 2 ) E(Y_1|Y_2 = y_2) = \mu_1 + \rho\frac{\sigma_1}{\sigma_2}(y_2 - \mu_2) E ( Y 1 ∣ Y 2 = y 2 ) = μ 1 + ρ σ 2 σ 1 ( y 2 − μ 2 ) is a linear function of y 2 y_2 y 2 . This is the theoretical foundation of simple linear regression — the “best prediction” of Y 1 Y_1 Y 1 given Y 2 Y_2 Y 2 is a straight line with slope ρ σ 1 / σ 2 \rho\sigma_1/\sigma_2 ρ σ 1 / σ 2 .
The Problem.
Suppose the heights of married couples follow a bivariate normal distribution. Wives’ heights: μ 1 = 64 \mu_1 = 64 μ 1 = 64 inches, σ 1 = 2.5 \sigma_1 = 2.5 σ 1 = 2.5 inches. Husbands’ heights: μ 2 = 70 \mu_2 = 70 μ 2 = 70 inches, σ 2 = 3 \sigma_2 = 3 σ 2 = 3 inches. Correlation: ρ = 0.50 \rho = 0.50 ρ = 0.50 .
(a) If a husband is 76 inches tall, what is the expected height of his wife?
(b) What is the conditional standard deviation?
(c) What proportion of wives of 76-inch husbands are taller than 66 inches?
Solution.
(a) By Property 2:
E ( Y 1 ∣ Y 2 = 76 ) = 64 + 0.50 ⋅ 2.5 3 ( 76 − 70 ) = 64 + 0.50 ⋅ 2.5 3 ⋅ 6 = 64 + 2.5 = 66.5 inches E(Y_1 | Y_2 = 76) = 64 + 0.50 \cdot \frac{2.5}{3}(76 - 70) = 64 + 0.50 \cdot \frac{2.5}{3} \cdot 6 = 64 + 2.5 = 66.5 \text{ inches} E ( Y 1 ∣ Y 2 = 76 ) = 64 + 0.50 ⋅ 3 2.5 ( 76 − 70 ) = 64 + 0.50 ⋅ 3 2.5 ⋅ 6 = 64 + 2.5 = 66.5 inches (b) Conditional standard deviation:
σ Y 1 ∣ Y 2 = σ 1 1 − ρ 2 = 2.5 1 − 0.25 = 2.5 0.75 = 2.5 × 0.8660 = 2.165 inches \sigma_{Y_1|Y_2} = \sigma_1\sqrt{1-\rho^2} = 2.5\sqrt{1-0.25} = 2.5\sqrt{0.75} = 2.5 \times 0.8660 = 2.165 \text{ inches} σ Y 1 ∣ Y 2 = σ 1 1 − ρ 2 = 2.5 1 − 0.25 = 2.5 0.75 = 2.5 × 0.8660 = 2.165 inches Notice: the conditional SD (2.165) is smaller than the unconditional SD (2.5). Knowing the husband’s height reduces our uncertainty about the wife’s height.
(c) Y 1 ∣ Y 2 = 76 ∼ N ( 66.5 , 2.16 5 2 ) Y_1 | Y_2 = 76 \sim N(66.5, 2.165^2) Y 1 ∣ Y 2 = 76 ∼ N ( 66.5 , 2.16 5 2 ) .
P ( Y 1 > 66 ) = P ( Z > 66 − 66.5 2.165 ) = P ( Z > − 0.231 ) = 1 − Φ ( − 0.231 ) = Φ ( 0.231 ) ≈ 0.591 P(Y_1 > 66) = P\!\left(Z > \frac{66 - 66.5}{2.165}\right) = P(Z > -0.231) = 1 - \Phi(-0.231) = \Phi(0.231) \approx 0.591 P ( Y 1 > 66 ) = P ( Z > 2.165 66 − 66.5 ) = P ( Z > − 0.231 ) = 1 − Φ ( − 0.231 ) = Φ ( 0.231 ) ≈ 0.591 About 59.1% of wives of 76-inch husbands are taller than 66 inches.
The Problem.
Verify Eve’s Law for ( Y 1 , Y 2 ) ∼ BVN ( μ 1 , μ 2 , σ 1 2 , σ 2 2 , ρ ) (Y_1, Y_2) \sim \text{BVN}(\mu_1, \mu_2, \sigma_1^2, \sigma_2^2, \rho) ( Y 1 , Y 2 ) ∼ BVN ( μ 1 , μ 2 , σ 1 2 , σ 2 2 , ρ ) .
Solution.
V ( Y 1 ∣ Y 2 ) = σ 1 2 ( 1 − ρ 2 ) V(Y_1|Y_2) = \sigma_1^2(1-\rho^2) V ( Y 1 ∣ Y 2 ) = σ 1 2 ( 1 − ρ 2 ) — a constant (does not depend on Y 2 Y_2 Y 2 ). So:
E [ V ( Y 1 ∣ Y 2 ) ] = σ 1 2 ( 1 − ρ 2 ) E[V(Y_1|Y_2)] = \sigma_1^2(1-\rho^2) E [ V ( Y 1 ∣ Y 2 )] = σ 1 2 ( 1 − ρ 2 )
E ( Y 1 ∣ Y 2 ) = μ 1 + ρ σ 1 σ 2 ( Y 2 − μ 2 ) E(Y_1|Y_2) = \mu_1 + \rho\frac{\sigma_1}{\sigma_2}(Y_2 - \mu_2) E ( Y 1 ∣ Y 2 ) = μ 1 + ρ σ 2 σ 1 ( Y 2 − μ 2 ) , so:
V ( E ( Y 1 ∣ Y 2 ) ) = V ( ρ σ 1 σ 2 ( Y 2 − μ 2 ) ) = ρ 2 σ 1 2 σ 2 2 V ( Y 2 ) = ρ 2 σ 1 2 σ 2 2 σ 2 2 = ρ 2 σ 1 2 V(E(Y_1|Y_2)) = V\!\left(\rho\frac{\sigma_1}{\sigma_2}(Y_2-\mu_2)\right) = \rho^2\frac{\sigma_1^2}{\sigma_2^2} V(Y_2) = \rho^2\frac{\sigma_1^2}{\sigma_2^2}\sigma_2^2 = \rho^2\sigma_1^2 V ( E ( Y 1 ∣ Y 2 )) = V ( ρ σ 2 σ 1 ( Y 2 − μ 2 ) ) = ρ 2 σ 2 2 σ 1 2 V ( Y 2 ) = ρ 2 σ 2 2 σ 1 2 σ 2 2 = ρ 2 σ 1 2
Sum: σ 1 2 ( 1 − ρ 2 ) + ρ 2 σ 1 2 = σ 1 2 − ρ 2 σ 1 2 + ρ 2 σ 1 2 = σ 1 2 = V ( Y 1 ) ✓ \sigma_1^2(1-\rho^2) + \rho^2\sigma_1^2 = \sigma_1^2 - \rho^2\sigma_1^2 + \rho^2\sigma_1^2 = \sigma_1^2 = V(Y_1) \quad \checkmark σ 1 2 ( 1 − ρ 2 ) + ρ 2 σ 1 2 = σ 1 2 − ρ 2 σ 1 2 + ρ 2 σ 1 2 = σ 1 2 = V ( Y 1 ) ✓
Interpretation: Of the total variance σ 1 2 \sigma_1^2 σ 1 2 in Y 1 Y_1 Y 1 , the fraction ρ 2 \rho^2 ρ 2 is “explained” by the linear relationship with Y 2 Y_2 Y 2 , and the fraction 1 − ρ 2 1-\rho^2 1 − ρ 2 remains “unexplained.” This is why R 2 = ρ 2 R^2 = \rho^2 R 2 = ρ 2 in simple linear regression.
#| label: bvn-sim
# Simulate bivariate normal to visualize
set.seed(2026)
n <- 5000
mu1 <- 64; mu2 <- 70; s1 <- 2.5; s2 <- 3; rho <- 0.50
Z1 <- rnorm(n); Z2 <- rnorm(n)
Y1 <- mu1 + s1 * Z1
Y2 <- mu2 + s2 * (rho * Z1 + sqrt(1 - rho^2) * Z2)
plot(Y2, Y1, pch = '.', col = rgb(0.2,0.4,0.8,0.3),
xlab = "Husband height (in)", ylab = "Wife height (in)",
main = paste("Bivariate Normal, ρ =", rho))
abline(lm(Y1 ~ Y2), col = "red", lwd = 2)
cat("Sample cor =", round(cor(Y1, Y2), 3), " (theory:", rho, ")\n")
cat("Regression: slope =", round(coef(lm(Y1~Y2))[2], 3),
" theory: rho*s1/s2 =", round(rho*s1/s2, 3), "\n")10.2 Section Exercises: Bivariate Normal ¶ BN.1. If ( Y 1 , Y 2 ) ∼ BVN ( 10 , 20 , 4 , 9 , 0.6 ) (Y_1, Y_2) \sim \text{BVN}(10, 20, 4, 9, 0.6) ( Y 1 , Y 2 ) ∼ BVN ( 10 , 20 , 4 , 9 , 0.6 ) , find E ( Y 1 ∣ Y 2 = 25 ) E(Y_1|Y_2=25) E ( Y 1 ∣ Y 2 = 25 ) and V ( Y 1 ∣ Y 2 = 25 ) V(Y_1|Y_2=25) V ( Y 1 ∣ Y 2 = 25 ) .
BN.2. Show that when ρ = 0 \rho = 0 ρ = 0 , the bivariate normal PDF factors into f 1 ( y 1 ) ⋅ f 2 ( y 2 ) f_1(y_1) \cdot f_2(y_2) f 1 ( y 1 ) ⋅ f 2 ( y 2 ) , confirming independence.
BN.3. For the heights example (M.10), find E ( Y 2 ∣ Y 1 = 60 ) E(Y_2|Y_1 = 60) E ( Y 2 ∣ Y 1 = 60 ) — the expected husband’s height given a 60-inch wife.
BN.4. What fraction of the total variance of Y 1 Y_1 Y 1 is “explained” by Y 2 Y_2 Y 2 when ρ = 0.8 \rho = 0.8 ρ = 0.8 ? When ρ = 0.3 \rho = 0.3 ρ = 0.3 ?
11 The Multinomial Distribution (Optional) ¶ If each of n n n independent trials results in one of k k k categories with probabilities p 1 , p 2 , … , p k p_1, p_2, \ldots, p_k p 1 , p 2 , … , p k (∑ p i = 1 \sum p_i = 1 ∑ p i = 1 ), then the joint distribution of the counts ( Y 1 , Y 2 , … , Y k ) (Y_1, Y_2, \ldots, Y_k) ( Y 1 , Y 2 , … , Y k ) is:
p ( y 1 , y 2 , … , y k ) = n ! y 1 ! y 2 ! ⋯ y k ! p 1 y 1 p 2 y 2 ⋯ p k y k p(y_1, y_2, \ldots, y_k) = \frac{n!}{y_1! y_2! \cdots y_k!} p_1^{y_1} p_2^{y_2} \cdots p_k^{y_k} p ( y 1 , y 2 , … , y k ) = y 1 ! y 2 ! ⋯ y k ! n ! p 1 y 1 p 2 y 2 ⋯ p k y k where ∑ y i = n \sum y_i = n ∑ y i = n .
Properties: E ( Y i ) = n p i E(Y_i) = np_i E ( Y i ) = n p i , V ( Y i ) = n p i ( 1 − p i ) V(Y_i) = np_i(1-p_i) V ( Y i ) = n p i ( 1 − p i ) , Cov ( Y i , Y j ) = − n p i p j \text{Cov}(Y_i, Y_j) = -np_i p_j Cov ( Y i , Y j ) = − n p i p j for i ≠ j i \neq j i = j .
Note the negative covariance: if more trials fall in category i i i , fewer are available for category j j j .
12 Seeing It in R: Joint Distributions ¶ #| label: joint-sim
#| fig-cap: "Simulated joint distribution with triangular support"
# Simulate from f(y1,y2) = 6*y1 on 0 < y1 < y2 < 1
# Method: rejection sampling
set.seed(2026)
n_sim <- 50000
y1 <- runif(n_sim); y2 <- runif(n_sim)
accept <- (y1 < y2) & (runif(n_sim) < 6*y1 / 6) # max of 6y1 is 6
y1_acc <- y1[accept]; y2_acc <- y2[accept]
# Scatter plot shows the triangular support
plot(y1_acc[1:2000], y2_acc[1:2000], pch = '.', col = "steelblue",
xlab = expression(y[1]), ylab = expression(y[2]),
main = "Joint distribution: f = 6y1 on 0 < y1 < y2 < 1")
abline(0, 1, col = "red", lwd = 2) # y1 = y2 boundary
# Verify marginals
cat("Simulated E(Y1) =", round(mean(y1_acc), 4), " Theory: 0.5000\n")
cat("Simulated E(Y2) =", round(mean(y2_acc), 4), " Theory: 0.7500\n")
cat("Simulated Cov(Y1,Y2) =", round(cov(y1_acc, y2_acc), 4), "\n")
cat("Simulated Cor(Y1,Y2) =", round(cor(y1_acc, y2_acc), 4), "\n")#| label: portfolio-sim
# Portfolio simulation: see diversification in action
set.seed(42)
n <- 100000
mu_A <- 0.12; sigma_A <- 0.20
mu_B <- 0.08; sigma_B <- 0.15
# Independent stocks
A <- rnorm(n, mu_A, sigma_A)
B_ind <- rnorm(n, mu_B, sigma_B)
# Correlated stocks (rho = 0.5)
Z1 <- rnorm(n); Z2 <- rnorm(n)
B_corr <- mu_B + sigma_B * (0.5*Z1 + sqrt(1-0.25)*Z2)
A_corr <- mu_A + sigma_A * Z1
R_ind <- 0.6*A + 0.4*B_ind
R_corr <- 0.6*A_corr + 0.4*B_corr
cat("Independent: E(R) =", round(mean(R_ind),4), " SD(R) =", round(sd(R_ind),4), "\n")
cat("Corr (ρ=0.5): E(R) =", round(mean(R_corr),4), " SD(R) =", round(sd(R_corr),4), "\n")
cat("Theory (ind): E=0.104, SD=0.1342\n")
cat("Theory (ρ=.5): E=0.104, SD=0.1587\n")Wrong integration limits on non-rectangular support. If the support is 0 < y 1 < y 2 < 1 0 < y_1 < y_2 < 1 0 < y 1 < y 2 < 1 , the marginal of y 1 y_1 y 1 integrates y 2 y_2 y 2 from y 1 y_1 y 1 to 1, NOT from 0 to 1. Sketch the region first. Always.
Confusing f ( y 1 , y 2 ) f(y_1, y_2) f ( y 1 , y 2 ) with f ( y 1 ∣ y 2 ) f(y_1 | y_2) f ( y 1 ∣ y 2 ) . The joint density is NOT the conditional density. The conditional divides by the marginal: f ( y 1 ∣ y 2 ) = f ( y 1 , y 2 ) / f 2 ( y 2 ) f(y_1|y_2) = f(y_1,y_2)/f_2(y_2) f ( y 1 ∣ y 2 ) = f ( y 1 , y 2 ) / f 2 ( y 2 ) .
Assuming Cov = 0 implies independence. Covariance measures only LINEAR association. Two variables can have Cov = 0 \text{Cov} = 0 Cov = 0 and still be highly dependent (e.g., Y 2 = Y 1 2 Y_2 = Y_1^2 Y 2 = Y 1 2 when Y 1 Y_1 Y 1 is symmetric around 0).
V ( Y 1 − Y 2 ) = V ( Y 1 ) + V ( Y 2 ) V(Y_1 - Y_2) = V(Y_1) + V(Y_2) V ( Y 1 − Y 2 ) = V ( Y 1 ) + V ( Y 2 ) , not minus. The variance of a difference ADDS variances (when independent). The signs inside don’t affect the spread.
Forgetting the cross-term. V ( a Y 1 + b Y 2 ) = a 2 σ 1 2 + b 2 σ 2 2 + 2 a b Cov ( Y 1 , Y 2 ) V(aY_1 + bY_2) = a^2\sigma_1^2 + b^2\sigma_2^2 + 2ab\text{Cov}(Y_1,Y_2) V ( a Y 1 + b Y 2 ) = a 2 σ 1 2 + b 2 σ 2 2 + 2 ab Cov ( Y 1 , Y 2 ) . When the variables are dependent, the 2 a b Cov 2ab\text{Cov} 2 ab Cov term can be large. Dropping it underestimates (or overestimates) the variance.
Non-rectangular support ⟹ dependent. If the range of Y 1 Y_1 Y 1 depends on Y 2 Y_2 Y 2 , they cannot be independent. Don’t waste time checking the factoring condition — the support shape alone rules it out.
13 Chapter Summary ¶ Joint distributions describe the probability behavior of multiple random variables simultaneously. Joint PMFs sum to 1; joint PDFs integrate to 1.
Marginal distributions are obtained by summing out (discrete) or integrating out (continuous) the other variable(s).
Conditional distributions update probabilities given the value of another variable: f ( y 1 ∣ y 2 ) = f ( y 1 , y 2 ) / f 2 ( y 2 ) f(y_1|y_2) = f(y_1,y_2)/f_2(y_2) f ( y 1 ∣ y 2 ) = f ( y 1 , y 2 ) / f 2 ( y 2 ) .
Independence means f ( y 1 , y 2 ) = f 1 ( y 1 ) f 2 ( y 2 ) f(y_1, y_2) = f_1(y_1) f_2(y_2) f ( y 1 , y 2 ) = f 1 ( y 1 ) f 2 ( y 2 ) for all values — the joint factors into marginals.
Covariance = E ( Y 1 Y 2 ) − E ( Y 1 ) E ( Y 2 ) = E(Y_1 Y_2) - E(Y_1)E(Y_2) = E ( Y 1 Y 2 ) − E ( Y 1 ) E ( Y 2 ) measures linear association. Zero for independent RVs, but zero covariance does NOT imply independence.
Correlation ρ = Cov ( Y 1 , Y 2 ) / ( σ 1 σ 2 ) ∈ [ − 1 , 1 ] \rho = \text{Cov}(Y_1,Y_2)/(\sigma_1\sigma_2) \in [-1,1] ρ = Cov ( Y 1 , Y 2 ) / ( σ 1 σ 2 ) ∈ [ − 1 , 1 ] standardizes covariance.
Variance of a linear combination: V ( ∑ a i Y i ) = ∑ a i 2 σ i 2 + 2 ∑ i < j a i a j Cov ( Y i , Y j ) V(\sum a_i Y_i) = \sum a_i^2 \sigma_i^2 + 2\sum_{i<j} a_i a_j \text{Cov}(Y_i, Y_j) V ( ∑ a i Y i ) = ∑ a i 2 σ i 2 + 2 ∑ i < j a i a j Cov ( Y i , Y j ) .
The Multinomial distribution generalizes the Binomial to k > 2 k > 2 k > 2 categories.