0

i want to derive the following expected value formular for $p(x)= N(\mu,\sigma^2)$ (see https://en.wikipedia.org/wiki/Truncated_normal_distribution):

$$E[X|a<X<b]=\mu+\sigma\frac{\phi(\alpha)-\phi(\beta)}{\Phi(\alpha)-\Phi(\beta)}$$

with $\phi(y):=\frac{1}{\sqrt{2\pi}}e^{-\frac{y^2}{2}}, \Phi(y):=\frac{1+erf(y/\sqrt(2))}{2}$ and $\alpha:=\frac{a-\mu}{\sigma}, \beta:=\frac{b-\mu}{\sigma}$ .

here's what i got so far: $$E:=\int_a^b xp(x)dx=\int_a^b (x-\mu)p(x)dx+\int_a^b \mu p(x)dx$$

the last integral simplifies to: $$\int_a^b \mu p(x)dx=\mu(\bar\Phi(b)-\bar\Phi(a))$$ with $$\bar\Phi(y):=\frac{1+erf((x-\mu)/\sqrt{2\sigma^2})}{2}$$

for the middle integral i got: $$\int_a^b(x-\mu)\frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx=\frac{\sigma}{\sqrt{2\pi}}\int_{(a-\mu)/\sigma}^{(b-\mu)/\sigma}ze^{-\frac{z^2}{2}}dz=\sigma(-\phi(\beta)+\phi(\alpha))$$

resulting in: $$E=\sigma(-\phi(\beta)+\phi(\alpha))+\mu(\bar\Phi(b)-\bar\Phi(a))$$.

not quite what i was looking for, somebody sees where i did a mistake?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Looper
  • 117
  • 1
  • 8
  • Doing it for a standard normally distribution variable with unit variance makes it easier. It is easier to do it for only one-sided truncation. The other one will follow easily. A key step is stating that the derivative of $\phi(x)$ is equal to $-x\phi(x)$. – KenHBS Jul 25 '17 at 13:45
  • 2
    You forgot to divide everything by $\Phi(b)-\Phi(a)$: all your calculations are using the Normal density rather than the truncated Normal density. – whuber Jul 25 '17 at 13:58
  • why do i have to divide by $\Phi(\beta)-\Phi(\alpha)$ ? – Looper Jul 25 '17 at 14:27
  • 1
    Otherwise your density does not integrate to one. – Matthew Drury Jul 25 '17 at 15:25

0 Answers0