Skip to content

Conditional Density Given an Event

Definition

Let YY be a continuous random variable and AA an event with P(A)>0\mathbb{P}(A)>0. The conditional CDF of YY given AA is

FY∣A(y)=P(Y≤y∣A).\begin{aligned} F_{Y\mid A}(y)=\mathbb{P}(Y\leq y\mid A). \end{aligned}

Where the derivative exists, the conditional density of YY given AA is

fY∣A(y)=ddyFY∣A(y).\begin{aligned} f_{Y\mid A}(y)=\frac{\mathrm{d}}{\mathrm{d}y}F_{Y\mid A}(y). \end{aligned}

Equivalently, by Bayes' rule,

fY∣A(y)=P(A∣Y=y)fY(y)P(A).\begin{aligned} f_{Y\mid A}(y)=\frac{\mathbb{P}(A\mid Y=y)f_Y(y)}{\mathbb{P}(A)}. \end{aligned}

Here P(A∣Y=y)\mathbb{P}(A\mid Y=y) is the conditional probability given the value yy, determined except possibly on a set of values yy of probability zero, where it may be chosen arbitrarily; it is not an elementary ratio, whose denominator P(Y=y)\mathbb{P}(Y=y) would be zero.


Interpretation

Conditioning on an event AA reweights the original density of YY by how compatible each value yy is with AA, and then divides by P(A)\mathbb{P}(A) so that the total area is again 11.

An exponential density with the region y greater than 1 shaded, and the conditional density given that event: the same curve restricted to y greater than 1 and scaled up by 1 over P(A).

In the illustrated example, Y∼Exp⁡(2)Y\sim\operatorname{Exp}(2) and A={Y>1}A=\{Y>1\}, with P(A)=e−2≈0.14\mathbb{P}(A)=\mathrm{e}^{-2}\approx0.14. Keep the shaded part of the density on AA and divide by P(A)\mathbb{P}(A): fY∣A(y)=2e−2y/e−2=2e−2(y−1)f_{Y\mid A}(y)=2\mathrm{e}^{-2y}/\mathrm{e}^{-2}=2\mathrm{e}^{-2(y-1)} for y>1y>1 and 00 elsewhere. The red curve is the original density shifted one unit to the right, the memoryless property.

Move cc: on A={Y>c}A=\{Y>c\} the density is divided by P(A)\mathbb{P}(A), and outside AA it is 00. For Exp⁡(2)\operatorname{Exp}(2) the result is the same density shifted to start at cc.

The Bayes form of the definition covers two kinds of event. If A={Y∈B}A=\{Y\in B\} is decided by YY itself, then P(A∣Y=y)\mathbb{P}(A\mid Y=y) is 11 on BB and 00 outside it, and conditioning simply cuts the density to BB and rescales it. If AA also depends on other randomness, P(A∣Y=y)\mathbb{P}(A\mid Y=y) lies between 00 and 11 and the density is reweighted smoothly. For example, let Y∼Unif⁡(0,1)Y\sim\operatorname{Unif}(0,1) and let AA be the event that a coin with success probability YY shows heads; then P(A∣Y=y)=y\mathbb{P}(A\mid Y=y)=y, P(A)=1/2\mathbb{P}(A)=1/2 and fY∣A(y)=2yf_{Y\mid A}(y)=2y on (0,1)(0,1).

With this density, the conditional expectation given an event from Probability Theory is E[Y∣A]=∫y fY∣A(y) dy\mathbb{E}[Y\mid A]=\int y\,f_{Y\mid A}(y)\,\mathrm{d}y; in the figure it equals 1+1/2=3/21+1/2=3/2. Conditioning on the value of another variable, which has probability zero, needs the conditional PDF instead.

Cutting without rescaling is a common slip: the cut density 2e−2y2\mathrm{e}^{-2y} on y>1y>1 integrates to e−2\mathrm{e}^{-2}, not 11.


Key Results

  • If A={Y∈B}A=\{Y\in B\}, then fY∣A(y)=𝟙1B(y)fY(y)/P(Y∈B)f_{Y\mid A}(y)=\indicator_{B}(y)f_Y(y)/\mathbb{P}(Y\in B) except possibly on a set of zero length.
  • The conditional density fY∣Af_{Y\mid A} integrates to one whenever P(A)>0\mathbb{P}(A)>0.

Examples

  • For Y∼Unif⁡(0,1)Y\sim\operatorname{Unif}(0,1) and A={Y>1/2}A=\{Y>1/2\}, the conditional density is 22 on (1/2,1)(1/2,1).
  • For Y∼Exp⁡(2)Y\sim\operatorname{Exp}(2) and A={Y>1}A=\{Y>1\}, the conditional density is 2e−2(y−1)2\mathrm{e}^{-2(y-1)} for y>1y>1.

Prerequisites

Sources

Symbols: element of, integral

Last updated: 20 October 2026 03:02