Tutorials › Exam P - Probability › Integrated Conditional Moment Decompositions

Exam P · Conditional Expectation and Decomposition · Tutorial 791 of 915

Integrated Conditional Moment Decompositions

Learn to carry conditional means, variances, and covariances through multiple layers and check each result against unconditional moments.

Advanced 12 min read

What You'll Learn

  • Apply the tower property when one conditioning level is nested inside another.
  • Calculate an unconditional variance by separating within-condition and between-condition variation.
  • Decompose covariance into conditional covariance and covariance of conditional means.
  • Compare one-stage and nested decompositions to check a calculation.
  • Use conditional moments to find the mean and variance of a compound random sum.
  • Identify errors caused by omitting a decomposition term or using incorrect weights.

Why Integrated Decompositions Matter

Many probability models have more than one layer of uncertainty. A claim total, for example, may depend first on whether the environment is calm or severe, then on the number of claims in that environment, and finally on the claim amounts. Calculating an unconditional mean or variance directly can obscure which layer contributes what. Conditional moment decompositions make those contributions explicit and provide independent checks on a calculation.

This tutorial combines the tower property of conditional expectation with the laws of total expectation and total variance, and with the corresponding decomposition for covariance. The key discipline is to keep the conditioning levels and their weights clear. These methods are aligned with the SOA Exam P (Probability) syllabus.

Definition: If the information represented by \(G\) is contained in the information represented by \(H\), then \(H\) is a finer conditioning level than \(G\). The tower property states that $$ E\!\left[E[X\mid H]\mid G\right]=E[X\mid G]. $$ The outer conditional expectation averages the finer-level conditional means over the possibilities still allowed by \(G\).

The Main Decompositions

For a random variable \(X\) with finite second moment and any conditioning variable \(G\), the law of total expectation and law of total variance are

$$ E[X]=E\!\left[E[X\mid G]\right], \qquad \operatorname{Var}(X) = E\!\left[\operatorname{Var}(X\mid G)\right] + \operatorname{Var}\!\left(E[X\mid G]\right). $$

The first variance term averages the variability remaining within each condition. The second measures how much the conditional means vary across conditions. Neither term can generally be omitted.

For random variables \(X\) and \(Y\) with finite second moments, the corresponding covariance identity is

$$ \operatorname{Cov}(X,Y) = E\!\left[\operatorname{Cov}(X,Y\mid G)\right] + \operatorname{Cov}\!\left(E[X\mid G],E[Y\mid G]\right). $$

The first term is the average conditional covariance. The second is the covariance between the conditional means as the condition changes. Conditional independence, if it holds, makes the first term zero; it does not by itself make the unconditional covariance zero.

Why the Variance and Covariance Formulas Hold

A short derivation explains the two parts of total variance. Write \(m(G)=E[X\mid G]\). Since \(E[X-m(G)\mid G]=0\), expand the squared deviation from the unconditional mean:

$$ X-E[X] = \bigl(X-m(G)\bigr)+\bigl(m(G)-E[X]\bigr). $$

Squaring gives two squared terms and a cross term. The expected cross term is zero, because \(m(G)-E[X]\) is determined by \(G\):

$$ E\!\left[(X-m(G))(m(G)-E[X])\right] = E\!\left[(m(G)-E[X])E[X-m(G)\mid G]\right] =0. $$

The expected first squared term is \(E[\operatorname{Var}(X\mid G)]\), and the expected second squared term is \(\operatorname{Var}(m(G))\). Their sum is therefore \(\operatorname{Var}(X)\).

For covariance, use the analogous expansions for \(X-E[X]\) and \(Y-E[Y]\), separating each into a deviation from its conditional mean and a deviation of that conditional mean from its unconditional mean. The cross terms have expectation zero by conditional expectation. The two remaining terms are precisely the expected conditional covariance and the covariance of the conditional means.

Theorem: If \(G\) is a coarser conditioning level than \(H\), nested decompositions can be applied successively. For example, $$ E[X]=E\!\left[E\!\left[E[X\mid H]\mid G\right]\right], $$ and the variance can be decomposed first within \(H\), then between \(H\)-levels within \(G\), and finally between \(G\)-levels. The weights at each stage must be conditional probabilities appropriate to that stage.

Worked Example: Two Layers of a Mixture

Worked Example: Two Layers of a Mixture

