From a Joint Model to a Conditional Calculation
A joint distribution describes two variables together, but many questions concern one variable after information about the other is known. For example, a severity model may ask for the expected payment given an observed risk characteristic, or the probability that a waiting time exceeds a threshold given a rate parameter. The key is to use the distribution conditional on the information, rather than the marginal distribution of the variable of interest.
For continuous variables, conditioning at a particular value is described by a conditional density. Conditioning on an event such as \(X>c\) is different: it averages conditional probabilities over the possible values of \(X\) in that event. Keeping these two operations distinct is central to multi-step calculations.
The support must be conditioned on as well as the density. If the joint support restricts \(Y\) to an interval that depends on \(x\), then the conditional density is zero outside that interval. A conditional formula is relevant only for \(x\) where \(f_X(x)>0\); values outside that range do not define a conditional density by this ratio.
Once the conditional law is known, conditional expectations are calculated with it. For a function \(g\) whose conditional expectation exists, \(E[g(Y)\mid X=x]=\int g(y)f_{Y\mid X}(y\mid x)\,dy\), over the conditional support. In particular, setting \(g(y)=y\) gives the conditional mean, and setting \(g(y)=y^2\) gives the conditional second moment. The conditional variance is the second moment minus the square of the conditional mean.
Worked Example: A Conditional Law on a Triangular Support
Worked Example: A Conditional Law on a Triangular Support
Suppose \((X,Y)\) has joint density \(f_{X,Y}(x,y)=2\) on \(0<y<x<1\), and density zero elsewhere. Find the marginal density of \(X\), the conditional density and CDF of \(Y\) given \(X=x\), \(E[Y\mid X=x]\), and \(E[Y]\). Also find \(P(Y>X/2\mid X=x)\).
Method and support. For a fixed \(x\) between 0 and 1, the allowed values of \(y\) are \(0<y<x\). Integrate the joint density over this interval to obtain the marginal:
This marginal is normalized because \(\int_0^1 2x\,dx=1\). Divide the joint density by the marginal to get the conditional density:
It integrates to one on its conditional support: \(\int_0^x (1/x)\,dy=1\). Thus, for \(0\le y\le x\), the conditional CDF is \(F_{Y\mid X}(y\mid x)=y/x\); it is zero for \(y<0\) and one for \(y\ge x\).
The conditional mean follows by integrating \(y\) against the conditional density:
The event \(Y>X/2\), after fixing \(X=x\), becomes \(Y>x/2\). Its conditional probability is \(1-F_{Y\mid X}(x/2\mid x)=1-(x/2)/x=1/2\).
Finally, total expectation gives
Check. The conditional density integrates to one, and \(E[Y]=1/3\) lies within the support \(0<Y<1\). The calculation uses the conditional density on \(0<y<x\), not on the full interval \(0<y<1\).
Conditioning on an Event Versus a Value
For a continuous \(X\), the statement \(Y\mid X=x\) refers to a conditional distribution at a fixed value. By contrast, conditioning on \(X\in B\), where \(B\) is an event with positive probability, requires averaging over the values of \(X\) in \(B\). If \(X\) has density \(f_X\), then
The denominator is \(P(X\in B)\). Equivalently, within the event \(X\in B\), the values of \(X\) receive weights proportional to their original density. Omitting the denominator usually gives an unnormalized probability, not the desired conditional probability.
Worked Example: An Exponential Conditional Model
Let \(X\sim\operatorname{Uniform}(0,1)\). Given \(X=x\), suppose \(Y\) has an exponential distribution with rate \(2+x\), so its conditional density is \((2+x)e^{-(2+x)y}\) for \(y\ge0\). Find \(F_{Y\mid X}(y\mid x)\), \(P(Y>1\mid X>1/2)\), and \(E[Y]\).
Conditional CDF. Integrating the conditional density from 0 to \(y\) gives, for \(y\ge0\),
The conditional tail probability at a fixed \(x\) is therefore \(P(Y>1\mid X=x)=e^{-(2+x)}\).
Condition on the event. Since \(X\) is uniform on \((0,1)\), \(P(X>1/2)=1/2\), and the density of \(X\) conditional on \(X>1/2\) is 2 on \((1/2,1)\). Hence
The probability is reported to four decimal places. The factor 2 is the conditional density of \(X\) on the event, not an extra feature of the exponential model.
Total expectation. An exponential distribution with rate \(2+x\) has mean \(1/(2+x)\). Therefore
The logarithm is rounded to four decimal places. Common mistake avoided: integrating \(e^{-(2+x)}\) over \((1/2,1)\) without dividing by \(P(X>1/2)\) gives the joint probability \(P(Y>1,\ X>1/2)\), not the conditional probability. Here that unnormalized integral is about \(0.0323\); dividing by \(0.5\) gives \(0.0646\).
Total Expectation with a Mixed Conditioning Variable
A conditioning variable need not be purely continuous or purely discrete. It may have point masses as well as a continuous component. In that case, total expectation combines a sum over the atoms with an integral over the continuous part. More generally, if the possible conditioning cases form a partition, the unconditional mean is the probability-weighted average of the conditional means.
The formula follows by splitting the expectation into disjoint cases. On the atom, the contribution is its probability times the conditional mean. For the continuous part, first average the conditional mean at each \(m\), weighted by the density \(g(m)\). Adding the contributions accounts for the full distribution of \(M\).
Worked Example: A Mixed Conditioning Variable
A hypothetical model has a conditioning variable \(M\) with \(P(M=0)=0.2\). With the remaining probability \(0.8\), \(M\) is uniform on \((0,1)\). Given \(M=0\), \(Y\) is exponential with rate \(1/2\); given any \(0<M<1\), \(Y\) is exponential with rate \(1/4\). Find the conditional CDFs and \(E[Y]\).
Conditional distributions. An exponential distribution with rate \(\lambda\) has CDF \(1-e^{-\lambda y}\) and mean \(1/\lambda\), for \(y\ge0\). Thus
The corresponding conditional means are \(E[Y\mid M=0]=2\) and \(E[Y\mid M=m]=4\) for every \(m\) in the continuous part.
Apply the mixed total-expectation formula. The continuous component has density \(0.8\) on \((0,1)\), because it has total probability \(0.8\) and is uniform there. Consequently,
This also agrees with the partition calculation \(0.2(2)+0.8(4)=3.6\). The value \(3.6\) is the unconditional mean. Common mistake avoided: weighting the two conditional means equally would ignore that the atom has probability \(0.2\) while the continuous component has probability \(0.8\).
A Practical Calculation Sequence
For a multi-step conditional problem, a short sequence of checks helps keep the algebra tied to the model:
Identify the possible values and any restrictions linking the variables. For an event condition, confirm that the event has positive probability.
For continuous variables, divide the joint density by the appropriate marginal. For a mixed model, identify the conditional law on each atom and continuous component.
Integrate the conditional density for probabilities or moments, and use a normalized conditional distribution when conditioning on an event.
Use total expectation to obtain an unconditional mean, weighting each conditional mean by its probability or density.
Verify that densities integrate to one, event probabilities lie between zero and one, and means are consistent with the support and the conditional means.
Common Errors and Why They Matter
The main difficulty is often not integration, but using the right distribution and weights. Conditional densities depend on the conditioning value through both the joint density and its support. Conditional probabilities at a fixed value cannot automatically be substituted for probabilities conditioned on an event.
- Ignoring changing support. If \(0<Y<X\), then given \(X=x\), the conditional support is \(0<Y<x\), not \(0<Y<1\).
- Using a joint probability as a conditional probability. For an event \(B\) of positive probability, divide \(P(A\cap B)\) by \(P(B)\). In a continuous event calculation, this appears as normalization by the integral of the density over \(B\).
- Using an unconditional mean inside a conditional calculation. The conditional mean can change with the conditioning value. Use \(E[Y\mid X=x]\) before averaging over \(X\).
- Forgetting an atom in a mixed model. Integrating only over the continuous density omits the probability mass at the atom; include both contributions.
- Using equal weights for unequal cases. Total expectation weights each conditional mean by the probability of its case, not by the number of cases.
Conditional densities and total expectation are useful whenever information arrives in stages: a rating factor is observed before a claim is priced, a component is classified before its lifetime is modeled, or a risk category is known before a payment is projected. The same discipline applies in each setting: define the conditional law, calculate under it, then average with the correct weights. These methods are aligned with the SOA VEE Mathematical Statistics syllabus.
Check Your Understanding
For each problem, identify the conditional support or weights before calculating.
- Let \(X\sim\operatorname{Uniform}(0,2)\), and, given \(X=x\), let \(Y\sim\operatorname{Uniform}(0,x)\). Find \(f_{Y\mid X}(y\mid x)\), \(P(Y<X/3\mid X=x)\), and \(E[Y]\). (Answer: \(f_{Y\mid X}(y\mid x)=1/x\) for \(0<y<x\); probability \(1/3\); \(E[Y]=1/2\).)
- A joint density is \(2\) on \(0<y<x<1\) and zero elsewhere. Given \(X=0.8\), find \(F_{Y\mid X}(y\mid 0.8)\) for \(0\le y\le0.8\), \(P(Y>0.6\mid X=0.8)\), and \(E[Y\mid X=0.8]\). (Answer: \(F(y)=y/0.8\); probability \(0.25\); mean \(0.4\).)
- Let \(X\sim\operatorname{Uniform}(0,1)\), and, given \(X=x\), let \(T\) be exponential with rate \(1+x\). Find \(P(T>1\mid X>1/2)\). (Answer: \(2(e^{-5/2}-e^{-3})\approx0.0646\).)
- Suppose \(P(M=0)=0.3\), and conditional on \(M>0\), \(M\) is uniform on \((0,1)\). Let \(E[T\mid M=0]=1.5\) and \(E[T\mid M=m]=3\) for \(0<m<1\). Find \(E[T]\). (Answer: \(2.55\).)
- Let \(X\sim\operatorname{Uniform}(0,1)\), and given \(X=x\), let \(Y\) have density \(2y/x^2\) on \(0<y<x\). Find \(E[Y\mid X=x]\) and \(E[Y\mid X>1/2]\). (Answer: \(2x/3\) and \(1/2\), respectively.)