Good afternoon,
I am a student of statistics and I am taking a course in Bayesian Statistics but I had problems understanding how to derive one of the formulas.
There are three random variables a, z, y with z and y independent (which means P(z∩y)=P(z)*P(y)).
I have to show that: $P(a|z,y)=\frac{P(z|a)*P(a|y)}{P(z)}$ with $P(a|z,y)$ meaning "probability of a given z and y"
What I have done so far:
- with: $P(z,y|a)=\frac{P(z,y,a)}{P(a)}=\frac{P(z|y,a)*p(y,a)}{P(a)}=\frac{P(z|y,a)*p(a|y)*P(y))}{P(a)}$
then:
$P(a|z,y)=\frac{(P(z,y|a)*P(a)}{P(z,y)}$ $=\frac{\frac{P(z|y,a)*p(a|y)*P(y)}{P(a)}*P(a)}{P(z)*P(y)}$ $=\frac{P(z|y,a)*P(a|y)}{P(z)}$
I do not understand how to show that P(z|a,y) is equal to P(z|a) when z and y are independent.
Thank you for your help.
Best,
$P(Z|A,Y)=P(Z|A)$ is not in general true; e.g., in the following counterexample $$P(Z|A,Y)=1\neq\frac12=P(Z|A).$$
However, when $P(A),P(Y),P(Z)\neq0$ and $A,Y,Z$ are mutually-independent events, then the equality is true, since $$P(Z|A,Y)=P(Z|A)\\\iff \frac{P(A,Y,Z)}{P(A,Y)}=\frac{P(A,Z)}{P(A)}\\\iff \frac{P(A)P(Y)P(Z)}{P(A)P(Y)}=\frac{P(A)P(Z)}{P(A)}\\\iff 1=1.$$
P.S. I wrote this related Answer, to a Question asked around the same time.