Tutorials › Exam P - Probability › Conditional Means for Continuous Conditioning Variables

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

Conditional Means for Continuous Conditioning Variables

Learn to compute conditional means from joint densities while correctly handling conditional supports and integrals that depend on the observed value.

Advanced 12 min read

What You'll Learn

  • Find a marginal density by integrating a joint density over the other variable.
  • Derive the conditional density of one variable given a value of a continuous variable.
  • Determine how the conditional support changes with the conditioning value.
  • Evaluate conditional means with parameter-dependent integration limits.
  • Check conditional densities and recognize common support errors.

Why the Conditional Support Matters

When \(Y\) is continuous, the event \(Y=y\) has probability zero, so \(E[X\mid Y=y]\) is not calculated by dividing by \(P(Y=y)\). Instead, the joint density of \(X\) and \(Y\) determines the conditional density of \(X\) at a specified value \(y\). The range of \(X\) given that value can depend on \(y\), and that range must be used in the integral for the conditional mean.

This tutorial develops the calculation from a joint density, emphasizes support and normalization checks, and works through cases where the integration limits vary with \(y\). These techniques are aligned with the SOA Exam P (Probability) syllabus.

Definition: Suppose \(X\) and \(Y\) have joint density \(f_{X,Y}(x,y)\). The marginal density of \(Y\) is $$ f_Y(y)=\int_{-\infty}^{\infty} f_{X,Y}(x,y)\,dx. $$ For a value \(y\) with \(f_Y(y)>0\), the conditional density of \(X\) given \(Y=y\) is $$ f_{X\mid Y}(x\mid y)=\frac{f_{X,Y}(x,y)}{f_Y(y)}. $$ Its conditional mean is $$ E[X\mid Y=y]=\int_{-\infty}^{\infty}x f_{X\mid Y}(x\mid y)\,dx, $$ provided the integral exists. In each integral, the integrand is zero outside its support.

Deriving the Conditional Density and Mean

The ratio in the conditional-density formula comes from conditioning on a narrow interval around \(y\). For a small interval of width \(dy\), the joint probability that \(X\) falls in a small interval of width \(dx\) around \(x\) and \(Y\) falls in that interval around \(y\) is approximately \(f_{X,Y}(x,y)\,dx\,dy\). The probability that \(Y\) falls in the interval is approximately \(f_Y(y)\,dy\). Their ratio is approximately

$$ \frac{f_{X,Y}(x,y)\,dx\,dy}{f_Y(y)\,dy} = \frac{f_{X,Y}(x,y)}{f_Y(y)}\,dx. $$

Thus the conditional density per unit of \(x\) is the joint density divided by the marginal density of the conditioning variable. Integrating \(x\) times this conditional density gives the conditional mean. This argument is applied at values where \(f_Y(y)>0\); at values with zero marginal density, this ratio does not define a conditional density.

In practice, the main work is often determining the conditional support. If the joint density is positive only on a region \(R\), then for fixed \(y\), the allowable \(x\)-values are those for which \((x,y)\in R\). Write those limits explicitly before integrating.

1
Read the joint support.
For a fixed \(y\), determine the range of \(x\) for which the joint density is positive.
2
Find the marginal density.
Integrate the joint density with respect to \(x\) over the allowed range.
3
Normalize conditionally.
Divide the joint density by the marginal density, retaining the correct conditional support.
4
Integrate for the mean.
Evaluate the integral of \(x\) times the conditional density and substitute the requested value of \(y\).

Worked Calculations

Worked Example: A Uniform Triangular Joint Distribution

A hypothetical risk model assigns a pair of normalized quantities \((X,Y)\) uniformly to the triangular region \(0<x<y<1\). Thus the joint density is \(f_{X,Y}(x,y)=2\) on that region and zero elsewhere; the constant is the density parameter, since the triangle has area \(1/2\). Find \(E[X\mid Y=0.6]\), and check the conditional density. No interest or mortality assumption is involved; the model is this specified continuous joint distribution.

Method and support. Fix \(y\). The inequalities \(0<x<y<1\) give \(0<x<y\), with \(0<y<1\). In particular, when \(y=0.6\), \(X\) can range only from 0 to 0.6.

Marginal density. Integrate the joint density over the allowable \(x\)-values:

$$ f_Y(y)=\int_0^y 2\,dx=2y,\qquad 0<y<1. $$

At \(y=0.6\), \(f_Y(0.6)=2(0.6)=1.2\). Therefore the conditional density is

$$ f_{X\mid Y}(x\mid 0.6)=\frac{2}{1.2}=\frac{5}{3}, \qquad 0<x<0.6. $$

Normalization check. The density integrates to \((5/3)(0.6)=1\). The conditional mean is

$$ E[X\mid Y=0.6] =\int_0^{0.6}x\frac{5}{3}\,dx =\frac{5}{3}\left[\frac{x^2}{2}\right]_0^{0.6} =\frac{5}{6}(0.36) =0.30. $$

The result also follows from the general conditional density \(1/y\) on \(0<x<y\), whose mean is \(y/2\). At \(y=0.6\), this gives \(0.3\), confirming the calculation. The common mistake is to integrate over \(0<x<1\), despite the condition \(x<y\).

Worked Example: A Support That Starts at the Conditioning Value

