Skip to content

Actuarial Statistics · Jointly distributed random variables

Marginal Distributions and Independence of Random Variables

Updated 11 October 2026 · Fact-checked

A marginal distribution describes one variable from a joint distribution, ignoring the others. Sum the joint pmf over the other variable, or integrate the joint pdf over it. X and Y are independent if the joint distribution equals the product of the marginals for every pair of values, including the support.

Understand Marginal Distributions and Independence

A joint distribution tells you how two random variables behave together. Think of a table of probabilities (discrete case) or a surface (continuous case). Sometimes you only care about one variable, say the claim size X, and not the claim delay Y. The marginal distribution of X is what you get when you ignore Y.

To get it, you add up (or integrate out) all the values of the other variable. In the discrete case you sum each row or column of the table. In the continuous case you integrate the joint pdf over the full range of Y for that fixed x. The name 'marginal' comes from the row and column totals written in the margins of a table.

Independence means that knowing Y tells you nothing about X. Formally, f(x, y) = fX(x) × fY(y) for all x and y. This must hold everywhere, not just at a few points. The factorisation must also respect the support: the range of x must not depend on y.

Independence is stronger than being uncorrelated. If X and Y are independent (and their variances exist), then Cov(X, Y) = 0. The reverse is false in general. Y = X² is perfectly determined by X, yet it can have zero covariance with X. The one common exception is the bivariate normal, where zero correlation does give independence.

Marginals are linked to conditional distributions. The conditional pdf is the joint divided by the marginal: f(y | x) = f(x, y) ÷ fX(x). If X and Y are independent, the conditional distribution equals the marginal distribution. That gives you a second way to check independence.

Key rules to remember

Marginal pmf (discrete)
pX(x) = Σy p(x, y); pY(y) = Σx p(x, y)
Sum over all values of the other variable. The marginal probabilities must add to 1.
Marginal pdf (continuous)
fX(x) = ∫ f(x, y) dy; fY(y) = ∫ f(x, y) dx
Integrate over the whole range of the other variable for that fixed value. Limits may depend on x or y when the support is not a rectangle.
Independence condition
f(x, y) = fX(x) × fY(y) for all (x, y)
For discrete variables use p(x, y) = pX(x) × pY(y). A single pair that fails proves the variables are not independent.
Joint CDF form of independence
F(x, y) = FX(x) × FY(y) for all (x, y)
Equivalent to the pdf condition. Useful when the CDF is given.
Conditional pdf
f(y | x) = f(x, y) ÷ fX(x), for fX(x) > 0
If X and Y are independent, f(y | x) = fY(y).
Expectation under independence
E[g(X) h(Y)] = E[g(X)] × E[h(Y)]
Holds when X and Y are independent and the expectations exist. Gives Cov(X, Y) = 0.
Covariance
Cov(X, Y) = E[XY] − E[X] E[Y]
Zero covariance does not imply independence.

How to solve Marginal Distributions and Independence questions

Use this method for any question that asks for a marginal distribution or asks you to test independence.

  1. 1Write down the support of (X, Y). Sketch it if it is not a rectangle, for example 0 < x < y < 1.
  2. 2For a marginal of X, fix x. Find the range of y that is allowed for that x. These are your limits of integration (or the values to sum).
  3. 3Integrate (or sum) the joint pdf (or pmf) over y. State the range of x for which the result is valid.
  4. 4Check your answer: the marginal must be non-negative and must integrate (or sum) to 1.
  5. 5Repeat for the other variable if required.
  6. 6To test independence, multiply the two marginals and compare with the joint at all points. Check that the support is a rectangle. If it is not, the variables are not independent.
  7. 7If you find a single point where the joint differs from the product, stop and state that the variables are not independent. Give that point as evidence.
  8. 8Write a clear conclusion in words, and use it to answer any later part, for example conditional distributions or covariance.

Quickest way: Factorisation shortcut for independence

When to use it: Use it when the joint pdf is given as a formula and you only need to decide whether X and Y are independent, not find the marginals in full.

  1. Check the support first. If it is not a rectangle (for example x < y), the answer is not independent. You are done.
  2. If the support is a rectangle, see whether f(x, y) can be written as g(x) × h(y), with each factor depending on one variable only.
  3. If it factorises, X and Y are independent. The marginals are proportional to g and h. Scale each so it integrates to 1.
  4. If a term mixes the variables, such as x + y or x²y + xy², it does not factorise. State that they are not independent.
  5. For a discrete table, check the zero cells and one or two cells with the largest probabilities. A mismatch in any cell is enough to reject independence.

Common mistakes in Marginal Distributions and Independence

  • Ignoring the support when testing independence.

    The formula looks like it factorises, so you stop. For f(x, y) = 2 on 0 < x < y < 1, the constant looks separable.

    Fix: Always check the region. If the limits of one variable depend on the other, the variables are not independent. Here fX(x) = 2(1 − x) and fY(y) = 2y, and their product 4y(1 − x) is not 2.

  • Using the wrong limits when integrating out a variable.

    You use 0 to 1 for y even when the region is x < y < 1.

    Fix: Sketch the region. For fixed x, read off where y starts and ends. Write the limits before you integrate.

  • Checking the product condition at only one point.

    It is quick and it happens to hold at that point.

    Fix: A match at one point proves nothing. Independence needs equality everywhere. A mismatch at one point proves dependence. Use the factorisation form to cover all points.

  • Saying that zero covariance means independence.

    Uncorrelated and independent sound alike, and many courses use the normal distribution, where they coincide.

    Fix: Independence implies zero covariance, not the other way round. Counter-example: X uniform on {−1, 0, 1} and Y = X². Cov(X, Y) = 0, yet P(X = 0, Y = 0) = 1/3 while P(X = 0) P(Y = 0) = 1/9.

  • Forgetting to state the range of the marginal.

    You focus on the formula and not on where it applies.

    Fix: Write fX(x) = ... for 0 < x < 1, and say it is zero elsewhere. Examiners give marks for the range.

  • Confusing the marginal with the conditional distribution.

    Both are single-variable functions obtained from the joint.

    Fix: Marginal: integrate out the other variable. Conditional: divide the joint by the marginal of the conditioning variable. A conditional pdf must integrate to 1 over its own variable.

