Week 5.1: Joint Continuous Distributions

598 words
3 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Week 5.1: Joint Continuous Distributions > **Prerequisites:** Continuous RVs ([Week 4.1: Continuous Random Variables & PDFs](/notes/01-foundation-bsma1004-stats-2-week04-12-continuous-rvs-pdf)), Joint Discrete ([Week 1.1: Joint Probability Mass Function (Joint PMF)](/notes/01-foundation-bsma1004-stats-2-week01-01-...

Week 5.1: Joint Continuous Distributions

Prerequisites: Continuous RVs (Week 4.1: Continuous Random Variables & PDFs), Joint Discrete (Week 1.1: Joint Probability Mass Function (Joint PMF)) Cross-links: BSMA3012 (Linear Stat Models) — multivariate normal Core question: How do we describe multiple continuous random variables together?

1. Intuition: From Double Sums to Double Integrals

For discrete RVs, joint PMF fXY(x,y)f_{XY}(x,y) sums to 1. For continuous RVs, we have a joint PDF fXY(x,y)f_{XY}(x,y) that integrates to 1:
∫−∞∞∫−∞∞fXY(x,y) dx dy=1.\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} f_{XY}(x,y) \, dx \, dy = 1.
Probabilities are volumes under this surface.

2. Formal Definitions

Definition (Joint PDF) XX and YY are jointly continuous with PDF fXY(x,y)f_{XY}(x,y) if:
  1. fXY(x,y)≥0f_{XY}(x,y) \geq 0
  2. ∬R2fXY(x,y) dx dy=1\iint_{\mathbb{R}^2} f_{XY}(x,y) \, dx \, dy = 1
  3. P((X,Y)∈A)=∬AfXY(x,y) dx dy\mathbb{P}((X,Y) \in A) = \iint_A f_{XY}(x,y) \, dx \, dy Marginal PDFs:
fX(x)=∫−∞∞fXY(x,y) dy,fY(y)=∫−∞∞fXY(x,y) dx.f_X(x) = \int_{-\infty}^{\infty} f_{XY}(x,y) \, dy, \quad f_Y(y) = \int_{-\infty}^{\infty} f_{XY}(x,y) \, dx.
Conditional PDF:
fY∣X=x(y)=fXY(x,y)fX(x),fX(x)>0.f_{Y \mid X = x}(y) = \frac{f_{XY}(x,y)}{f_X(x)}, \quad f_X(x) > 0.
Independence:
fXY(x,y)=fX(x)⋅fY(y)for all x,y.f_{XY}(x,y) = f_X(x) \cdot f_Y(y) \quad \text{for all } x,y.

3. Worked Example

Let fXY(x,y)=c(x+y)f_{XY}(x,y) = c(x+y) for 0≤x≤10 \leq x \leq 1, 0≤y≤10 \leq y \leq 1, zero elsewhere. Step 1 — Find cc:
1=∫01∫01c(x+y) dx dy=c∫01[x22+xy]x=01dy=c∫01(12+y)dy=c[y2+y22]01=c(1)=c.1 = \int_0^1 \int_0^1 c(x+y) \, dx \, dy = c \int_0^1 \left[ \frac{x^2}{2} + xy \right]_{x=0}^1 dy = c \int_0^1 \left( \frac{1}{2} + y \right) dy = c \left[ \frac{y}{2} + \frac{y^2}{2} \right]_0^1 = c(1) = c.
So c=1c = 1. Step 2 — Marginal fX(x)f_X(x):
fX(x)=∫01(x+y) dy=[xy+y22]01=x+12,0≤x≤1.f_X(x) = \int_0^1 (x+y) \, dy = \left[ xy + \frac{y^2}{2} \right]_0^1 = x + \frac{1}{2}, \quad 0 \leq x \leq 1.
Step 3 — P(X+Y>1)\mathbb{P}(X+Y > 1): Region: 0≤x≤10 \leq x \leq 1, 0≤y≤10 \leq y \leq 1, x+y>1x+y > 1.
P(X+Y>1)=∫01∫1−x1(x+y) dy dx=∫01[xy+y22]y=1−x1dx=∫01(x+12−x(1−x)−(1−x)22)dx=∫01(12+x−x2−12(1−2x+x2))dx=∫01(x2)dx=13.\begin{aligned} \mathbb{P}(X+Y > 1) &= \int_0^1 \int_{1-x}^1 (x+y) \, dy \, dx \\ &= \int_0^1 \left[ xy + \frac{y^2}{2} \right]_{y=1-x}^1 dx \\ &= \int_0^1 \left( x + \frac{1}{2} - x(1-x) - \frac{(1-x)^2}{2} \right) dx \\ &= \int_0^1 \left( \frac{1}{2} + x - x^2 - \frac{1}{2}(1 - 2x + x^2) \right) dx \\ &= \int_0^1 \left( x^2 \right) dx = \frac{1}{3}. \end{aligned}

4. Bivariate Normal Distribution

(X,Y)∼N(μX,μY,σX2,σY2,ρ)(X,Y) \sim \mathcal{N}(\mu_X, \mu_Y, \sigma_X^2, \sigma_Y^2, \rho) has PDF:
>fXY(x,y)=12πσXσY1−ρ2exp⁡(−12(1−ρ2)[(x−μX)2σX2−2ρ(x−μX)(y−μY)σXσY+(y−μY)2σY2]).>> f_{XY}(x,y) = \frac{1}{2\pi\sigma_X\sigma_Y\sqrt{1-\rho^2}} \exp\left( -\frac{1}{2(1-\rho^2)} \left[ \frac{(x-\mu_X)^2}{\sigma_X^2} - 2\rho\frac{(x-\mu_X)(y-\mu_Y)}{\sigma_X\sigma_Y} + \frac{(y-\mu_Y)^2}{\sigma_Y^2} \right] \right). >
Properties:
  • Marginals are normal: X∼N(μX,σX2)X \sim \mathcal{N}(\mu_X, \sigma_X^2), Y∼N(μY,σY2)Y \sim \mathcal{N}(\mu_Y, \sigma_Y^2)
  • ρ\rho is the correlation coefficient
  • If ρ=0\rho = 0, XX and YY are independent (unique to normal)
  • Conditional distributions are also normal

5. Practice Questions

Q1 (Easy)

fXY(x,y)=2f_{XY}(x,y) = 2 for 0≤x≤y≤10 \leq x \leq y \leq 1. Find fX(x)f_X(x).
Full Solution
fX(x)=∫x12 dy=2(1−x)f_X(x) = \int_x^1 2 \, dy = 2(1-x), 0≤x≤10 \leq x \leq 1.

Q2 (Medium)

For the joint PDF fXY(x,y)=6xf_{XY}(x,y) = 6x for 0≤x≤y≤10 \leq x \leq y \leq 1, find P(Y>0.5)\mathbb{P}(Y > 0.5).
Full Solution
>P(Y>0.5)=∫0.51∫0y6x dx dy=∫0.51[3x2]0y dy=∫0.513y2 dy=[y3]0.51=1−0.125=0.875.>> \mathbb{P}(Y > 0.5) = \int_{0.5}^1 \int_0^y 6x \, dx \, dy = \int_{0.5}^1 [3x^2]_0^y \, dy = \int_{0.5}^1 3y^2 \, dy = [y^3]_{0.5}^1 = 1 - 0.125 = 0.875. >
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.