← Back to Blog
Exam Guides2026-09-147 min read

Marginal and Conditional Distributions for Actuarial Exam P

Derive marginal and conditional distributions from joint distributions for Exam P.

Marginal Distributions

The marginal PDF of X is obtained by integrating out Y: f_X(x) = integral of f(x, y) dy over all y. Similarly, f_Y(y) = integral of f(x, y) dx. For discrete variables, sum instead of integrate. The marginal distribution captures the behavior of one variable while ignoring the other, effectively collapsing a bivariate distribution down to a univariate one.

For example, if f(x, y) = 6(1 - y) for 0 < x < y < 1, then f_X(x) = integral from x to 1 of 6(1 - y) dy. Evaluating: 6[(y - y^2/2)] from x to 1 = 6[(1 - 1/2) - (x - x^2/2)] = 6[1/2 - x + x^2/2] = 3(1 - x)^2 for 0 < x < 1.

For the marginal of Y: f_Y(y) = integral from 0 to y of 6(1 - y) dx = 6(1 - y) * y for 0 < y < 1. Notice that the integration limits for x go from 0 to y because the support requires x < y. Always check that your marginal integrates to 1 as a verification step.

When the support region is rectangular, finding marginals is straightforward because the limits of integration do not depend on the other variable. For non-rectangular supports (triangles, curved regions), you must carefully determine how the limits of one variable depend on the other. Sketching the support region makes this process much easier.

Conditional Distributions

The conditional PDF of Y given X = x is f(y|x) = f(x, y) / f_X(x). This is valid whenever f_X(x) > 0. The conditional distribution behaves like a regular probability distribution in y for each fixed value of x. It satisfies all the properties of a PDF: it is non-negative and integrates to 1 over the conditional support of Y given X = x.

Continuing the example, f(y|x) = 6(1 - y) / (3(1 - x)^2) = 2(1 - y) / (1 - x)^2 for x < y < 1. Notice that the conditional support of Y is (x, 1), which depends on the given value of x. To verify this is a valid PDF, integrate: integral from x to 1 of 2(1 - y) / (1 - x)^2 dy = 2/(1 - x)^2 * [(y - y^2/2)] from x to 1 = 2/(1 - x)^2 * (1 - x)^2/2 = 1. It checks out.

The conditional mean E[Y|X = x] = integral from x to 1 of y * 2(1 - y) / (1 - x)^2 dy. Evaluating this integral gives the conditional expectation as a function of x. For this particular density, E[Y|X = x] = (1 + 2x) / 3 after carrying out the integration. This conditional mean is a linear function of x, which does not always happen but is common in textbook examples.

The conditional variance Var(Y|X = x) = E[Y^2|X = x] - (E[Y|X = x])^2. You compute E[Y^2|X = x] by integrating y^2 * f(y|x) dy, then subtract the square of the conditional mean. The conditional variance measures the remaining uncertainty about Y after observing X = x.

Recognizing Common Conditional Distributions

On Exam P, you should be able to recognize when a conditional distribution belongs to a named family. For instance, if f(y|x) = (1/x) * e^(-y/x) for y > 0, this is an Exponential distribution with mean x. If f(y|x) = C(n, y) * x^y * (1 - x)^(n - y), this is a Binomial(n, x) distribution. Identifying the conditional distribution immediately gives you the conditional mean and variance without integration.

A common Exam P pattern presents a hierarchical model: X | Theta ~ SomeDistribution(Theta), and Theta ~ AnotherDistribution. For example, X | Lambda ~ Poisson(Lambda) and Lambda ~ Exponential(1). The conditional distribution is Poisson with parameter Lambda, so E[X|Lambda] = Lambda and Var(X|Lambda) = Lambda. These conditional moments feed into the total expectation and total variance formulas.

The Law of Total Expectation and Total Variance

The law of total expectation states E[X] = E[E[X|Y]]. Here E[X|Y] is a function of the random variable Y, and taking its expectation over Y gives the unconditional mean of X. This formula is tested extensively on Exam P and provides a powerful tool for computing expectations in hierarchical or mixture models.

The law of total variance decomposes the unconditional variance: Var(X) = E[Var(X|Y)] + Var(E[X|Y]). The first term represents the average within-group variability, and the second term represents the between-group variability. Both terms are non-negative, so Var(X) is always at least as large as either component alone.

Example: If X | Theta ~ Exponential(1/Theta), meaning E[X|Theta] = Theta and Var(X|Theta) = Theta^2, and Theta ~ Uniform(1, 3), then E[X] = E[Theta] = 2. For the variance: E[Var(X|Theta)] = E[Theta^2] = integral from 1 to 3 of t^2 * (1/2) dt = (1/2)(27/3 - 1/3) = 13/3. Var(E[X|Theta]) = Var(Theta) = (3 - 1)^2/12 = 1/3. Therefore Var(X) = 13/3 + 1/3 = 14/3.

Finding Marginal Distributions by Integration

Sometimes Exam P asks for the entire marginal distribution of X, not just its mean. This requires integrating f(x, y) = f(x|theta) * g(theta) over theta. A classic result: if X | Lambda ~ Poisson(Lambda) and Lambda ~ Gamma(r, beta), then the marginal distribution of X is Negative Binomial with parameters r and p = beta/(1 + beta).

To derive this, compute P(X = k) = integral from 0 to infinity of [e^(-lambda) * lambda^k / k!] * [beta^r * lambda^(r-1) * e^(-beta*lambda) / Gamma(r)] d_lambda. Combining the exponential terms and the powers of lambda, the integral evaluates to a Beta function, and the result simplifies to the Negative Binomial PMF.

While you may not need to carry out this full derivation on Exam P, understanding the Poisson-Gamma conjugate relationship is valuable. Recognizing that a Poisson mixture with a Gamma mixing distribution produces a Negative Binomial allows you to immediately write down the marginal mean and variance: E[X] = r/beta and Var(X) = r(1 + beta)/beta^2.

Common Pitfalls

A frequent error is confusing f(y|x) with f(x|y). These are different conditional distributions computed from the same joint density but dividing by different marginals. Always match the variable you are conditioning on with the correct marginal in the denominator.

Another mistake is using incorrect integration limits when computing marginals from non-rectangular supports. If the joint support is 0 < x < y < 1, then when finding f_X(x), integrate y from x to 1 (not from 0 to 1). When finding f_Y(y), integrate x from 0 to y (not from 0 to 1). The limits reflect the constraint between x and y.

Students sometimes forget to verify that their conditional density integrates to 1. This check catches arithmetic errors early. If the conditional density does not integrate to 1 over the conditional support, either the marginal or the joint density was computed incorrectly.

Study Tips

For Exam P, practice the full pipeline: start with a joint density, find both marginals, compute a conditional distribution, and verify it integrates to 1. Then apply the total expectation and total variance formulas. Work through at least 10 problems involving hierarchical models where X | Theta has a named distribution. Build a reference table of common conjugate pairs (Poisson-Gamma, Binomial-Beta, Normal-Normal) and their resulting marginal distributions. On exam day, recognizing the structure of a hierarchical model and applying the tower property should take about three minutes per problem.

Ready to practice?

Put this knowledge to work with flashcards and practice exams.

Start Studying Free