4

Is there a difference between:

$$p(y|x,z) = \frac{p(y,x|z)}{p(x|z)}$$ and $$p(y|x,z) = \frac{p(y,x,z)}{p(x,z)}$$

I was working on a problem that asks one to prove $p(x, y|z) = p(x|z)p(y|x, z)$ and the second one just came to my mind.

John
  • 41
  • 1
    Both are correct. Use which ever you find the most useful. – Graham Kemp Aug 16 '16 at 00:53
  • Correct as in they would give the same value? Also, can you elaborate/provide a reference related to choosing whichever is the "most useful"? I've noticed that many probabilities can be written in multiple ways. – John Aug 16 '16 at 00:55
  • Notice that the first is what you are trying to prove; so you should not use it to prove itself. – Graham Kemp Aug 16 '16 at 01:11

1 Answers1

1

They are both correct; use whichever you find the most useful. $$\begin{align}\mathsf p(y\mid x, z) ~=~&\dfrac{\mathsf p(x, y\mid z)}{\mathsf p(x\mid z)} \tag 1\\[1ex]~=~&\dfrac{\mathsf p(x,y,z)}{\mathsf p(x, z)}\tag 2\end{align}$$

In this case that is (2), which follows directly from the definition of conditional probability, while (1) is what you are trying to prove (and we should aim to avoid circular proofs).

  So $$\begin{align}\mathsf p(x,y\mid z) ~=~& \frac{\mathsf p(x,y,z)}{\mathsf p(z)} &\text{definition: conditional probability}\\[1ex]=~& \frac{\mathsf p(x,z)~\mathsf p(y\mid x, z)}{\mathsf p(z)} &\text{definition: conditional probability} \\[1ex] \vdots~& \end{align}$$

Graham Kemp
  • 129,094