I have a very simple question regarding normal distribution, which nonetheless bugs me a bit. In my reference book related to Bayesian data analysis the author seems to use the following results of the book:

$$\int_{-\infty}^{\infty} x \,g(x)\,dx = c\mu\sqrt{2\pi\sigma^2}\;\;\;\;\;\;(1)$$ $$\int_{-\infty}^{\infty} (x-\mu)^2 \,g(x)\,dx = c\sigma^2\sqrt{2\pi\sigma^2}\;\;\;\;\;\;(2)$$

$$\int_{-\infty}^{\infty} \,g(x)\,dx = c\sqrt{2\pi\sigma^2}\;\;\;\;\;\;(3)$$

where $c, \mu, \sigma^2$ are constant values to write $g(x)$ as the Gaussian distribution:


I'm not fully certain how the author got from $(1)$, $(2)$ and $(3)$ to $p(x)$, but I am guessing proportionality plays a part here? Do you think the author defines (without explicitly stating it) that:

$$p(x) = \frac{g(x)}{c\sqrt{2\pi\sigma^2}}?$$

To answer user @Stockfish the function $g(x)$ is actually defined as:

$$g(x) = \int\exp\left(-\frac{\beta}{2}\{x-\mu-\textbf{g}^T\textbf{v}\}^2-\frac12\textbf{v}^T\textbf{A}\textbf{v}\right)\,d\textbf{v},$$

where $\beta$ is a constant, $\textbf{g}, \textbf{v}\in R^W$ and $\textbf{A}$ is a symmetric $W\times W$ real matrix.


This post is actually a follow up question to my previous post (if it helps):

How to evaluate the integral $\int\mathbf{g}^T\mathbf{v} \exp{(-\frac{1}{2}\mathbf{v}^T \mathbf{A}\mathbf{v})}\,d\mathbf{v}$

  • $\begingroup$ Do you mean $g(x) = e^{-(x-\mu)^2}$? $\endgroup$ – Stockfish Oct 24 '18 at 13:03
  • $\begingroup$ @LeeDavidChungLin thank you for that, sorry, my mistake. $\endgroup$ – jjepsuomi Oct 24 '18 at 13:03
  • $\begingroup$ @Stockfish I edited to post. Sorry for any confusion in my question, I'm a bit confused myself also because the author drops out many constants so I have to guess what he is doing in the derivation. $\endgroup$ – jjepsuomi Oct 24 '18 at 13:11
  • $\begingroup$ Urgh :D but if $p(x) = g(x)/...$ we had $\int x g(x) dx = 0$, so that cannot be. $\endgroup$ – Stockfish Oct 24 '18 at 13:18
  • $\begingroup$ @Stockfish thank you for your help :) Now I'm even more confused xD $\endgroup$ – jjepsuomi Oct 24 '18 at 13:22

Do you think the author defines (without explicitly stating it) that: $$p(x) = \frac{g(x)}{c\sqrt{2\pi\sigma^2}}$$

Yes, you are right, as you can see from the first three integrals, $$\int_{-\infty}^{\infty} x \,g(x)\,dx = k E(X)$$ $$\int_{-\infty}^{\infty} (x-\mu)^2 \,g(x)\,dx = k \text{var}(X) $$ $$\int_{-\infty}^{\infty} \,g(x)\,dx = k(1)$$ where $k = c\sqrt{2\pi\sigma^2}$. That being said, it is now easy to see why $g(x) = k p(x)$, where $p(x)$ is the PDF of $\mathcal{N}(\mu,\sigma^2)$

  • 1
    $\begingroup$ Excellent! Thank you very much =) $\endgroup$ – jjepsuomi Oct 24 '18 at 14:07

I think I got it myself also, it seems to be as I suspected. If you evaluate the integral I gave above ($g(x)$ that is), you will get:

$$g(x) = (2\pi)^{W/2}|(\textbf{A}+\beta\textbf{g}\textbf{g}^T)|^{-1/2} \exp\left(-\frac{1}{2\sigma^2} (x-\mu)^2 \right),$$

where $\sigma^2 = \frac{1}{\beta-\beta^2\textbf{g}^T(\textbf{A}+\beta\textbf{g}\textbf{g}^T)^{-1}\textbf{g}}=\frac1\beta+\textbf{g}^T\textbf{A}^{-1}\textbf{g}$ and $c=(2\pi)^{W/2}|(\textbf{A}+\beta\textbf{g}\textbf{g}^T)|^{-1/2}.$

So we have $p(x)$ as:

$$p(x) = \frac{g(x)}{c\sqrt{2\pi\sigma^2}}=\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right).$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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