Marginal Distributions and Independence
Last modified — 13 Nov 2026
By the end of this lecture, students are anticipated to be able to:
Calculate and utilize joint distributions
Determine whether random variables are independent based on their marginal and joint distributions
Use the convolution method to calculate probabilities of the sum of independent RVs
Let \(X\) and \(Y\) be two RV with joint CDF \(F_{X,Y}\).
\[\begin{aligned} \lim_{a \to -\infty} F_{X, Y}(a, y) &= 0 & \forall y &\in {\mathbb{R}}.\\ \lim_{b \to -\infty} F_{X, Y}(x, b) &= 0 & \forall x &\in {\mathbb{R}}.\\ \lim_{a \to \infty, \ b \to \infty} F_{X, Y}(a, b) &= 1. \end{aligned}\]
The marginal CDFs of \(X\) and \(Y\) are defined by \[F_X(x) = \lim_{b \to \infty} F_{X, Y}(x, b), \qquad F_Y(y) = \lim_{a \to \infty} F_{X, Y}(a, y).\]
If \(X\) and \(Y\) are discrete, then the marginal PMFs of \(X\) and \(Y\) are given by \[\begin{aligned} p_X(x) &= \sum_{y} p_{X, Y}(x, y), & \text{and}\quad p_Y(y) &= \sum_{x} p_{X, Y}(x, y). \end{aligned}\]
If \(X\) and \(Y\) are continuous, then the marginal PDFs of \(X\) and \(Y\) are given by \[\begin{aligned} f_X(x) &= \int_{-\infty}^\infty f_{X, Y}(x, y) \mathsf{d}y, & \text{and}\quad f_Y(y) &= \int_{-\infty}^\infty f_{X, Y}(x, y) \mathsf{d}x. \end{aligned}\]
Important
All of this generalizes to more than two random variables.
In this course, we will focus only on cases involving two random variables, since anything beyond that involves linear algebra (which is not a pre-req for this course)
| \(f_{X,Y}(x, y)\) | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| 1 | 1/36 | 2/36 | 2/36 | 2/36 | 2/36 | 2/36 |
| 2 | 0 | 1/36 | 2/36 | 2/36 | 2/36 | 2/36 |
| 3 | 0 | 0 | 1/36 | 2/36 | 2/36 | 2/36 |
| 4 | 0 | 0 | 0 | 1/36 | 2/36 | 2/36 |
| 5 | 0 | 0 | 0 | 0 | 1/36 | 2/36 |
| 6 | 0 | 0 | 0 | 0 | 0 | 1/36 |
Use the joint PMF of \(X\) and \(Y\) to find the marginal PMFs of \(X\) and \(Y\).
A coffee shop records the orders of its customers. Let \(X\) denote the number of espresso shots ordered and \(Y\) denote the number of food items ordered, where \(X \in \{0, 1, 2\}\) and \(Y \in \{0, 1, 2\}\). The joint PMF is given by the following table:
\[ \begin{array}{c|ccc} P(X=x, Y=y) & Y=0 & Y=1 & Y=2 \\ \hline X=0 & 0.10 & 0.08 & 0.02 \\ X=1 & 0.15 & 0.20 & 0.10 \\ X=2 & 0.05 & 0.15 & 0.15 \\ \end{array} \]
Let \(X\) and \(Y\) be jointly continuous, with joint density function
\[ f(x,y) = \begin{cases} 4x^2y + 2y^5 & 0\le x \le 1, 0\le y \le 1\\ 0 &\text{otherwise} \end{cases} \]
Find \(f_Y(y)\) and \(f_X(x)\).
Let \(X\) and \(Y\) be continuous random variables with PDF
\[ f_{X, Y}(x, y) = I_{[0,1]}(x)I_{[0,1]}(y) = I_{[0,1]^2}(x, y). \]
\(X\) and \(Y\) are independent if and only if for any sets \(A\) and \(B\) we have \[\mathbb{P}( X \in A,\ Y \in B ) = \mathbb{P}( X \in A )\ \mathbb{P}( Y \in B ).\]
This is the definition of independence. It says that the joint distribution factors into the product of the marginals.
But this has immediate consequences for the joint CDF, PMF, and PDF.
Choosing \(A = (-\infty, x]\) and \(B = (-\infty, y]\), we have that, if \(X\) and \(Y\) are independent, then \[\begin{aligned} F_{X,Y}(x,y) &= \mathbb{P}(X \le x, Y \le y) = \mathbb{P}(X \le x) \mathbb{P}(Y \le y) = F_X(x) F_Y(y). \end{aligned}\]
The converse is also true: if \(F_{X,Y}(x,y) = F_X(x) F_Y(y)\) for all \(x, y\), then \(X\) and \(Y\) are independent.
If \(X\) and \(Y\) are discrete random variables, then \(X\) and \(Y\) are independent if and only if \[p_{X,Y}(x,y) = p_X(x) p_Y(y),\] for all \(x, y \in {\mathbb{R}}\).
If \(X\) and \(Y\) are jointly continuous random variables, then \(X\) and \(Y\) are independent if and only if their joint density can be chosen such that \[f_{X,Y}(x,y) = f_X(x) f_Y(y),\] for all \(x, y \in {\mathbb{R}}\).
Let \(X\) and \(Y\) have joint pdf \[f_{X,Y}(x, y) = \begin{cases}8xy & \text{if } 0 \le x < y < 1 \\ 0 & \text{else.} \end{cases}\] Find the marginal PDFs of \(X\) and \(Y\). Are \(X\) and \(Y\) independent?
Let \(X\) and \(Y\) be independent random variables with CDFs \(F_X\) and \(F_Y\).
Let \(W = \max\{X, Y\}\).
Find the CDF of \(W\).
To find the distribution of a sum of independent random variables, we could use the distribution method or the Jacobian method.
For this specific case where RVs are independent, there’s also a third method called convolution.
Let \(X\) and \(Y\) be independent random variables.
If \(X\) and \(Y\) are both discrete random variables, then the PMF of \(U = X + Y\) is given by \[p_U(u) = \sum_{w} p_X(u-w) p_Y(w) = \sum_w p_Y(u - w) p_X(w).\]
If \(X\) and \(Y\) are both continuous random variables, then the PDF of \(U = X + Y\) is given by \[f_U(u) = \int_{-\infty}^\infty f_X(u - w) f_Y(w) \mathsf{d}w = \int_{-\infty}^\infty f_Y(u - w) f_X(w) \mathsf{d}w.\]
Let \(X\) and \(Y\) be independent \({\mathrm{Unif}}(0, 1)\) random variables. Let \(S = X +Y\). Find the distribution of \(S\).
Checkpoint 5 (Change of variables and joint distributions) is on Friday Nov 6th
Midterm 2 is on Friday November 20th
Stat 302 - Winter 2025/26