How to find a conditional expectation with a prior

57 Views Asked by At

I want to find the conditional expectation of x:

$$\mathbb{E}[x|y,z]$$

I can rewrite the equation above as

$$\int x \cdot p(x|y,z) dx$$

However, $z$ is also a random variable and has a distribution

$$ p(z|y)$$

How do I integrate the distribution of $z$ into the integral to get the conditional expectation? Is it simply

$$\int x \cdot p(x|y,z) \cdot p(z|y)\ dx$$

1

There are 1 best solutions below

2
On

Cringeworthy notation aside, clearly: $p(x\mid y,z) \neq p(x\mid y,z)p(z\mid y) = p(x,z\mid y)$.

More respectably, if $X,Y,Z$ are your continuous random variables, and the support for $X$ is $X(\Omega)$, then we might write: $$\begin{align}\mathsf E(X\mid Y=y, Z=z) &=\int_{X(\Omega)} x\cdot p_{X\mid Y,Z}(x\mid y,z)\mathsf d x \\ & = \int_{X(\Omega)} \frac{x\cdot p_{X,Z\mid Y}(x,z\mid y)}{p_{Z\mid Y}(z\mid y)}\mathsf d x\end{align}$$