In a hypothetical model, \((X,Y)\) is uniform on \(0<y<x<1\), with joint density \(2\) on that region and zero elsewhere. The density parameter \(2\) normalizes the triangular region, whose area is \(1/2\). Find \(E[X\mid Y=0.4]\). There is no interest or mortality assumption; only the stated joint distribution is used.

Method and support. With \(y\) fixed, \(y<x<1\). The conditional range begins at \(y\), not at zero. Integrating over this range gives

$$ f_Y(y)=\int_y^1 2\,dx=2(1-y),\qquad 0<y<1. $$

At \(y=0.4\), \(f_Y(0.4)=2(0.6)=1.2\). Thus

$$ f_{X\mid Y}(x\mid 0.4)=\frac{2}{1.2}=\frac{5}{3}, \qquad 0.4<x<1. $$

The integral of this density is \((5/3)(1-0.4)=1\). Its mean is

$$ E[X\mid Y=0.4] =\int_{0.4}^{1}x\frac{5}{3}\,dx =\frac{5}{6}\left(1^2-0.4^2\right) =\frac{5}{6}(0.84) =0.70. $$

As a check, a uniform density on the interval from \(0.4\) to \(1\) has mean equal to the midpoint, \((0.4+1)/2=0.7\). A common wrong calculation treats \(X\mid Y=0.4\) as uniform on \((0,1)\), giving \(1/2\). That ignores the support condition \(x>y\); the correction is to integrate from \(0.4\) to 1.

Worked Example: A Nonconstant Joint Density

A hypothetical continuous model has joint density \(f_{X,Y}(x,y)=3x\) on \(0<y<x<1\), and zero elsewhere. The coefficient \(3\) is the density parameter: integrating \(3x\) over the region gives \(3\int_0^1 x^2\,dx=1\). Find \(E[X\mid Y=0.5]\) and check the conditional density. Interest and mortality assumptions do not apply to this probability model.

Method and support. For a fixed \(y\), the support is \(y<x<1\). First find the marginal density:

$$ f_Y(y)=\int_y^1 3x\,dx =\frac{3}{2}(1-y^2),\qquad 0<y<1. $$

At \(y=0.5\), this is \(\frac{3}{2}(1-0.25)=\frac{9}{8}\). Dividing the joint density by this marginal gives

$$ f_{X\mid Y}(x\mid 0.5) =\frac{3x}{9/8} =\frac{8x}{3},\qquad 0.5<x<1. $$

Check normalization:

$$ \int_{0.5}^{1}\frac{8x}{3}\,dx =\frac{4}{3}\left(1-0.25\right) =1. $$

Now integrate \(x\) against this conditional density:

$$ E[X\mid Y=0.5] =\int_{0.5}^{1}x\frac{8x}{3}\,dx =\frac{8}{3}\left[\frac{x^3}{3}\right]_{0.5}^{1} =\frac{8}{9}\left(1-\frac{1}{8}\right) =\frac{7}{9} \approx 0.7778. $$

The final decimal is rounded to four places. The result lies within the conditional support \((0.5,1)\), as it should. Using a uniform conditional density would be an error: the conditional density is proportional to \(x\), so larger allowable values receive more density.

Common Checks and Exam Traps

A conditional mean calculation is only as reliable as its support and density. Use these checks before accepting a result:

  • Support follows from the joint region. Fix \(y\) in the inequalities defining the joint support, then solve for \(x\). Do not automatically retain the original marginal range of \(X\).
  • The conditional density integrates to one. Verify \(\int f_{X\mid Y}(x\mid y)\,dx=1\) over the conditional support. Failure usually indicates an incorrect marginal or support.
  • The marginal is for the variable conditioned on. To find \(f_{X\mid Y}\), divide by \(f_Y(y)\), which is obtained by integrating out \(x\).
  • The conditional mean should fit the support. If \(X\) is restricted to an interval \((a,b)\), its finite conditional mean must lie between \(a\) and \(b\).
  • Do not interpret the point condition as an ordinary event ratio. For continuous \(Y\), \(P(Y=y)=0\). The conditional density ratio, not division by that probability, is the appropriate calculation.

The conditional density and mean are defined through densities at values where the marginal density is positive. Individual endpoint values often have probability zero, so a density formula at an endpoint may be immaterial to probabilities and expectations; use the formula on the interior of the support unless the model specifies otherwise.

Key takeaway: For continuous conditioning, first derive the marginal density of \(Y\), then divide the joint density by it on the support allowed by the fixed value \(Y=y\). The conditional mean is the integral of \(x\) against that normalized density, using those same conditional limits.

Check Your Understanding

For each problem, identify the conditional support before calculating. The models below are hypothetical joint probability distributions.

  1. The joint density is \(2\) on \(0<y<x<1\) and zero elsewhere. Find \(E[X\mid Y=0.3]\). (Answer: \(0.6500\))
  2. The joint density is \(1/2\) on \(0<x<y<2\) and zero elsewhere. Find \(E[X\mid Y=1.4]\). (Answer: \(0.7000\))
  3. The joint density is \(6y\) on \(0<y<x<1\) and zero elsewhere. Find \(E[X\mid Y=0.3]\). (Answer: \(0.6500\))
  4. The joint density is \(2\) on \(x>0,\ y>0,\ x+y<1\) and zero elsewhere. Find \(E[X\mid Y=0.3]\). (Answer: \(0.3500\))
  5. The joint density is \(3x\) on \(0<y<x<1\) and zero elsewhere. Find \(E[X\mid Y=0.6]\). (Answer: \(0.8167\))
Clinical Biostats