2

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,

Jack
  • 23

1 Answers1

1

$z$ and $y$ independent.

I do not understand how to show that $P(z|a,y)$ is equal to $P(z|a).$

  • $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).$$

    enter image description here

  • 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.

ryang
  • 44,428
  • Thank you for your help. In my case y and z are independent just conditioned on a. I thought it was clear but now I think I should have written it explicitly. Sorry about that. – Jack Oct 10 '21 at 16:52
  • @Jack Yes you did specify that in your Question, and I did take note of that (read my first line). The counterexample that I have given is indeed as per your specification. – ryang Oct 10 '21 at 16:55