Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know this is a very simple one. If this is the formula for the two dimensional Gaussian (no covariance matrix considered - I have one mean and variance for each dimension):

$$ A\exp{\left[ -\left(\displaystyle \frac{(\mu_{1} - x_{1})^2}{2\sigma_{1}^2} + \frac{(\mu_{2} - x_{2})^2}{2\sigma_{2}^2}\right) \right]}$$

Would this be the one for the three dimensional and so on?

$$ A\exp{\left[ -\left(\displaystyle \frac{(\mu_{1} - x_{1})^2}{2\sigma_{1}^2} + \frac{(\mu_{2} - x_{2})^2}{2\sigma_{2}^2} + \frac{(\mu_{3} - x_{3})^2}{2\sigma_{3}^2} + \dots \right) \right]}$$


share|cite|improve this question
I think you're missing a minus sign in the exponent. – Heike Feb 23 '12 at 12:31
Assuming that "No covariance matrix considered" means that you are interested in independent Gaussian random variables, then the formula you have is nearly right: as Heike pointed out, you are missing a minus sign in the exponent. Be aware also that $A$ depends on $N$, the dimension, as well as the values of the variances $\sigma_i^2$. – Dilip Sarwate Feb 23 '12 at 13:04
yes sorry - I missed the minus sign. edited it. – csetzkorn Feb 23 '12 at 14:08
@Dilip yes I am just interested in independent Gaussian random variables. Is A not used a factor for normalisation? I plug this into a logistic function so it does not really matter in my case. If the formula is ok otherwise - could you please write an answer so that I can accept? Thanks. – csetzkorn Feb 23 '12 at 14:11
Yes, $A$ is a factor that ensures that the density integrates to $1$. Its value happens to be $$A = \frac{1}{(2\pi)^{n/2}\sigma_1\sigma_2\cdots \sigma_n}.$$ This site allows, in fact encourages, people writing the question to post their own answers and also accept their own answers, and I suggest that you do so based on the comments from Heike and myself. – Dilip Sarwate Feb 23 '12 at 14:44
up vote 0 down vote accepted

This would indeed be correct:

$$ A\exp{\left[ -\left(\displaystyle \frac{(\mu_{1} - x_{1})^2}{2\sigma_{1}^2} + \frac{(\mu_{2} - x_{2})^2}{2\sigma_{2}^2} + \frac{(\mu_{3} - x_{3})^2}{2\sigma_{3}^2} + \dots \right) \right]}$$

Please have a look at the comments if you want to ensure that things integrate to one.

share|cite|improve this answer
....provided the covariances are all zero. – Michael Hardy Feb 23 '12 at 16:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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