Source: Quiz 5 Solutions, Principles of Statistics I (Texas A&M University)
Tags: joint PMF, joint probability mass function, marginal PMF, marginal distribution, expected value, independence, E(X+Y), E(XY), discrete random variables, bivariate distribution, STAT 211
A joint probability mass function (PMF) describes the probability of two discrete random variables taking specific paired values simultaneously. From the joint PMF table, you can extract marginal distributions, compute expected values of sums and products, and test whether the two variables are independent. Independence fails when the joint probability of any event differs from the product of its marginal probabilities.
Joint probability mass function, f_XY(x, y)
The function that assigns a probability to each possible pair of values (x, y) for two discrete random variables X and Y. Every entry is between 0 and 1, and all entries sum to 1.
Marginal probability mass function, f_X(x)
The distribution of X alone, obtained by summing the joint PMF across all values of Y for each fixed x. Written as f_X(x) = Σ_y f_XY(x, y). Similarly, f_Y(y) = Σ_x f_XY(x, y) gives the marginal of Y.
Expected value, E(X)
The long-run average of a random variable, computed as E(X) = Σ x · f_X(x) using the marginal PMF.
Expected value of a function of two variables, E(g(X, Y))
Computed directly from the joint PMF: E(g(X, Y)) = Σ_x Σ_y g(x, y) · f_XY(x, y). Common cases include E(X + Y) and E(XY).
Independence of random variables
X and Y are independent if and only if f_XY(x, y) = f_X(x) · f_Y(y) for every pair (x, y). Equivalently, for any events involving X and Y, P(X ∈ A, Y ∈ B) must equal P(X ∈ A) · P(Y ∈ B). A single counterexample is enough to prove dependence.
The quiz uses the following joint PMF for X (values 0, 1) and Y (values 0, 1, 2):
Y = 0 | Y = 1 | Y = 2 | f_X(x) | |
|---|---|---|---|---|
X = 0 | 0.1 | 0.2 | 0.4 | 0.7 |
X = 1 | 0.1 | 0.1 | 0.1 | 0.3 |
f_Y(y) | 0.2 | 0.3 | 0.5 | 1 |
Each cell gives P(X = x, Y = y)
The right-hand column (row sums) is the marginal PMF of X
The bottom row (column sums) is the marginal PMF of Y
The grand total must equal 1
Single-cell lookup: P(X = 1, Y = 2) = 0.1. Just read the cell directly.
Compound events (unions of cells): P(X < 1, Y < 2) means X = 0 and Y ∈ {0, 1}, so sum the relevant cells:
P(0, 0) + P(0, 1) = 0.1 + 0.2 = 0.3
Marginal probabilities: P(X < 1) = P(X = 0) = f_X(0) = 0.7 (read from the marginal column). P(Y < 2) = P(Y = 0) + P(Y = 1) = 0.2 + 0.3 = 0.5 (sum the relevant marginal entries).
E(X) using the marginal of X:
E(X) = 0(0.7) + 1(0.3) = 0.3
E(Y) using the marginal of Y:
E(Y) = 0(0.2) + 1(0.3) + 2(0.5) = 1.3
E(X + Y) using the joint PMF:
Compute (x + y) · f_XY(x, y) for every cell and sum:
(0+0)(0.1) + (0+1)(0.2) + (0+2)(0.4) + (1+0)(0.1) + (1+1)(0.1) + (1+2)(0.1)
= 0 + 0.2 + 0.8 + 0.1 + 0.2 + 0.3
= 1.6
E(XY) using the joint PMF:
Compute (x · y) · f_XY(x, y) for every cell. Only cells where both x ≠ 0 and y ≠ 0 contribute:
(1·1)(0.1) + (1·2)(0.1) = 0.1 + 0.2 = 0.3
Is E(X + Y) = E(X) + E(Y)?
E(X) + E(Y) = 0.3 + 1.3 = 1.6, and E(X + Y) = 1.6. Yes, they are equal.
This always holds, regardless of whether X and Y are independent. Linearity of expectation requires no assumptions.
Is E(XY) = E(X) · E(Y)?
E(X) · E(Y) = 0.3 × 1.3 = 0.39, but E(XY) = 0.3. These are not equal, so No, X and Y are not independent.
You can also verify via the probability definition:
P(X < 1, Y < 2) = 0.3, but P(X < 1) · P(Y < 2) = 0.7 × 0.5 = 0.35.
Since 0.3 ≠ 0.35, independence fails.
Marginal from joint: f_X(x) = Σ_y f_XY(x, y) f_Y(y) = Σ_x f_XY(x, y)
Expected value of a function g(X, Y): E(g(X, Y)) = Σ_x Σ_y g(x, y) · f_XY(x, y)
Linearity of expectation (always true): E(X + Y) = E(X) + E(Y)
Product rule for expectation (only if independent): E(XY) = E(X) · E(Y) holds if and only if X and Y are uncorrelated (which independence guarantees, but not vice versa)
Independence test: X, Y independent ⇔ f_XY(x, y) = f_X(x) · f_Y(y) for all (x, y)
⚠️ Linearity of expectation E(X + Y) = E(X) + E(Y) always holds. Do not add conditions about independence. This is a common exam trick.
⚠️ E(XY) = E(X)E(Y) requires at minimum uncorrelatedness. Independence is sufficient but not necessary. On a basic stats exam, if E(XY) ≠ E(X)E(Y), the variables are dependent.
⚠️ To disprove independence, you only need one counterexample where the joint probability differs from the product of the marginals.
⚠️ When computing P(X < 1, Y < 2) from the table, be careful with strict vs. non-strict inequalities. X < 1 with X ∈ {0, 1} means X = 0 only.
⚠️ The marginal PMFs should always sum to 1. Use this as a quick error check after filling in the table margins.
Q: Given a joint PMF table, how do you find the marginal distribution of X?
A: Sum each row across all columns of Y. The resulting values form f_X(x), one entry per value of X. The same logic applies to Y by summing down each column.
Q: If E(X + Y) = E(X) + E(Y) for some pair of random variables, does that prove they are independent?
A: No. Linearity of expectation holds universally for any random variables, independent or not. It tells you nothing about independence.
Q: You find that P(X ≤ 0, Y ≤ 1) = 0.3 and P(X ≤ 0) · P(Y ≤ 1) = 0.35. What can you conclude?
A: X and Y are not independent, because the joint probability of at least one event does not equal the product of its marginal probabilities.
Q: How do you compute E(XY) from a joint PMF table?
A: Multiply the product x · y by the joint probability f_XY(x, y) for every cell in the table, then sum all those terms. Cells where either x = 0 or y = 0 contribute nothing.
Q: A joint PMF table for X ∈ {0, 1} and Y ∈ {0, 1, 2} has six cells. The marginal column sums to 1 and the marginal row sums to 1. Is this enough to confirm the table is valid?
A: Yes, provided every cell is non-negative. A valid joint PMF requires all probabilities to be ≥ 0 and the total to equal 1.
joint PMF, joint probability mass function, bivariate PMF, marginal distribution, marginal PMF, discrete joint distribution, expected value of sum, E(X+Y), expected value of product, E(XY), independence of discrete random variables, linearity of expectation, STAT 211, Principles of Statistics I, Texas A&M, probability table, joint distribution table, product rule for expectation, uncorrelated vs independent