Where does the conditional go when using the chain rule on a conditional probability? Also a question on notation So I'm in taking a course on machine learning my professor puts this to explain what the independence assumption entails (with regards to why naive bayes classifiers are naive):
$$ p(x_1...x_n|y) = \prod^n_{i=1}p(x_i|x_1...x_{i-1},y) = \prod^n_{i=1}p(x_i|y) $$


*

*To get the easy question out first, is $p(x_1...x_n|y)$ the same as $ p(x_1, ..., x_n|y) $?


In other words is this saying the joint probability of all the $x_n$s given $y$? (the commas have just been omitted as an aesthetic choice).


*My second question is about the middle equation - how do we know to put the $y$ here: $(x_i|x_1...x_{i-1},y)$. I haven't seen any definitions of the chain rule that have a conditional in the starting point like $ p(a_1,...,a_n|b) $ so I'm not sure what leads to this.


There's a video of the bit of the lecture this is from here.
Thanks!
 A: In this context $p(x_1\ldots x_n\mid y)$ is the same as $p(x_1,\ldots,x_n\mid y)$. I would say that in the former notation the comma (,) is reserved to distinguish the random variables $x_i$ (what is called the attributes in the video lecture) from the random variable $y$ (the class) when you are conditioning over both $x_i$ and $y$. This becomes more apparent in the following discussion.
Any probability argument that you usually apply over non-conditional models can be also applied over conditional ones. Take a look for example to the total probability theorem. 
Let's forget for a moment of $y$. You would have that the multiplication rule is
\begin{align}
p(x_1\ldots x_n) &= p(x_1)p(x_2\mid x_1)p(x_3\mid x_1x_2)\cdots p(x_n\mid x_1\ldots x_{n-1})\\
&=\prod_{i=1}^n p(x_i\mid x_1\ldots x_{i-1})
\end{align}
Now, it is perfectly OK to condition over $y$ this last expression, to get
$$p(x_1\ldots x_n\mid y) =\prod_{i=1}^n p(x_i\mid x_1\ldots x_{i-1},y)$$
To better understand this, let's see the case when $n=3$. We would have, without conditioning over $y$,
$$p(x_1x_2x_3) = p(x_1)p(x_2\mid x_1)p(x_3\mid x_1x_2),$$
and conditioning over $y$,
$$p(x_1x_2x_3\mid y) = p(x_1\mid y)p(x_2\mid x_1, y)p(x_3\mid x_1x_2, y)$$
EDIT:
As the OP commented, in the second and third factors we are still conditioning over $x_1$ and $x_1x_2$, respectively, but now we are conditioning also alongside $y$, the new "universe" of our model or common conditioning random variable.
As promised, we also see here more clearly why the change of notation and what is the role of the comma.
A: *

*Ask your professor, but I think you are right, and if so, the former notation is ambiguous.

*(Assuming we are right in #1) This is not the chain rule in calculus/analysis but rather the chain rule in probability:
For events $A_1, ..., A_n$,
 = $P(A_n | A_1, ..., A_{n-1}) P(A_{n-1} | A_1, ..., A_{n-2})P(A_2 | A_1)P(A_1)$
For random variables $X_1, ..., X_n$,
$p(X_1, ..., X_n) = p(X_{n} | X_1, ..., X_{n-1}) p(X_{n-1} | X_1, ..., X_{n-2})\cdots p(X_{2} | X_1) p(X_1)$
Similarly,
$p(X_1, ..., X_n | Y) = p(X_{n} | X_1, ..., X_{n-1}, Y) p(X_{n-1} | X_1, ..., X_{n-2}, Y)\cdots p(X_{2} | X_1, Y) p(X_1 | Y)$
