# Conditional and Joint distributions with many variables

Suppose we have a probability function like:

$$p(x|y,z)$$

Does it mean it is a joint distribution with $x|y$ and $z$ or it is a conditional distribution of $x$ given $y,z$ ?

Intuitively, I think it is the second one, which is conditional distribution of $x$ on $y,z$ jointly.

What about the similar problem for the:

$$p(x,y|z)$$

?

It is the second one. In the probability notation $p(\cdot|\cdot)$, normally whatever comes after the bar $|$ is assumed to be the events that occurred. In the case of $p(x|y,z)$, it can be interpreted as 1. the probability of $x$ given $y$ and $z$ or 2. the probability of $x$ when both $y$ and $z$ occurred.

If you expand the notation using the definition, we have:

$p(x | y, z) = \frac{p(x, y, z)}{p(y, z)} = \frac{p(X = x,\, Y = y, Z = z)}{p(Y = y,\, Z = z)}$, where I have made things a little more explicit in the last equality.

For simplicity of explanation, let's assume that each of the random variables is discrete. Then you can see that, as you intuitively thought, we are conditioning on the space of events where $Y = y$ and $Z = z$. You could also draw a Venn diagram of the situation, replacing the singleton sets $y$ and $z$ with some arbitrary events, and you could compare this to the case of a conditional distribution of the form $p(x | y)$, and you would see a visual confirmation of your intuition in the similarity of the diagrams.

• Also, an aside on notation: I'm pretty sure you will never see more than one vertical 'conditioning bar.' So for instance, $p(x| y, z)$ is fine but $p(x|y, w|z)$ is not used. Commented Aug 30, 2018 at 23:01
• Thanks for your answer, but I have one question, if we use p(x|y,z)=\frac{p(x,y,z)}{p(y,z)}, doesn't directly assume that is a conditional distribution with y,z together as conditions?
– anon
Commented Aug 31, 2018 at 7:18
• Well, yes, $p(y, z)$ is the joint distribution of the two random variables $Y$ and $Z$ together. You can think of those two variables taking on particular values $y$ and $z$ as a single event $A$, but $A$ is decomposable into two separate events $A_{1}$ and $A_{2}$ that are described by the behavior of random variables $Y$ and $Z$ respectively. Note that $Y$ and $Z$ do not need to be independent either, and that you can further factor the distribution as $p(y, z) = p(y| z)p(z)$, for instance - sometimes useful when you have a joint density with many variables - 'chain rule for probability' Commented Aug 31, 2018 at 17:05