Tutorials › Statistical Theory I - Probability and Distribution Theory › Continuous and Mixed Conditioning Problem Workshop

Conditional Distribution Theory · Tutorial 272 of 994

Continuous and Mixed Conditioning Problem Workshop

Learn to set conditional integration bounds from the joint support, condition on intervals or exact continuous values, and normalize a posterior law with both discrete and continuous parts.

Intermediate 10 min read

What You'll Learn

  • Derive conditional densities by integrating over the actual joint support.
  • Condition a continuous variable on an interval event and verify the resulting density integrates to one.
  • Find conditional densities when the support depends on the value being conditioned on.
  • Distinguish conditioning on an event from conditioning on an exact value of a continuous variable.
  • Combine an atom and a continuous density in a mixed conditional law.
  • Check posterior normalization when both parts contribute.

How to Set Up a Conditioning Calculation

For continuous variables, a conditional-density calculation is often straightforward once its integration region is right. The difficulty is that the allowed values of one variable may depend on the other. Conditioning on an interval event introduces another restriction, and a mixed law may require both a probability mass and a density. In each case, the support and the normalization must be handled together.

Let \((X,Y)\) have joint density \(f_{X,Y}(x,y)\) on a support \(S\). Its marginal density for \(Y\) is obtained by integrating across the \(x\)-values that are actually allowed:

$$ f_Y(y)=\int_{\{x:(x,y)\in S\}} f_{X,Y}(x,y)\,dx. $$

Where \(f_Y(y)>0\), a conditional density of \(X\) given \(Y=y\) is the joint density divided by this marginal. The support in the numerator remains restricted to \(S\); it is not automatically the whole real line.

Definition: If \((X,Y)\) has joint density \(f_{X,Y}\), then for \(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)}. $$ It is zero outside the permitted \(x\)-values in the joint support. As with conditional distributions generally, its value at an individual \(y\) can be specified only up to sets of \(y\)-values having probability zero.

This formula describes conditioning on an exact value through a conditional distribution, not by treating \(P(Y=y)\) as a positive probability. For an interval event, ordinary event conditioning applies: restrict the joint density to the event and divide by the event's probability.

Conditioning on an Interval Event

Suppose \(A=\{Y\in B\}\), where \(B\) is measurable and \(P(A)>0\). The density of \(X\) given \(A\) is found by integrating out \(y\) over both \(B\) and the joint support. The normalization is \(P(A)\), not a marginal density at one value.

Result: If \((X,Y)\) has joint density \(f_{X,Y}\) and \(P(Y\in B)>0\), then a conditional density of \(X\) given \(Y\in B\) is $$ f_{X\mid Y\in B}(x)= \frac{\displaystyle\int_B f_{X,Y}(x,y)\,dy} {\displaystyle P(Y\in B)}, \qquad P(Y\in B)=\int_B\int_{\mathbb R} f_{X,Y}(x,y)\,dx\,dy. $$

To verify the formula, let \(C\) be any measurable set of values for \(X\). By the definition of a joint density and integration over the event,

$$ P(X\in C,\ Y\in B) =\int_C\int_B f_{X,Y}(x,y)\,dy\,dx. $$

Divide by \(P(Y\in B)>0\), and interchange the integrals. This interchange is valid by Tonelli's theorem because the integrand is nonnegative. The result is the integral over \(C\) of the displayed conditional density, as required. Taking \(C=\mathbb R\) shows that this density integrates to one. This also proves the normalization claim, rather than assuming it.

Worked Example: Conditioning on the Upper Half of a Triangular Support

Let the joint density be \(f_{X,Y}(x,y)=2\) for \(0<x<y<1\), and zero elsewhere. Find the conditional density of \(X\) given \(Y>1/2\), and verify its normalization.

First calculate the probability of the conditioning event using the support: for each \(y\) between \(1/2\) and \(1\), \(x\) runs from \(0\) to \(y\).

$$ P(Y>1/2)=\int_{1/2}^{1}\int_0^y 2\,dx\,dy =\int_{1/2}^{1}2y\,dy =\left[y^2\right]_{1/2}^{1} =\frac34. $$

