Why Conditional Moments Depend on the Conditioning Value
A conditional law describes how a random variable behaves after another variable is known. Its moments summarize that behavior: the conditional mean gives its center, while higher moments describe further features of the conditional distribution. These summaries are generally functions of the value being conditioned on, not single constants.
For example, a measurement may tend to be larger for subjects in one group than another, or the spread of a measurement may change with age. To express such patterns precisely, calculate moments from the conditional mass function or density at each relevant conditioning value.
Definitions from a Conditional Law
Let \(X\) and \(Y\) be random variables. For a discrete \(Y\), condition on a value \(y\) with \(P(Y=y)>0\). The conditional mass function of \(X\) is \(p_{X\mid Y}(x\mid y)=P(X=x\mid Y=y)\). For a pair with a joint density, the conditional density is \(f_{X\mid Y}(x\mid y)=f_{X,Y}(x,y)/f_Y(y)\) when \(f_Y(y)>0\). In the density setting this formula gives a conditional law for almost every \(y\) with respect to the distribution of \(Y\); values at which \(f_Y(y)=0\) do not determine a unique conditional law.
For a discrete conditional law, the moments are sums:
For a conditional density, the corresponding formulas are integrals:
These formulas require the relevant absolute moments to be finite. For a density, the integrals describe the chosen conditional-density version at values where that version is defined; probabilistic statements about them are understood to hold for almost every conditioning value.
Worked Example: Conditional Moments from a Discrete Law
Suppose \(P(Y=0)=P(Y=1)=1/2\). Given \(Y=0\), \(X\) is 0 with probability \(3/4\) and 2 with probability \(1/4\). Given \(Y=1\), \(X\) is 1 with probability \(1/4\) and 3 with probability \(3/4\). Find the conditional mean, second raw moment, and second central moment for both values of \(Y\).
For \(Y=0\), the conditional mean is
The second raw moment is
Centering at the conditional mean \(1/2\), the second central moment is
For \(Y=1\), the conditional mean and second raw moment are
Thus the second central moment is
The conditional mean changes from \(1/2\) to \(5/2\), while the second central moment is \(3/4\) in both groups. The conditional mean and the conditional spread need not vary together.
Calculating Moments by Integration
With a conditional density, each moment is an integral under that density, with the conditioning value held fixed. It is important to use the conditional density rather than the joint density alone: the conditional density must integrate to one for each relevant conditioning value.
Worked Example: A Uniform Conditional Distribution
Let \(Y\) have an exponential distribution with rate 1, and let \(U\) be uniform on \((0,1)\) and independent of \(Y\). Define \(X=YU\). For \(y>0\), the conditional distribution of \(X\) given \(Y=y\) is uniform on \((0,y)\), with density \(f_{X\mid Y}(x\mid y)=1/y\) for \(0<x<y\). Calculate its conditional mean, second raw moment, and second central moment.
The conditional density integrates to one:
Integrating \(x\) and \(x^2\) against this density gives
Now center at \(m'_1(y)=y/2\):
Both the conditional mean and the second central moment depend on \(y\). In particular, as the interval \((0,y)\) grows, the conditional mean grows in proportion to \(y\), and the second central moment grows in proportion to \(y^2\).
Raw and Central Moments
Raw moments are calculated around zero. Central moments are calculated around the conditional mean, so they describe deviations from the center of the conditional distribution. The two types are related by algebra.
Proof. Fix a conditioning value \(y\) at which the stated moments are finite. The binomial theorem gives
This is a finite sum, so conditional expectation can be applied term by term. The constant \(m'_1(y)\) is fixed once \(y\) is fixed, and \(E[X^k\mid Y=y]=m'_k(y)\). Therefore
which proves the general formula. For \(r=2\), use \(m'_0(y)=1\) and \(m'_1(y)=E[X\mid Y=y]\):
\(\square\)
Worked Example: Conditional Moments in a Normal Model
Let \(Y\) be any real-valued random variable, let \(Z\sim N(0,1)\) be independent of \(Y\), and set \(X=2Y+3Z\). Given \(Y=y\), calculate the conditional mean and second raw and central moments of \(X\).
Since \(Z\) is independent of \(Y\), its conditional distribution given \(Y=y\) is still \(N(0,1)\). Thus \(X\mid Y=y\sim N(2y,9)\). Equivalently, \(X=2y+3Z\) under this conditional law. The standard normal has \(E[Z]=0\) and \(E[Z^2]=1\), so
Expanding the square gives the second raw moment:
Centering at the conditional mean removes the \(2y\) term:
For example, at \(y=0\) the conditional mean is 0 and the second raw moment is 9; at \(y=1\) they are 2 and 13. The second central moment remains 9 at either value.
Common Mistake: Confusing Raw and Central Second Moments
A frequent error is to call \(E[X^2\mid Y=y]\) the conditional second central moment. It is the second raw moment: it measures squared values relative to zero. The second central moment measures squared deviations from the conditional mean and requires a correction:
For the normal example at \(y=1\), using the raw second moment \(13\) as the central moment would be wrong. The conditional mean is 2, so the central moment is \(13-2^2=9\). Always calculate the conditional mean first when a central moment is requested.
Check Your Understanding
For each question, distinguish carefully between the conditioning value and the variable whose moment is being calculated.
- If \(P(X=0\mid Y=y)=1/2\) and \(P(X=2\mid Y=y)=1/2\), calculate the conditional mean and second raw moment at this \(y\).
- For the conditional law in question 1, calculate the second central moment and verify it using the relation between raw and central moments.
- If \(f_{X\mid Y}(x\mid y)=2x/y^2\) for \(0<x<y\), where \(y>0\), write the integral for the conditional mean. What is the value of this conditional mean?
- In the model \(X=2Y+3Z\) with independent standard normal \(Z\), which conditional moment changes with \(y\): the second raw moment, the second central moment, or both?
- Explain why a conditional density formula based on \(f_{X,Y}(x,y)/f_Y(y)\) cannot be used at a value where \(f_Y(y)=0\).