# Show that $P(X > \lambda) \geq \frac{(EX - \lambda)^2}{EX^2}$

Question:

Let X be a nonnegative random variable and $0 < \lambda \leq EX$. Show that

$P(X > \lambda) \geq \frac{(EX - \lambda)^2}{EX^2}$

At first glance I thought I could use some variation of Markov's Inequality.

However, I'm not entirely sure where to start.

We want to prove $EX^2 P(X > \lambda) \geq (EX - \lambda)^2$, i.e. $EX^2 E1_{X > \lambda} \geq (EX - \lambda)^2$.

Using Cauchy-Schwarz inequality, we get $EX^2 E1_{X > \lambda} \geq (EX1_{X > \lambda})^2$

Since both $EX1_{X > \lambda}$ and $EX - \lambda$ are positive, we only need to prove $EX1_{X > \lambda} \geq EX - \lambda$, i.e. $EX1_{X > \lambda} + \lambda \geq EX$. This is true since

$$EX = EX1_{X > \lambda} + EX1_{X \leq \lambda} \leq EX1_{X > \lambda} + \lambda$$

Let $P(X=\lambda)=1-p,P(X=k)=p,\text{ where } k> EX\geq\lambda$

We know:

$\lambda+p(k-\lambda)=EX$ and $\lambda^2+p(k^2-\lambda^2)=EX^2$

Thus:

$$k=\frac{EX-(1-p)\lambda}{p}\implies \lambda^2+p\left(\frac{(EX-(1-p)\lambda)^2-p^2\lambda^2}{p^2}\right)=EX^2$$

$$\lambda^2+\left(\frac{(EX)^2-2EX(1-p)\lambda+(1-p)^2\lambda^2-p^2\lambda^2}{p}\right)=EX^2$$

$$\left(\frac{(EX)^2-2EX\lambda+2EXp\lambda+\lambda^2-p\lambda^2}{p}\right)=EX^2$$

$$\left(\frac{(EX)^2-2EX\lambda+\lambda^2}{p}\right)+2EX\lambda-\lambda^2=EX^2$$

$$\frac{(EX-\lambda)^2}{p}=EX^2-2EX\lambda+\lambda^2\implies p=\frac{(EX-\lambda)^2}{E[(X-\lambda)^2]}$$

But:

$$E[(X-\lambda)^2]\leq E[X^2],\quad\forall \lambda \in (0,EX]$$

Therefore:

$$p=P(X=k)=P(X>\lambda)\geq\frac{(EX-\lambda)^2}{EX^2}$$

This proves it for the two-valued case. Can you extend it using conditional expectations?

Since $\lambda > 0$ and $X$ is nonnegative, we have $X - \lambda \leq X\,\mathbf 1_{X > \lambda}$ almost surely, hence $0 \leq \mathbb E(X - \lambda) \leq \mathbb E(X \mathbf 1_{X > \lambda})$. Using the Cauchy-Schwarz inequality we obtain therefore $$[\mathbb E(X-\lambda)]^2 \leq [\mathbb E(X \mathbf 1_{X > \lambda})]^2 \leq \mathbb E(X^2)\mathbb E(\mathbf 1_{X > \lambda}^2) = \mathbb E(X^2)\mathbb P(X > \lambda).$$