I need to calculate the expected value of a random variable $X \sim N(1,3)$. The pdf for this variable is $\phi(x) = \frac{1}{\sqrt{6\pi}} exp\Big\{ - \frac{(x-1)^2}{6} \Big\}$.

The expected value is given as, \begin{align*} \therefore E(X) = \int_{-\infty}^{\infty} \frac{x}{\sqrt{6\pi}} exp\Big\{ - \frac{(x-1)^2}{6} \Big\} dx \end{align*}

I am stuck on the on the integral here. Am I correct so far?

[edit] Corrected the $\pi$ in denominator of the exponent.

  • $\begingroup$ @DilipSarwate: there are two competing notations for the Normal $N(1,3)$. I usually assume (in papers, books, talks, &tc.) that the second parameter is the variance, not the standard deviation, in which case the integral is correct. $\endgroup$
    – Xi'an
    Jan 14 '18 at 17:39
  • $\begingroup$ @Xi'an My comment was based on the first version of the question in which the argument of the exponential in the pdf was stated as $$- \frac{(x-1)^2}{6\pi}$$ both in the first paragraph as well as in the displayed integral. The OP has since corrected his question by removing the $\pi$ in the denominator. The OP's original version is incorrect regardless of which notation is used in interpreting $N(1,3)$. More to the point, the OP seems not to understand that expected value and mean are the same and so no integration is needed to find the expected value: it is there in $N(1,3)$. $\endgroup$ Jan 14 '18 at 19:44
  • $\begingroup$ @DilipSarwate: since the new version that everyone can read does not exhibit this typo, I would suggest the removal of the comment, while I agree on the missing background of the OP on the subject. $\endgroup$
    – Xi'an
    Jan 14 '18 at 19:55
  • $\begingroup$ The question is confused: 1. If you know it is Normal, why do you need to calculate the integral to determine the expectation? 2. Alternatively, if you don't know it is Normal, then the question has nothing to do with Normality, and is actually just a question about integration. Even then, symmetry is your friend. $\endgroup$
    – wolfies
    Jan 15 '18 at 18:02

The expected value of a random variable $X\sim\cal N\left( {1,3} \right)$ is 1.

However, as noted by Dilip Sarwate in his comment, your pdf is wrong: there should be no was wrong, there was an extra $\pi$ in the denominator of the exponent.

If you were looking for the calculations for the expected value of any Gaussian variable $X\sim\cal N\left( {\mu,\sigma^2} \right)$ $$E\left[ X \right] = \frac{1}{{\sqrt {2\pi {\sigma ^2}} }}\int\limits_{ - \infty }^\infty {x{e^{ - \frac{{{{\left( {x - \mu } \right)}^2}}}{{2{\sigma ^2}}}}}dx} $$ one easy way is by substituting $z=x-\mu$, from which one obtains $$\begin{array}{} E\left[ X \right] &= \frac{1}{{\sqrt {2\pi {\sigma ^2}} }}\int\limits_{ - \infty }^\infty {\left( {z + \mu } \right){e^{ - \frac{{{z^2}}}{{2{\sigma ^2}}}}}dz} \\ &= \frac{1}{{\sqrt {2\pi {\sigma ^2}} }}\int\limits_{ - \infty }^\infty {z{e^{ - \frac{{{z^2}}}{{2{\sigma ^2}}}}}dz + \mu \left[ {\frac{1}{{\sqrt {2\pi {\sigma ^2}} }}\int\limits_{ - \infty }^\infty {{e^{ - \frac{{{z^2}}}{{2{\sigma ^2}}}}}dz} } \right]} \end{array}$$ The first integral evaluate to 0 because the integrand is an odd function and the integration can be split in two simmetric halves (with respect to the y axis), which are both convergent (i.e. the limits $\mathop {\lim }\limits_{a \to \infty } \int_0^a {f\left( x \right)dx} $ and $\mathop {\lim }\limits_{a \to -\infty } \int_a^0 {f\left( x \right)dx} $ that define them exist). The second integral (within square brackets) evaluates to 1 (it is a Gaussian pdf), so you are left with $$E\left[ X \right] = \mu$$

  • $\begingroup$ Also 6 is not equal to 3$^2$. It actually should be 9. Also 2$\sigma^2$ = 18. $\endgroup$ Jan 14 '18 at 17:30
  • 2
    $\begingroup$ Unless one assumes $\sigma^2=3$. $\endgroup$
    – matteo
    Jan 14 '18 at 17:35
  • 1
    $\begingroup$ I thought $X \sim \mathcal{N} (1,3)$ meant mean ($\mu$) = 1 and variance ($\sigma^2$) = 3. Am I wrong? $\endgroup$ Jan 14 '18 at 17:42
  • $\begingroup$ Okay that is the more common notation. $\endgroup$ Jan 14 '18 at 18:18
  • $\begingroup$ While the first integral does indeed evaluate to $0$ as you say it does, the "because" part is an incomplete reason. Consider the integral $$\int_{-\infty}^\infty x \frac{1}{\pi(1+x^2)}\, \mathrm dx$$ which is a calculation that arises in an attempt to compute the mean of a Cauchy random variable. The integrand is odd, but the value of the integral is undefined. $\endgroup$ Jan 14 '18 at 19:54

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.