A hypothetical equipment-loss model has two stages. The regime \(Z\) is ordinary with probability \(0.7\) and stressed with probability \(0.3\). Given the regime, a loss condition \(W\) can be low or high. In the ordinary regime, \(P(W=\text{high}\mid Z)=0.2\); in the stressed regime, that probability is \(0.6\). The conditional means and variances of the loss \(X\), in thousands of dollars, are:

  • ordinary, low: mean \(10\), variance \(4\); ordinary, high: mean \(20\), variance \(9\);
  • stressed, low: mean \(15\), variance \(16\); stressed, high: mean \(30\), variance \(25\).

Find \(E[X]\) and \(\operatorname{Var}(X)\) using the nested decomposition, then check them by treating the four joint conditions as one mixture. The stated conditional moments are assumed finite.

Method and mean. First find the joint probabilities by multiplying each regime probability by its conditional condition probability:

$$ \begin{aligned} P(\text{ordinary, low})&=0.7(0.8)=0.56,\\ P(\text{ordinary, high})&=0.7(0.2)=0.14,\\ P(\text{stressed, low})&=0.3(0.4)=0.12,\\ P(\text{stressed, high})&=0.3(0.6)=0.18. \end{aligned} $$

These probabilities sum to \(0.56+0.14+0.12+0.18=1\). The mean within each regime is

$$ \begin{aligned} E[X\mid Z=\text{ordinary}]&=0.8(10)+0.2(20)=12,\\ E[X\mid Z=\text{stressed}]&=0.4(15)+0.6(30)=24. \end{aligned} $$

Thus the tower property gives \(E[X]=0.7(12)+0.3(24)=8.4+7.2=15.6\) thousand dollars.

Nested variance. Within the ordinary regime, the average conditional variance is \(0.8(4)+0.2(9)=5\). The variance of the two conditional means \(10\) and \(20\) is \(0.8(10-12)^2+0.2(20-12)^2=3.2+12.8=16\). Therefore \(\operatorname{Var}(X\mid Z=\text{ordinary})=5+16=21\).

Within the stressed regime, the average conditional variance is \(0.4(16)+0.6(25)=6.4+15=21.4\). The variance of its conditional means is \(0.4(15-24)^2+0.6(30-24)^2=32.4+21.6=54\). Hence \(\operatorname{Var}(X\mid Z=\text{stressed})=21.4+54=75.4\).

The average within-regime variance is \(0.7(21)+0.3(75.4)=14.7+22.62=37.32\). The between-regime variance is \(0.7(12-15.6)^2+0.3(24-15.6)^2=9.072+21.168=30.24\). Consequently,

$$ \operatorname{Var}(X)=37.32+30.24=67.56 \quad\text{(thousand dollars)}^2. $$

Check using the four joint conditions. The mean is \(0.56(10)+0.14(20)+0.12(15)+0.18(30)=5.6+2.8+1.8+5.4=15.6\). The average conditional variance is \(0.56(4)+0.14(9)+0.12(16)+0.18(25)=2.24+1.26+1.92+4.5=9.92\). The variance of the four conditional means about \(15.6\) is

$$ 0.56(10-15.6)^2+0.14(20-15.6)^2 +0.12(15-15.6)^2+0.18(30-15.6)^2 =17.5616+2.7104+0.0432+37.3248=57.64. $$

The joint-condition calculation gives \(9.92+57.64=67.56\), matching the nested calculation. The method avoids treating a conditional mean as if it were the unconditional mean; all four joint weights are included in the check.

Worked Example: Covariance Across Nested Groups

Worked Example: Covariance Across Nested Groups

A hypothetical portfolio is divided equally between groups \(A\) and \(B\). Within \(A\), subtype 1 has conditional probability \(0.6\), and subtype 2 has probability \(0.4\). Within \(B\), the corresponding probabilities are \(0.2\) and \(0.8\). In each leaf group, the conditional means of two measurements \(X,Y\) and their conditional covariance are given below:

Leaf groupConditional mean of \(X\)Conditional mean of \(Y\)Conditional covariance
A, subtype 1251
A, subtype 281-2
B, subtype 1470.5
B, subtype 21033

Find the unconditional covariance by decomposing first within each main group and then between the main groups. Assume the listed conditional covariances and means exist.

