From a discrete bivariate random variable, obtain both its marginal and its conditional distributions.
The idea
From a joint pmf you can recover two kinds of distribution. The marginal pmf of X is the row total in the probability matrix, found by adding over all values of y: Marginal = Σ f(x, y). The marginal of Y is the column total. Marginals describe one variable while ignoring the other. The conditional pmf of X given a value y takes the column for that y and divides every cell by the column total, so it sums to 1: Ratio = f(x, y) ÷ fY(y). Conditioning on an event works the same way, dividing the joint probability of the event and the outcome by the probability of the event. The common error is dividing by the wrong total, which reverses the conditioning, so check which variable is given. X and Y are independent if and only if the joint pmf factorises in every cell: Joint = fX(x) × fY(y).
Formulas
Conditional pmf from a joint pmf
f(x | y) = f(x, y) ÷ fY(y)
- f(x, y)
- the joint probability in the cell
- fY(y)
- the marginal probability of Y = y, the column total
Requires fY(y) to be positive. Dividing by the row total instead reverses the conditioning.
A practice question
Given the joint pmf of two discrete random variables X and Y, how is the marginal pmf of X obtained?
- For each value x, multiply the joint probabilities across all values of y.Why not: Multiplies instead of summing; a marginal collects the probability of all the ways X = x can occur, which is additive.
- For each value x, add the joint probabilities P(X = x, Y = y) over all values of y. - correct
- For each value x, divide each joint probability by the total of the column it sits in.Why not: Describes a conditional distribution of X given Y, not a marginal.
- For each value x, take the largest joint probability P(X = x, Y = y) over y.Why not: Takes a maximum; the marginal needs every y-outcome consistent with X = x, not just the most likely one.
The marginal pmf of X is f_X(x) = sum over y of f(x, y): the row total in the probability matrix. The marginal ignores Y by adding up all the ways Y could turn out.
A harder one
The joint pmf of X (rows, values 0 and 1) and Y (columns, values 1, 2 and 3) is: row X = 0: 0.12, 0.18, 0.10; row X = 1: 0.18, 0.12, 0.30. Which list gives the marginal pmf of Y for Y = 1, 2, 3?
- (0.40, 0.60)Why not: Gives the marginal of X (row totals), not of Y; two values instead of three should have been a warning.
- (0.12, 0.18, 0.10)Why not: Reads off the cells of the row X = 0, which is part of the joint pmf and sums to 0.40 only.
- (0.30, 0.30, 0.40) - correct
- (0.30, 0.20, 0.50)Why not: Gives the conditional distribution of Y given X = 1 (each cell divided by 0.60), not the marginal.
Add each column: Y = 1: 0.12 + 0.18 = 0.30; Y = 2: 0.18 + 0.12 = 0.30; Y = 3: 0.10 + 0.30 = 0.40. The totals sum to 1.
The hardest tier
A portfolio is either in a low-risk state X = 0 (probability 0.70) or a high-risk state X = 1 (probability 0.30). The conditional probability of a loss event Y = 1 is 0.10 given X = 0 and 0.60 given X = 1. Given that a loss event occurred, what is the probability that the portfolio was in the high-risk state?
- 0.60Why not: Reports P(Y = 1 | X = 1), the conditional in the opposite direction to the one requested.
- 0.18Why not: Reports the joint probability P(X = 1, Y = 1) = 0.30 x 0.60 without dividing by P(Y = 1).
- 0.72 - correct
- 0.26Why not: Divides the joint by the sum of the two conditionals (0.70) instead of the probability-weighted marginal P(Y = 1) = 0.25.
P(Y = 1) = 0.70 x 0.10 + 0.30 x 0.60 = 0.25. P(X = 1 | Y = 1) = 0.18 / 0.25 = 0.72.
In the app: 6 practice questions on this outcome, spaced review that brings it back before you forget it.
Start free →More in Multivariate Random Variables
- Express a probability mass function through a probability matrix and explain how this works.
- Describe the way an expected value of a function is obtained for a discrete bivariate random variable.
- Give the definition of covariance and say what quantity it captures.
- Describe how covariance and correlation of two random variables relate to each other and to whether the variables are independent.
- Show, with examples, what happens to the covariance and correlation of two random variables when linear transformations are applied to them.
- Find the variance when two random variables are combined using weights.
- For a bivariate random variable, compute the expected value of one of its components given the other.
- Identify what makes a sequence of random variables independent and identically distributed (iid).
- Illustrate why, for iid random variables, the mean and variance of their sum are easier to calculate.