8
$\begingroup$

Given $X \sim N(0, \sigma^2)$ (that is, $X:\mathbb{R} \to \mathbb{R}$ is a normal random variable with mean $0$ and variance $\sigma^2$), I'm trying to calculate the expected value of $X$ given that $X>0$. I thought that integrating $$ \int_{0}^{\infty} x\cdot \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-\frac{x^2}{2\sigma^2}}dx $$ would do it, but the value, $\frac{\sigma}{\sqrt{2\pi}}$, seems to be off by a factor of 2 based on some other information I have; I think the answer should be $\sqrt{\frac{2}{\pi}}\sigma$.

Question: How should the expected value of $X$, given that $X>0$, be computed?

$\endgroup$
  • 7
    $\begingroup$ You computed $E(X\mathbf 1_A)$, where $A=[X\gt0]$, instead of $E(X\mid A)$. $\endgroup$ – Did Dec 3 '11 at 22:13
  • $\begingroup$ Wolfram gives the same answer as what you get. Why do you think your answer is off by factor of 2? $\endgroup$ – tards Dec 3 '11 at 22:14
  • 1
    $\begingroup$ @tards I know the computation of the integral is correct, I'm just don't think that the integral represents what I actually want, as Michael Lugo's answer confirms. $\endgroup$ – Quinn Culver Dec 3 '11 at 22:23
  • $\begingroup$ "Exact duplicate"? I think I posted the answer to this same question about two months or so ago. $\endgroup$ – Michael Hardy Dec 3 '11 at 22:38
  • 1
    $\begingroup$ @MichaelHardy I don't see how the post you liked is a duplicate. Please explain. $\endgroup$ – Quinn Culver Dec 4 '11 at 14:54
12
$\begingroup$

Let $f(x)$ be the density of $X$; let $F(x)$ be its CDF.

Then the density of $X$, conditional on it being positive, is $f(x)/P(X \ge 0)$ if $x \ge 0$, and $0$ otherwise.

Of course $P(X \ge 0) = 1/2$ by symmetry, so the density of $X$ conditional on $X \ge 0$ is $2f(x)$ (on $x \ge 0$).

So you need to do the integral $$ \int_0^\infty 2xf(x) \: dx $$ which is twice the integral you've written.

$\endgroup$
  • $\begingroup$ Also note, $E[X|H] = \frac{E[1_HX]}{P(H)}$. Hence, $E[X|X>0] = \frac{E[1_HX]}{P(X>0)}$ which will give you the desired integral to evaluate with the factor 2 in front. $\endgroup$ – Gabor Bakos Mar 23 at 16:06

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.