Lecture 9

Joint and Marginal Distributions


Grace Tompkins

Last modified — 21 Jun 2026

Learning Outcomes

By the end of this lecture, students are anticipated to be able to:

  • Define joint and marginal distributions
  • Calculate marginal distributions from a joint distribution

1 Joint Distributions

Joint Distributions

  • Suppose \(X\) and \(Y\) are two random variables.
  • We may be interested in their distributions separately.
  • But this ignores the relationship between \(X\) and \(Y\).

The joint CDF of the two random variables \(X\) and \(Y\) is defined by \[F_{X, Y} ( a, b ) = \mathbb{P}( X \le a, \, \ Y \le b).\]

Recall: \[\left\{ X \le a \, , \ Y \le b \right\} = \left\{ X \le a \right\} \cap \left\{ Y \le b \right\}.\]

Joint PMFs and PDFs

Let \(X\) and \(Y\) be two random variables with joint CDF \(F_{X, Y}(x, y)\).

If \(X\) and \(Y\) are both discrete, then the joint PMF of \((X, Y)\) is defined by \[p_{X, Y} ( a, b ) = \mathbb{P}( X = a, \, Y = b).\]

The random variables \(X\) and \(Y\) are jointly (absolutely) continuous if there exists a density function \(f_{X, Y}(x, y)\) such that for any set \(A \subset \mathbb{R}^2\), we have \[\mathbb{P}\left( (X, Y) \in A \right) = \iint_A f_{X, Y}(x, y) \mathsf{d}x \mathsf{d}y.\]

Joint PMF

  • Consider the experiment of rolling two fair dice.
  • Let \(X\) be the lowest of the two rolls, \(Y\) be the highest.

Find the joint PMF of \(X\) and \(Y\).

This will involve finding all of the joint probabilities for each combination of the dice:

\(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

Joint PMF

Supper \(\mathbb{P}(X=x, Y=y) = c · (x + 2y + 1)I_{\{0,1,2\}}(x)I_{\{0,1\}}(y)\)

What value of c will make this a valid joint PMF? What is \(\mathbb{P}(X = 0, Y = 1)\)?

Joint PMF

Joint PDF

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} \]

Verify that this is a density function.

Joint PDF

Joint PDF

The joint PDF is a surface:

\[ f(x,y) = \begin{cases} 4x^2y + 2y^5 & 0\le x \le 1, 0\le y \le 1\\ 0 &\text{otherwise} \end{cases} \]

Bivariate Normal distribution

Bivariate Normal Distribution: Given \(\mu _1, \mu_2, \sigma_1, \sigma_2, \rho \in {\mathbb{R}}\) where \(\sigma_1, \sigma_2 > 0\) and \(-1\le \rho \le 1\), the bivariate normal distribution \(\mathcal{N}(\mu,\mu_2, \sigma_1, \sigma_2)\), is given by:

\[\begin{aligned} &f_{X_1, X_2}(x_1, x_2)\\ &= \frac{1}{2\pi\sigma_1\sigma_2\sqrt{1 - \rho^2}} \exp\left\{ -\frac{1}{2(1 - \rho^2)} \left(\left(\frac{x_1-\mu_1}{\sigma_1}\right)^2 - 2\rho \frac{(x_1-\mu_1)(x_2-\mu_2)}{\sigma_1\sigma_2} + \left(\frac{x_2-\mu_2}{\sigma_2}\right)^2 \right) \right\}. \end{aligned}\]

When \(\mu_1 = \mu_2 = \rho = 0\) and \(\sigma_1 = \sigma_2 = 1\), this is the standard bivariate normal distribution.

Joint PDF

Let \(f_{X,Y}(x,y) = e^{-x-y}I_{[0, \infty)}(x)I_{[0, \infty)}(y)\)

What is the probability \(\mathbb{P}(X < Y)\)?

Joint PDF

2 Marginal Distributions

Marginal CDFs

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).\]

Marginal PMFs and PDFs

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)

Discrete Marginal Distribution

  • Consider the experiment of rolling two fair dice. Let \(X\) be the lowest of the two rolls, \(Y\) be the highest.
\(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\).

Discrete Marginal Distribution

Discrete Marginal Distribution

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} \]

  • Find \(P(Y > 1, X \le 1)\)
  • Find the marginal PMF of \(X\)
  • Calculate \(\mathbb{P}( X \ge 1)\)

Discrete Marginal Distribution

Continuous Marginal Distributions

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)\).

Continuous Marginal Distributions

Continuous Marginal Distributions

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). \]

  1. Find \(F ( x, y ) = \int_0^x \int_0^y f_{X, Y}(s, t) \mathsf{d}t \mathsf{d}s\) for \(0 \le x, y \le 1\);
  2. Compute \(F ( 0.3, 0.8 )\) and \(F ( 0.3, 2.1 )\).
  3. Calculate \(\mathbb{P}( X - 2 Y > 0 )\).

Continuous Marginal Distributions

Midterm Reminder

  • Your midterm will cover materials from Lectures 1 - 8
  • DATE: in class on Tuesday June 2
  • LENGTH: 1 hour and 50 minutes in length.
  • You may bring in one (1) “cheat sheet”:
    • Must be HAND WRITTEN with pen/pencil on said sheet of paper (not typed, not photo copied, not printed, not written on an iPad)
    • Must be on 8.5 by 11 inch sheet of paper or smaller
    • You may write on both sides
    • No magnifying glasses or anything else silly
    • I will confiscate cheatsheets that do not follow these rules 🥀
    • I do not care what is written on it
  • Exam is hand written on paper, bring something to write with
  • You may bring a non-programmable, non-graphing calculator.

To Do