# Conditional Expectation of a normal random variable.

I have been asked to derive the expression for $$E[X\mid X>a]$$ where $$X$$ is a normal random variable with mean $$\mu$$ and variance $$\sigma^2$$ and $$a$$ is some constant belonging to $$R$$. It is my understanding that I need to integrate the product of $$X$$ and pdf of normal from $$a. But I am unable to figure out this integral. Can anyone help with that? If possible, kindly also guide how we can solve it using the MGF of normal random variable.

The conditional distribution $$f(x|x>a)$$ is given by

$$f_{X|X>a}(x)=\frac{1}{1-F_X(a)}f_X(x)\mathbb{1}_{(a;\infty)}(x)$$

The integral involved to calculate the expectation can be easy solved as it is in the form

$$\int x e^{-\frac{x^2}{2}}dx$$

and as you note, $$x$$ is something like the exponent derivative...

Example:

$$X\sim N(1;1)$$

Calculate $$\mathbb{E}(X|X>1)$$

$$\mathbb{E}(X|X>1)=\frac{1}{1-F(1)}\int_1^{\infty}\frac{1}{\sqrt{2\pi}}x e^{-\frac{(x-1)^2}{2}}dx=$$

Set $$x-1=y$$

$$2\Bigg[\int_0^{\infty}\frac{1}{\sqrt{2\pi}}ye^{-\frac{y^2}{2}}dy+\underbrace{\int_0^{\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{y^2}{2}}dy}_{=\frac{1}{2}}\Bigg]$$

$$=2\Bigg\{-\frac{1}{\sqrt{2\pi}}\Bigg[e^{-\frac{y^2}{2}}\Bigg]_0^{\infty}+\frac{1}{2}\Bigg\}=\frac{2}{\sqrt{2\pi}}+1\approx1.797885$$

General example

$$X\sim N(\mu;\sigma^2)$$; Calculate $$\mathbb{E}(X|X>a)$$

$$\mathbb{E}(X|X>a)=\frac{1}{1-\Phi\Big(\frac{a-\mu}{\sigma}\Big)}\int_a^{\infty}\frac{1}{\sigma\sqrt{2\pi}}x e^{-\frac{1}{2}\Big(\frac{x-\mu}{\sigma}\Big)^2}$$

Set $$\frac{x-\mu}{\sigma}=y$$

$$\frac{1}{1-\Phi\Big(\frac{a-\mu}{\sigma}\Big)}\int_{\frac{a-\mu}{\sigma}}^{\infty}\frac{1}{\sqrt{2\pi}}(\sigma y+\mu) e^{-\frac{1}{2}y^2}dy$$

$$\frac{1}{1-\Phi\Big(\frac{a-\mu}{\sigma}\Big)}\Bigg\{\int_{\frac{a-\mu}{\sigma}}^{\infty}\frac{\sigma y}{\sqrt{2\pi}} e^{-\frac{1}{2}y^2}dy+\mu\int_{\frac{a-\mu}{\sigma}}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}y^2}dy\Bigg\}$$

$$\frac{1}{1-\Phi\Big(\frac{a-\mu}{\sigma}\Big)}\Bigg\{\frac{\sigma}{\sqrt{2\pi}}\Big[ -e^{-\frac{1}{2}y^2}\Big]_{\frac{a-\mu}{\sigma}}^{\infty}+\mu\Big[1-\Phi\Big(\frac{a-\mu}{\sigma}\Big] \Bigg\}$$

$$\bbox[5px,border:2px solid red] { \mathbb{E}(X|X>a)=\frac{1}{1-\Phi\Big(\frac{a-\mu}{\sigma}\Big)}\Bigg\{\frac{\sigma}{\sqrt{2\pi}}e^{-\frac{1}{2}\Big(\frac{a-\mu}{\sigma}\Big)^2}+\mu\Big[1-\Phi\Big(\frac{a-\mu}{\sigma}\Big] \Bigg\} \ }$$

• X is a normal random variable, it is not standard normal. So, can you share how can we solve the integral? According to my research we cannot take integral of normal random pdf we have to compute it numerically for some given constant a, where we are trying to find P(X>a). So am i correct? We cannot compute it numerically? Oct 18, 2020 at 21:42
• @shaheryarrafi : yes I know....you have just to do some simple manipulations... Oct 18, 2020 at 21:51
• Can you share or give a hint, what those manipulations are? Oct 18, 2020 at 21:53
• @shaheryarrafi :added a simple example. If $\sigma \ne 1$ the variable's change is $y=\frac{x-\mu}{\sigma}$ Oct 18, 2020 at 22:05
• thank you for sharing the example. However, if possible can you share your working for mean (mu) and variance (sigma^2) and for some constant a. By fixing the values such as you did, it makes algebra very nice and easier to manipulate. So, would really appreciate if you could share your working for the general case, rather than building convenient examples. Thank you so much! Oct 18, 2020 at 23:00