I am very confused about the probability formula $E[\min(X,k)]=\int_0^kxf(x)dx+k(1-F(k))$

437 Views Asked by At

enter image description here

I understand the proof of this first formula. enter image description here

I am confused about where he got the first E[min(X, k)] formula. It seems to have just come out of nowhere. And also, can someone explain why the two formulas are correct please?

2

There are 2 best solutions below

2
On BEST ANSWER

$$\begin{align}\mathsf E(\min(X,k))&=\int_0^\infty \min(x,k)\,f(x)\,\mathrm d x\\[1ex]&=\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}$$

0
On

Alternative proof:

$$\int_{0}^{\infty}[1-F_X(x)]dx$$

(by parts)

$$\int_{0}^{\infty}[1-F_X(x)]dx=[1-F_X(x)]x\Bigg|_{0}^{\infty}-\int_{0}^{\infty}-xf_X(x)dx=\int_{0}^{\infty}xf_X(x)dx=\mathbb{E}[X]$$

as the first addend is 0.

In fact:

$$x[1-F_X(x)]\Bigg|_{0}^{\infty}=0\cdot\infty$$

but

$$lim_{x \rightarrow +\infty}x[1-F_X(x)]=lim \frac{x}{\frac{1}{1-F}}\xrightarrow{H} lim\frac{1}{\frac{f}{(1-F)^2}}=lim\frac{(1-F_X(x))^2}{f_X(x)}=0$$

With similar arguments you can prove that, for a continuous rv, with $x \in \mathbb{R}$, you get

$$\mathbb{E}[X]=\int_{0}^{\infty}[1-F_X(x)]dx-\int_{-\infty}^{0}F_X(x)dx$$