Notation within gaussian function On our lecture slides we have two different notations of the gaussian function.
First it gets introduced as follows:
$$p(x_n|\theta) = \frac{1}{\sqrt{2\pi}\sigma}exp\{-\frac{(x_n-\mu)^2}{2\sigma^2}\} \text{ with } \theta=(\mu,\sigma)$$
But later it is used like this:
$$\frac{1}{\sqrt{2\pi}\sigma}exp\{-\frac{||x_n-\mu||^2}{2\sigma^2}\}$$
What is the difference between $$(x_n-\mu)^2$$ and $$||x_n-\mu||^2$$ or are they equal?
The notation $\|x_n - \mu\|^2$ stands for the squared $L_2$ norm of the vector $x_n - \mu$.
The squared $L_2$ norm of the $d$-dimensional vector $v = \begin{pmatrix} v_1 &amp; \cdots &amp; v_d \end{pmatrix}$ is $$\|v\|^2 = v_1^2 + \cdots + v_d^2. $$
In particular, when $d = 1$, we have $\|v\|^2 = v_1^2$.
The formula you state works for the Gaussian multivariate distribution, when the various variables are independent and have the same variance $\sigma^2$. The formula in the general case is a bit more complicated.