What is the expected value of max(x-y,0)?

1.5k Views Asked by At

For a normally distributed $X$ (with mean zero and variance $\sigma^2$) and a constant $Y$, I need to know

$\mathbb{E}(\max(X-Y,0))$

I think that this should be $\mathbb{P}(X<Y)\times 0 + \mathbb{P}(X>Y)\times \mathbb{E}(X-Y|X>Y))$

I know $\mathbb{P}(X>Y)$ is $\Phi(-Y)=1-\Phi(Y)$ for a normal cdf $\Phi(\cdot)$

I'm guessing that $\mathbb{E}(X-Y|X>Y))=\mathbb{E}(X|X>Y))-Y$

I don't know what $\mathbb{E}(X|X>Y))$ is.

Presumably it is something like $(\int_y^\infty x \Phi(x) dx)/(1-\Phi(Y))$.

But is there a nice answer, like, something that can be typed into R?

(This is not homework!)

2

There are 2 best solutions below

0
On

$$E((X-x)^+)=\sigma\int_{x/\sigma}^\infty(t-x)\,\varphi(t)\,\mathrm dt=\sigma\cdot\varphi(x/\sigma)-x\cdot(1-\Phi(x/\sigma))$$

0
On

For a fixed $y$ and a continuous random variable $X$, $${\rm E}[X \mid X > y] = \frac{1}{1-F_X(y)} \int_{x=y}^\infty x f_X(x) \, dx,$$ where $f_X(x)$ is the density of $X$ and $F_X(x)$ is the cumulative distribution function of $X$.