Method. The joint leaf probabilities are \(0.5(0.6)=0.3\), \(0.5(0.4)=0.2\), \(0.5(0.2)=0.1\), and \(0.5(0.8)=0.4\). The conditional means within each main group are

$$ \begin{aligned} E[X\mid A]&=0.6(2)+0.4(8)=4.4, & E[Y\mid A]&=0.6(5)+0.4(1)=3.4,\\ E[X\mid B]&=0.2(4)+0.8(10)=8.8, & E[Y\mid B]&=0.2(7)+0.8(3)=3.8. \end{aligned} $$

For group \(A\), the expected leaf-level conditional covariance is \(0.6(1)+0.4(-2)=0.6-0.8=-0.2\). The covariance of the leaf-level conditional means is

$$ 0.6(2-4.4)(5-3.4)+0.4(8-4.4)(1-3.4) =0.6(-3.84)+0.4(-8.64)=-2.304-3.456=-5.76. $$

So \(\operatorname{Cov}(X,Y\mid A)=-0.2-5.76=-5.96\). For group \(B\), the expected conditional covariance is \(0.2(0.5)+0.8(3)=0.1+2.4=2.5\), and the covariance of its leaf-level means is

$$ 0.2(4-8.8)(7-3.8)+0.8(10-8.8)(3-3.8) =0.2(-15.36)+0.8(-0.96)=-3.072-0.768=-3.84. $$

Thus \(\operatorname{Cov}(X,Y\mid B)=2.5-3.84=-1.34\). Averaging the two within-group covariances gives \(0.5(-5.96)+0.5(-1.34)=-2.98-0.67=-3.65\).

The between-main-group term is

$$ 0.5(4.4-6.6)(3.4-3.6)+0.5(8.8-6.6)(3.8-3.6) =0.5(0.44)+0.5(0.44)=0.44, $$

where \(E[X]=0.5(4.4)+0.5(8.8)=6.6\) and \(E[Y]=0.5(3.4)+0.5(3.8)=3.6\). Therefore \(\operatorname{Cov}(X,Y)=-3.65+0.44=-3.21\).

Check. From the four leaves, \(E[XY]\) is \(0.3(1+2\cdot5)+0.2(-2+8\cdot1)+0.1(0.5+4\cdot7)+0.4(3+10\cdot3)=3.3+1.2+2.85+13.2=20.55\). Hence \(E[XY]-E[X]E[Y]=20.55-(6.6)(3.6)=20.55-23.76=-3.21\), as required. The common mistake avoided here is averaging the leaf covariances alone, which would omit the covariance of the conditional means.

Worked Example: A Random Sum With a Shared Regime

Worked Example: A Random Sum With a Shared Regime

A hypothetical one-period portfolio has a calm regime with probability \(0.75\) and a severe regime with probability \(0.25\). Conditional on the regime, the claim count \(N\) has a Poisson distribution: its parameter is \(1\) in the calm regime and \(3\) in the severe regime. Given the regime, claim amounts are independent and identically distributed, independent of \(N\), with mean \(2\) and variance \(1\) in the calm regime, and mean \(4\) and variance \(4\) in the severe regime. Let \(S\) be the total claim amount, with \(S=0\) when \(N=0\). Find \(E[S]\) and \(\operatorname{Var}(S)\).

Method and assumptions. For a fixed regime, let the claim amount have mean \(m\) and variance \(s^2\), and let \(N\sim\operatorname{Poisson}(\lambda)\). Conditional on \(N\), the sum has mean \(Nm\) and variance \(Ns^2\). Applying total expectation and total variance within that regime gives

$$ E[S]=\lambda m,\qquad \operatorname{Var}(S)=E[Ns^2]+\operatorname{Var}(Nm) =\lambda s^2+\lambda m^2 =\lambda(s^2+m^2). $$

Here we used \(E[N]=\operatorname{Var}(N)=\lambda\). The assumptions about conditional independence matter: if claim amounts or the count did not have the stated conditional structure, these formulas would not automatically apply.

In the calm regime, \(E[S\mid\text{calm}]=1(2)=2\) and \(\operatorname{Var}(S\mid\text{calm})=1(1+2^2)=5\). In the severe regime, \(E[S\mid\text{severe}]=3(4)=12\) and \(\operatorname{Var}(S\mid\text{severe})=3(4+4^2)=3(20)=60\).

