Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

Suppose you have a normal distribution with mean=0, and stdev=1. So the expected value is 0.

Now suppose you limit the outcomes, such that no values can be below 0. So 50% of values now equal 0, and rest of distribution is still normal. Running 1000000 trials, I come out with an expected value of .4

My question is how can I get this expected value through calculation?


share|cite|improve this question
up vote 6 down vote accepted

The normal distribution has density function $f(x)=\frac{e^{-\frac{x^2}{2}}}{\sqrt{2\pi}}$; your new distribution has that density function on the positive reals, $P(0)=\frac{1}{2}$, and $P(x)=0$ for the negative reals. The expected value is $0\cdot\frac{1}{2}+\int_{0}^{\infty}x\cdot f(x)dx=\frac{1}{\sqrt{2\pi}}\approx0.398942$.

edit: If you were to cut off at $x=c$ (assigning all the probability from below c to c itself) instead of $x=0$, your density function would be $f(x)=\frac{e^{-\frac{x^2}{2}}}{\sqrt{2\pi}}$ for $x>c$, $P(c)=\int_{-\infty}^{c}\frac{e^{-\frac{x^2}{2}}}{\sqrt{2\pi}}dx$, and $P(x)=0$ for $x<c$, so the expected value is $c\cdot P(c) + \int_{c}^{\infty}x\cdot \frac{e^{-\frac{x^2}{2}}}{\sqrt{2\pi}}dx$.

edit 2: note that the exponent on e in all of the above is $-\frac{x^2}{2}$ (the exponent 2 on the x is, in the current TeX rendering, positioned and sized such as to be somewhat ambiguous)

edit 3: my explanation incorrectly mixed probability density functions and literal probabilities--this was solely an issue of terminology and the analytic results still stand, but I have attempted to clarify the language above.

share|cite|improve this answer
How about if instead of just saying all negative values are 0, say all values below y are zero. what would the formula be for that? – CptanPanic Jul 31 '10 at 20:53
@CptanPanic: I added the case where the cutoff is somewhere other than 0 to my answer (easier to put math stuff/TeX in there than in a comment). – Isaac Jul 31 '10 at 21:04
I am trying to compute the values, and am having some problems. In the first part with c=0, I don't understand how you got 1/sqrt(2pi). Could you explain? Can you give me a start on how to calculate the integral above that starts at c to infinity? Thanks. – CptanPanic Aug 1 '10 at 13:05
$\int x\cdot\frac{e^{-\frac{x^2}{2}}}{\sqrt{2\pi}}dx=\frac{1}{\sqrt{2\pi}}\int x\cdot e^{-\frac{x^2}{2}}dx$ (let $u=-\frac{x^2}{2}$ so that $du=-xdx$) $=\frac{1}{\sqrt{2\pi}}\int-e^{u}du=-\frac{1}{\sqrt{2\pi}}e^u+C=-\frac{1}{\sqrt{‌​2\pi}}e^{-\frac{x^2}{2}}+C$ – Isaac Aug 1 '10 at 20:01

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.