For fixed \(x\), the event and the joint support together require \(y>\max(x,1/2)\) and \(y<1\). Thus the unnormalized density contribution is \(\int_{\max(x,1/2)}^1 2\,dy\) for \(0<x<1\), and zero otherwise. Dividing by \(3/4\) gives

$$ f_{X\mid Y>1/2}(x)= \begin{cases} \frac43, & 0<x\leq \frac12,\\[4pt] \frac83(1-x), & \frac12<x<1,\\[4pt] 0, & \text{otherwise}. \end{cases} $$

The two pieces arise from different lower bounds for \(y\). If \(0<x\leq1/2\), the event imposes the tighter bound \(y>1/2\), so the numerator is \(2(1-1/2)=1\). If \(1/2<x<1\), the support imposes \(y>x\), so the numerator is \(2(1-x)\).

Check normalization by integrating both pieces:

$$ \int_0^{1/2}\frac43\,dx+ \int_{1/2}^1\frac83(1-x)\,dx =\frac23+\frac83\left[\ x-\frac{x^2}{2}\ \right]_{1/2}^{1} =\frac23+\frac13=1. $$

As a further check, \(f_Y(y)=\int_0^y2\,dx=2y\) for \(0<y<1\); restricting this marginal density to \(1/2<y<1\) and dividing by \(3/4\) gives \(f_{Y\mid Y>1/2}(y)=8y/3\), which also integrates to one on that interval.

Conditional Densities on Supports That Move

When conditioning on \(Y=y\), the permitted range of \(X\) may change with \(y\). The denominator must be the marginal density formed using that same range. The ratio then has to integrate to one across the permitted values of \(X\), for almost every \(y\) with positive marginal density.

Result: For a joint density \(f_{X,Y}\), define \(f_Y(y)=\int_{\{x:(x,y)\in S\}} f_{X,Y}(x,y)\,dx\). For almost every \(y\) with \(f_Y(y)>0\), $$ \int_{\{x:(x,y)\in S\}} \frac{f_{X,Y}(x,y)}{f_Y(y)}\,dx=1. $$ This follows by substituting the definition of \(f_Y(y)\) into the integral. The qualification “almost every” matters because a density and its conditional version need not have uniquely specified values at points of marginal probability zero.

Worked Example: A Conditional Density on a Variable Support

Let \(f_{X,Y}(x,y)=2\) on the triangle \(0<y<x<1\), and zero elsewhere. Find the conditional densities of \(X\) given \(Y=y\) and \(Y\) given \(X=x\).

For fixed \(y\), the support says \(y<x<1\). Therefore

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

For \(0<y<1\), divide the joint density by this marginal:

$$ f_{X\mid Y}(x\mid y)= \begin{cases} \dfrac{1}{1-y},&y<x<1,\\[4pt] 0,&\text{otherwise}. \end{cases} $$

Its integral over the support is \(\int_y^1(1-y)^{-1}\,dx=1\). For the other conditioning direction, fixed \(x\) permits \(0<y<x\), so

$$ f_X(x)=\int_0^x 2\,dy=2x,\qquad f_{Y\mid X}(y\mid x)= \begin{cases} \dfrac1x,&0<y<x,\\[4pt] 0,&\text{otherwise}. \end{cases} $$

Again, \(\int_0^x(1/x)\,dy=1\). The two conditional densities are different because the supports change in opposite directions: \(X\) lies above \(y\), whereas \(Y\) lies below \(x\).

Conditioning When the Law Has an Atom and a Density

A mixed law cannot be represented by one ordinary density with respect to length alone: its atom has positive probability but occupies no interval length. For a variable with an atom at zero and a continuous component on \((0,1)\), a conditional law can likewise have both a point mass and a density. Each part must be updated and normalized using the same conditioning event.

Result: Suppose \(X\) has mass \(p_0=P(X=0)\) at zero and density \(g(x)\) on \((0,1)\), with \(p_0+\int_0^1g(x)\,dx=1\). Let \(E\) be an event with \(P(E)>0\). If \(P(E\mid X=0)=q_0\) and \(P(E\mid X=x)=q(x)\) on the continuous component, then $$ P(X=0\mid E)=\frac{p_0q_0}{P(E)},\qquad f_{X\mid E}(x)=\frac{g(x)q(x)}{P(E)},\quad 0<x<1, $$ where \(P(E)=p_0q_0+\int_0^1g(x)q(x)\,dx\).