The unconditional mean is \(0.75(2)+0.25(12)=1.5+3=4.5\). The average conditional variance is \(0.75(5)+0.25(60)=3.75+15=18.75\). The variance of the conditional means is

$$ 0.75(2-4.5)^2+0.25(12-4.5)^2 =0.75(6.25)+0.25(56.25) =4.6875+14.0625=18.75. $$

Thus \(\operatorname{Var}(S)=18.75+18.75=37.5\). As a check, \(E[S^2]=\operatorname{Var}(S)+(E[S])^2=37.5+4.5^2=37.5+20.25=57.75\). The same second moment follows by conditioning: \(0.75(5+2^2)+0.25(60+12^2)=0.75(9)+0.25(204)=6.75+51=57.75\). The common mistake avoided is to use only the average regime-specific variance, \(18.75\), and forget the additional variability caused by the changing regime-specific means.

Common Traps and a Reliable Workflow

Integrated problems are less about memorizing a new identity than about applying familiar identities at the correct level. Before calculating, write down which variables or groups define the layers and which quantities are conditional on each layer. In a discrete problem, check that the probabilities at each branching point sum to one; in a continuous problem, use the appropriate conditional distribution or conditional expectation instead of treating conditional values as equally likely.

  • Leaving out between-group variation. \(E[\operatorname{Var}(X\mid G)]\) is not generally the whole unconditional variance. Add \(\operatorname{Var}(E[X\mid G])\).
  • Dropping the conditional covariance term. In the covariance identity, variation between conditional means is only one part. Add \(E[\operatorname{Cov}(X,Y\mid G)]\) unless it is known to be zero.
  • Using marginal weights at the wrong level. A subtype probability within group \(A\) is not the joint probability of that subtype and \(A\). Multiply by \(P(A)\) when forming joint weights.
  • Assuming conditional independence implies unconditional independence. A shared random regime can make \(X\) and \(Y\) associated even when they are conditionally independent within every regime.
  • Mixing conditional means and unconditional means. In a between-group term, center each conditional mean at the unconditional mean, not at another group’s mean.
1
Draw the conditioning layers.
Write down the coarse condition, any finer condition, and the conditional probabilities linking them.
2
Calculate conditional moments at the leaves.
Find each leaf-level mean, variance, or covariance using the model specified for that leaf.
3
Average upward one layer at a time.
Use conditional probabilities within each parent group, then use parent probabilities to obtain unconditional moments.
4
Check by another identity.
For variance, compare with \(E[X^2]-(E[X])^2\) when the second moment is available. For covariance, compare with \(E[XY]-E[X]E[Y]\).

This approach is useful whenever uncertainty is generated in stages: mixture models, random counts and sums, group-based populations, or variables that share a latent condition. A second calculation is not just arithmetic repetition; it is a way to detect omitted terms, incorrect weights, or a mistaken conditioning level.

Check Your Understanding

For each problem, identify the conditioning level before applying a decomposition.

  1. A group label \(G\) is type 1 with probability \(0.25\) and type 2 with probability \(0.75\). The conditional means of \(X\) are \(4\) and \(10\), and the conditional variances are \(9\) and \(4\), respectively. Find \(E[X]\) and \(\operatorname{Var}(X)\). (Answer: \(E[X]=8.5,\ \operatorname{Var}(X)=12\))
  2. A hypothetical payment \(X\) is \(12\) if an event occurs and \(0\) otherwise. A condition \(Z\) is red with probability \(0.4\) and blue with probability \(0.6\); the event probabilities are \(0.5\) given red and \(0.25\) given blue. Find \(E[X]\). (Answer: \(4.2\))
  3. Group \(A\) has probability \(0.3\), and group \(B\) has probability \(0.7\). The conditional means \((E[X\mid G],E[Y\mid G])\) are \((1,4)\) in \(A\) and \((5,2)\) in \(B\). The conditional covariances are \(2\) in \(A\) and \(-1\) in \(B\). Find \(\operatorname{Cov}(X,Y)\). (Answer: \(-1.78\))
  4. A regime is calm with probability \(0.6\) and severe with probability \(0.4\). For a total \(T\), the conditional means are \(3\) and \(8\), and the conditional variances are \(2\) and \(5\), respectively. Find \(E[T]\) and \(\operatorname{Var}(T)\). (Answer: \(E[T]=5,\ \operatorname{Var}(T)=9.2\))
Clinical Biostats