Worked examples

Example 1

The joint pdf of X and Y is f(x, y) = x + y for 0 < x < 1 and 0 < y < 1, and zero otherwise. (a) Find the marginal pdfs of X and Y. (b) Are X and Y independent? (c) Find P(X < 0.5).

Show the solution
  1. The support is the unit square, a rectangle, so the limits are simple.
  2. (a) For 0 < x < 1: fX(x) = ∫ from 0 to 1 of (x + y) dy = [xy + y²/2] from 0 to 1 = x + 1/2.
  3. By symmetry, for 0 < y < 1: fY(y) = ∫ from 0 to 1 of (x + y) dx = y + 1/2.
  4. Check: ∫ from 0 to 1 of (x + 1/2) dx = 1/2 + 1/2 = 1. Good.
  5. (b) The product is (x + 1/2)(y + 1/2) = xy + x/2 + y/2 + 1/4. This is not equal to x + y. For example, at x = y = 0 the joint is 0 but the product is 1/4.
  6. So X and Y are not independent.
  7. (c) P(X < 0.5) = ∫ from 0 to 0.5 of (x + 1/2) dx = [x²/2 + x/2] from 0 to 0.5 = 0.125 + 0.25 = 0.375.

Answer: fX(x) = x + 1/2 for 0 < x < 1; fY(y) = y + 1/2 for 0 < y < 1; X and Y are not independent; P(X < 0.5) = 0.375.

Example 2

X takes values 0 and 1, and Y takes values 0, 1 and 2. The joint pmf p(x, y) is: p(0,0) = 0.10, p(0,1) = 0.20, p(0,2) = 0.10, p(1,0) = 0.15, p(1,1) = 0.30, p(1,2) = 0.15. (a) Find the marginal pmfs. (b) Determine whether X and Y are independent. (c) Find P(Y = 1 | X = 1).

Show the solution
  1. Check the total: 0.10 + 0.20 + 0.10 + 0.15 + 0.30 + 0.15 = 1.00. Valid.
  2. (a) Marginal of X: pX(0) = 0.10 + 0.20 + 0.10 = 0.40. pX(1) = 0.15 + 0.30 + 0.15 = 0.60.
  3. Marginal of Y: pY(0) = 0.10 + 0.15 = 0.25. pY(1) = 0.20 + 0.30 = 0.50. pY(2) = 0.10 + 0.15 = 0.25.
  4. (b) Compare p(x, y) with pX(x) pY(y) in every cell. Row x = 0: 0.4 × 0.25 = 0.10, 0.4 × 0.5 = 0.20, 0.4 × 0.25 = 0.10. All match.
  5. Row x = 1: 0.6 × 0.25 = 0.15, 0.6 × 0.5 = 0.30, 0.6 × 0.25 = 0.15. All match.
  6. All six cells match, so X and Y are independent.
  7. (c) P(Y = 1 | X = 1) = p(1, 1) ÷ pX(1) = 0.30 ÷ 0.60 = 0.5. This equals pY(1), as independence requires.

Answer: pX = (0.4, 0.6) for x = 0, 1; pY = (0.25, 0.5, 0.25) for y = 0, 1, 2; X and Y are independent; P(Y = 1 | X = 1) = 0.5.

Exam tips

  • Always give the range of the marginal along with its formula. Marks are usually allocated to it.
  • Check the support before any algebra. A non-rectangular region settles the independence question straight away.
  • In MCQs, a quick test is to look for a term like x + y in the joint pdf. It cannot factorise, so the variables are not independent.
  • When asked to show that variables are uncorrelated but not independent, calculate Cov(X, Y) first, then find one cell or point where the product rule fails.
  • For a discrete table, write the row and column totals in the margins. Use them for both the marginals and the independence check, and verify that the grand total is 1.

Practice questions from Jointly distributed random variables

Marginal Distributions and Independence in other exams

The same ground in other exams, if you are preparing for more than one or want another angle on it.

Marginal Distributions and Independence: frequently asked questions

How do I find a marginal pdf from a joint pdf?

Integrate the joint pdf over the other variable across its full allowed range. For fX(x), integrate f(x, y) over y. If the region is not a rectangle, the limits for y depend on x, so sketch the region first.

How do I check whether two random variables are independent?

Check that the support is a rectangle, then see whether f(x, y) = fX(x) × fY(y) everywhere. In practice, try to factorise the joint pdf into a function of x times a function of y. For a table, test every cell.

What is the difference between independent and uncorrelated?

Independent variables have a joint distribution equal to the product of the marginals, which implies zero covariance. Uncorrelated only means zero covariance. Variables can be uncorrelated yet dependent, for example X and X² when X is symmetric about zero. For a bivariate normal, uncorrelated does imply independent.

What is the difference between a marginal and a conditional distribution?

A marginal distribution ignores the other variable and comes from summing or integrating the joint. A conditional distribution fixes the other variable at a value and is the joint divided by the marginal of that variable. If the variables are independent, the two are the same.