How do I compute the conditional expectation of a continuous random variable $X$ given an event $A$?

55 Views Asked by At

If $X$ is a random variable and $A$ is an event with $P(A) > 0$, then the conditional expectation of $X$ given $A$ is defined

$$E[X \mid A] = \frac{1}{P(A)} \int_{A} X\ dP.$$

However, if $X$ is continuous and has density $f$, how do I write the above in terms of an integral over $f$, so that I can actually carry out this computation? Would this be equal to

$$\frac{1}{P(A)} \int_B x f(x)\ dx$$

where $B = X(A) = \{ X(\omega) : \omega \in A\}$?

1

There are 1 best solutions below

0
On

$\int_{A} X\ dP$ cannot be written in terms of $f$ in general. You need the density of $XI_A$. If $A$ is of the form $X^{-1}(E)$ for some Borel set $E$ in $\mathbb R$ the you can write $\int_{A} X\ dP=\int_E xf(x)dx$.