From Conditional Moments to Unconditional Answers
Many probability problems describe a random outcome differently across groups, operating conditions, or stages. The challenge is not merely to calculate a mean or variance within each case; it is to combine those case-specific results without losing variation between cases. A suitable conditioning variable makes this combination systematic.
The central tools are the laws of total expectation and total variance. The first averages conditional means. The second accounts for both variation within each condition and variation between conditional means. They are aligned with the SOA Exam P (Probability) syllabus and are especially useful when the unconditional distribution of a variable is awkward to construct directly.
For a discrete conditioning variable, the outer expectations are weighted sums over its possible values. For a continuous conditioning variable, they are integrals with respect to its distribution. The identities require the relevant moments to exist: use the expectation identity when \(E[|X|]\) is finite, and the variance identity when \(E[X^2]\) is finite. A calculation of conditional moments alone does not establish that the unconditional variance is finite.
Why the Variance Identity Has Two Terms
Write the deviation of \(X\) from its unconditional mean as the sum of a within-condition deviation and a between-condition deviation: \(X-E[X]=(X-E[X\mid Z])+(E[X\mid Z]-E[X])\). Squaring and taking expectations gives the variance identity, because the cross term has expectation zero.
To see why the middle term vanishes, condition on \(Z\). The factor \(E[X\mid Z]-E[X]\) is fixed once \(Z\) is known, while \(E[X-E[X\mid Z]\mid Z]=0\). Thus the conditional expectation of the product is zero, and so is its expectation. The first term is \(E[\operatorname{Var}(X\mid Z)]\); the last is \(\operatorname{Var}(E[X\mid Z])\). This proves the identity.
The conditioning variable should simplify the problem, not add unnecessary work. Useful choices include a group label, a random count, a stage in a process, or a latent operating condition. In a multi-stage problem, calculate the moments given the most informative condition first, then average those moments over the next condition.
Worked Example: Combining Two Group-Specific Loss Models
A hypothetical coverage portfolio has two groups. Group A occurs with probability \(1/3\); conditional on A, the loss \(X\) is 0 or 4 with equal probabilities. Group B occurs with probability \(2/3\); conditional on B, \(X\) is 2 or 8 with equal probabilities. Find \(E[X]\) and \(\operatorname{Var}(X)\). Use the group label as the conditioning variable.
Method. Find each group’s conditional mean and variance, then apply total expectation and total variance. For two equally likely values separated by 4, the mean is their midpoint and the variance is \(2^2=4\).
In group A, \(E[X\mid A]=(0+4)/2=2\), and \(\operatorname{Var}(X\mid A)=((0-2)^2+(4-2)^2)/2=4\). In group B, \(E[X\mid B]=(2+8)/2=5\), and \(\operatorname{Var}(X\mid B)=((2-5)^2+(8-5)^2)/2=9\).
Therefore,
The expected conditional variance is \(\frac13(4)+\frac23(9)=\frac{4+18}{3}=\frac{22}{3}\). The variance of the conditional means is
where \(G\) denotes the group. Hence \(\operatorname{Var}(X)=22/3+2=28/3\).
Check. The conditional second moments are \(E[X^2\mid A]=4\) and \(E[X^2\mid B]=(4+64)/2=34\). Thus \(E[X^2]=\frac13(4)+\frac23(34)=24\), and \(24-4^2=8\). This does not match \(28/3\), so the second-moment check reveals an arithmetic inconsistency: in group A, \(E[X^2\mid A]=(0^2+4^2)/2=8\), not 4. Correcting it gives \(E[X^2]=\frac13(8)+\frac23(34)=76/3\), and \(76/3-16=28/3\), as required. The check also illustrates why each conditional moment should be verified.
Common mistake avoided. Averaging only the conditional variances would give \(22/3\), omitting the variation between the group means. The between-group term is 2, so the unconditional variance is larger.
Nested Conditioning and Random Sums
A random sum is a natural setting for more than one conditioning step. Suppose a group \(G\) determines the distribution of a claim count \(N\), and, within each group, the severities \(W_1,W_2,\ldots\) are independent and identically distributed and independent of \(N\). Define \(S=\sum_{j=1}^{N}W_j\), with \(S=0\) when \(N=0\). If, in each group, \(E[N\mid G]\) and \(\operatorname{Var}(N\mid G)\) are finite and severity has finite mean \(\mu_W\) and variance \(\sigma_W^2\), then
The conditional formula follows by first fixing \(N=n\). The sum then contains \(n\) independent severities, so its conditional mean is \(n\mu_W\) and its conditional variance is \(n\sigma_W^2\). Applying total expectation and total variance over \(N\), while holding \(G\) fixed, gives the displayed formulas. The finite-moment conditions matter: without a finite variance for \(N\), the ordinary finite-variance formula need not be defined.
Worked Example: A Group-Dependent Random Claim Count
A hypothetical portfolio is in group A with probability \(1/4\) and group B with probability \(3/4\). Given A, \(N\) is 0 or 2 with equal probabilities. Given B, \(N\) is 1 or 3 with equal probabilities. In either group, conditional on the group, claim severities are independent and identically distributed, independent of \(N\), with mean 2 and variance 1. Let \(S\) be total claim severity. Find its mean and variance.
Method. First calculate the count moments and aggregate moments within each group; then combine the group-specific moments. All counts and severities here have finite second moments, so the random-sum variance formula applies.
For A, \(E[N\mid A]=(0+2)/2=1\) and \(\operatorname{Var}(N\mid A)=((0-1)^2+(2-1)^2)/2=1\). Thus \(E[S\mid A]=2(1)=2\), and \(\operatorname{Var}(S\mid A)=1(1)+2^2(1)=5\).
For B, \(E[N\mid B]=(1+3)/2=2\) and \(\operatorname{Var}(N\mid B)=((1-2)^2+(3-2)^2)/2=1\). Thus \(E[S\mid B]=2(2)=4\), and \(\operatorname{Var}(S\mid B)=1(2)+2^2(1)=6\).
The unconditional mean is \(E[S]=\frac14(2)+\frac34(4)=\frac12+3=3.5\). The expected conditional variance is \(\frac14(5)+\frac34(6)=1.25+4.5=5.75\). The variance of the conditional means is \(\frac14(2-3.5)^2+\frac34(4-3.5)^2 =\frac14(2.25)+\frac34(0.25)=0.5625+0.1875=0.75\). Therefore, \(\operatorname{Var}(S)=5.75+0.75=6.5\).
Check. The group-specific second moments are \(5+2^2=9\) in A and \(6+4^2=22\) in B. Hence \(E[S^2]=\frac14(9)+\frac34(22)=18.75\), and \(18.75-(3.5)^2=18.75-12.25=6.5\).
Common mistake avoided. Using only the average of the group-specific variances gives 5.75, not the unconditional variance. The remaining 0.75 represents variation between the two conditional means.
Reading a Conditional-Moment Table
Some problems provide conditional means and variances rather than full conditional distributions. That information is sufficient for an unconditional mean and variance, provided the conditioning probabilities are known and the required moments are finite. Keep the two variance contributions separate until the final addition.
Worked Example: Using Conditional Moments Without a Full Distribution
A random operating state \(Z\) takes values 0, 1, and 2 with probabilities 0.5, 0.3, and 0.2, respectively. A cost \(X\) has the following conditional moments: when \(Z=0\), its mean is 1 and variance is 2; when \(Z=1\), its mean is 4 and variance is 1; when \(Z=2\), its mean is 2 and variance is 4. Find \(E[X]\) and \(\operatorname{Var}(X)\).
Method. Weight the conditional means to obtain the overall mean. Then calculate the average conditional variance and the variance of the conditional means.
The mean is \(E[X]=0.5(1)+0.3(4)+0.2(2)=0.5+1.2+0.4=2.1\). The within-state contribution is \(E[\operatorname{Var}(X\mid Z)]=0.5(2)+0.3(1)+0.2(4)=1+0.3+0.8=2.1\).
The between-state contribution is
Consequently, \(\operatorname{Var}(X)=2.1+1.69=3.79\).
Check. The weighted conditional second moments are \(0.5(2+1^2)+0.3(1+4^2)+0.2(4+2^2)=0.5(3)+0.3(17)+0.2(8)=1.5+5.1+1.6=8.2\). Subtracting \(E[X]^2=2.1^2=4.41\) gives \(8.2-4.41=3.79\).
Common mistake avoided. A table of conditional variances is not a table of unconditional variance contributions alone. The state-specific means differ, so the between-state term must also be included.
A Reliable Problem-Solving Sequence
For advanced problems, write down the conditioning structure before substituting numbers. This prevents mixing moments from different stages or averaging a variance before identifying which random variable it describes.
Identify the variable that makes the conditional model simple, such as a group, count, or operating state.
For each possible condition, calculate \(E[X\mid Z]\) and, when needed, \(\operatorname{Var}(X\mid Z)\). Check the model assumptions and moment existence.
Use the probabilities of the conditioning values to calculate \(E[E[X\mid Z]]\) and \(E[\operatorname{Var}(X\mid Z)]\).
Calculate \(\operatorname{Var}(E[X\mid Z])\) and add it to the expected conditional variance.
When convenient, calculate \(E[X^2]=E[\operatorname{Var}(X\mid Z)+(E[X\mid Z])^2]\) and verify that \(\operatorname{Var}(X)=E[X^2]-(E[X])^2\).
The second-moment check is particularly useful for catching arithmetic errors and omitted terms. It does not replace checking assumptions: for example, a random-sum formula requires appropriate count moments, and conditional independence must not be assumed unless the model states it.
Check Your Understanding
For each problem, identify the conditioning structure and calculate the requested moments.
- A hypothetical risk pool is in state A with probability 0.4 and state B with probability 0.6. Given A, \(X\) is 1 or 5 with equal probabilities; given B, \(X\) is 4 or 6 with equal probabilities. Find \(E[X]\) and \(\operatorname{Var}(X)\). (Answer: \(E[X]=4.2,\ \operatorname{Var}(X)=3.16\))
- A state \(Z\) equals 0 with probability 0.25 and 1 with probability 0.75. Given \(Z=0\), \(E[X\mid Z]=1\) and \(\operatorname{Var}(X\mid Z)=2\); given \(Z=1\), the conditional mean is 5 and variance is 6. Find the unconditional mean and variance. (Answer: \(E[X]=4,\ \operatorname{Var}(X)=8\))
- A hypothetical total \(S\) is a random sum. In group A, which has probability 0.5, \(N\) is 0 or 2 with equal probabilities; in group B, also with probability 0.5, \(N\) is 1 or 3 with equal probabilities. Within either group, severities are iid, independent of \(N\), and have mean 2 and variance 1. Find the mean and variance of \(S\). (Answer: \(E[S]=3,\ \operatorname{Var}(S)=6.5\))
- A state \(Z\) takes values 0, 1, and 2 with probabilities 0.2, 0.3, and 0.5. The conditional means of \(X\) are 0, 2, and 4, respectively, and the conditional variances are 1, 4, and 1. Find \(E[X]\) and \(\operatorname{Var}(X)\). (Answer: \(E[X]=2.6,\ \operatorname{Var}(X)=4.34\))
- In a two-group model, group A has probability 0.25 and conditional mean and variance \(2\) and \(5\); group B has probability 0.75 and conditional mean and variance \(4\) and \(6\). Find the unconditional mean and variance, and state the variance contribution from differences between group means. (Answer: \(E[X]=3.5,\ \operatorname{Var}(X)=6.5\), between-group contribution \(=0.75\))