Indeed, the atom contributes \(P(X=0,E)=p_0q_0\). On the continuous component, the joint contribution over any measurable \(C\subset(0,1)\) is \(\int_C g(x)q(x)\,dx\). Adding the atom and continuous contributions gives the stated expression for \(P(E)\). Dividing each contribution by \(P(E)\) gives the conditional mass and density. Their total is

$$ \frac{p_0q_0}{P(E)} +\int_0^1\frac{g(x)q(x)}{P(E)}\,dx =\frac{p_0q_0+\int_0^1g(x)q(x)\,dx}{P(E)} =1. $$

Worked Example: A Mixed Posterior After a Binary Observation

Suppose \(P(X=0)=1/3\), and the remaining probability has density \(g(x)=2/3\) on \(0<x<1\). Given \(X=0\), a binary observation \(Y\) equals 1 with probability \(1/4\). Given \(X=x\) for \(0<x<1\), let \(P(Y=1\mid X=x)=x\). Find the conditional law of \(X\) given \(Y=1\).

First compute the probability of the observation, accounting separately for the atom and the continuous component:

$$ P(Y=1)=\frac13\cdot\frac14+ \int_0^1\frac23 x\,dx =\frac1{12}+\frac23\cdot\frac12 =\frac5{12}. $$

The conditional mass at zero is

$$ P(X=0\mid Y=1) =\frac{(1/3)(1/4)}{5/12} =\frac{1/12}{5/12} =\frac15. $$

For \(0<x<1\), the unnormalized continuous contribution is \(g(x)P(Y=1\mid X=x)=(2/3)x\). Thus the conditional density on the continuous part is

$$ f_{X\mid Y=1}(x) =\frac{(2/3)x}{5/12} =\frac85x,\qquad 0<x<1. $$

The density integrates to \(\int_0^1(8/5)x\,dx=4/5\). Together with the atom \(1/5\), the conditional law has total mass \(4/5+1/5=1\). Reporting only the density would miss one fifth of the conditional probability.

Common Mistakes and a Reliable Check

Most errors in these problems are errors of support or normalization, not integration. Before simplifying a conditional expression, write down the joint support and intersect it with the conditioning event. Then identify whether the denominator is an event probability or a marginal density.

  • Using a fixed support when the bounds move. In the triangle \(0<y<x<1\), \(X\mid Y=y\) is supported on \((y,1)\), not on \((0,1)\).
  • Dividing by the wrong denominator. Conditioning on \(Y\in B\) requires division by \(P(Y\in B)\); conditioning on \(Y=y\) uses \(f_Y(y)\), where that marginal density is positive.
  • Forgetting that an interval event cuts the support. In the first example, the lower limit for \(y\) is \(\max(x,1/2)\), so a single integration bound for every \(x\) would be wrong.
  • Normalizing only the continuous component of a mixed law. A conditional distribution must include its atom as well as its density, and their masses must sum to one.
  • Interpreting point conditioning as an event of positive probability. For a continuous variable, \(P(Y=y)=0\); the conditional-density ratio is a version of a conditional distribution, defined almost everywhere.

A practical final check is to integrate the conditional density over its permitted support and add every conditional point mass. The result must equal one. If it does not, check the joint support, the event probability or marginal denominator, and any omitted atom.

Check Your Understanding

For each problem, make the support and normalization explicit before simplifying.

  1. For a joint density on \(0<x<y<1\), what are the bounds for integrating out \(x\) when computing \(f_Y(y)\)?
  2. In the first worked example, why does the lower bound for integrating over \(y\) change at \(x=1/2\)?
  3. For a joint density on \(0<y<x<1\), state the support of \(X\mid Y=y\) and its conditional density.
  4. When conditioning on an event \(Y\in B\), why is the normalizing constant a probability rather than a marginal density value?
  5. A mixed conditional law has an atom of mass \(0.3\) and a density integrating to \(0.6\). What normalization check fails, and what should be investigated?