Cannot understand alternative formula for expectation of x and some constant k

151 Views Asked by At

enter image description here

I am given this additional formula for E[X] when X does not take on negative values.enter image description here

I cannot figure out why the second formula is correct. I see why this is correct when X < k (which I assume means that X takes on no value greater than k). I cannot figure out why this is true when k < X

2

There are 2 best solutions below

0
On

Integrate by parts. $\int_0^k(1-F(x))dx=x(1-F(x)]_0^k+\int_0^kxF'(x)dx=k(1-F(k))+\int_0^kxf(x)dx$

0
On

As in your previous question

$$\begin{align}\mathsf E(\min(X,k))&=\int_0^\infty (x\mathbf 1_{x<k}+k\mathbf 1_{k\leqslant x})\,f(x)\,\mathrm d x\\[1ex]&=\int_0^k x~f(x)\,\mathrm d x + \int_k^\infty k~f(x)\mathrm d x\\[1ex]&=\int_0^k x~f(x)\,\mathrm d x + k \int_k^\infty f(x)\mathrm d x\\[1ex]&=\int_0^k x~f(x)\,\mathrm d x + k (1-F(k))\end{align}$$

Then...

$$\begin{align}\mathsf E(\min(k, X))&=\int_0^k\int_0^x f(x)\,\mathrm d y\,\mathrm d x+k(1-F(k))\\[1ex]&=\int_0^k\int_y^kf(x)\,\mathrm d x\,\mathrm d y+k(1-F(k))\\[1ex]&=\int_0^k F(k)-F(y)\,\mathrm d y+k(1-F(k))\\[1ex]&=kF(k)-\int_0^k F(y)\mathrm d y+k-kF(k)\\[1ex]&=k-\int_0^k F(y)\mathrm d y\\[1ex]&=\int_0^k(1-F(y))\,\mathrm d y\end{align}$$