1
$\begingroup$

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?

$\endgroup$
2
  • $\begingroup$ The notation $\|x_n-\mu\|$ stands for the $L_2$ norm of the vector $x_n-\mu$. If $x_n-\mu$ is a scalar (a one-dimensional vector), then $\|x_n-\mu\|$ is simply equal to $|x_n-\mu|$. $\endgroup$ Commented Nov 11, 2020 at 16:08
  • $\begingroup$ And then we should have $|x_n-\mu|^2 = (x_n-\mu)^2$. Thank you very much! $\endgroup$
    – csphil
    Commented Nov 11, 2020 at 16:29

1 Answer 1

1
$\begingroup$

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 & \cdots & 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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.