Can we take out this term out of the integrand?

24 Views Asked by At

Suppose we have three (say continuous) variables $X$, $Y$ and $Z$. We know that may express the conditional probability $P[x\mid y]$, as follows: \begin{equation} P[x\mid y]=\int_{\mathbb{R}} P[x,z\mid y]dz \end{equation} or \begin{equation} P[x\mid y]=\int_{\mathbb{R}} P[x\mid z,y]P[z\mid y]dz \end{equation} Additionally, using the Bayes Theorem, we know that \begin{equation} P[x\mid y]=\int_{\mathbb{R}} P[x\mid z,y]\frac{P[y\mid z]P[z]}{P[y]}dz. \end{equation} Given the last equation, can we take $P[y]$ out of the integrand? In other words, can we express the last line instead as: \begin{equation} P[x\mid y]=\frac{1}{P[y]}\int_{\mathbb{R}} P[x\mid z,y]P[y\mid z]P[z]dz? \end{equation}