Proof of inequality $P(X \geq \lambda) \leq \frac{\sigma^2}{\sigma^2 + \lambda^2}$ Hello I have the assumptions that $E(X) = 0$ and $\operatorname{Var}(X) = {\sigma}^{2}$ . Why does this inequality hold $P(X \geq \lambda) \leq \frac{{\sigma}^{2}}{{\sigma}^{2} + {\lambda}^{2}}$ for $ \lambda \geq 0$.
It seems like a stronger statement than the Markov inequality and I assume therefore that it must have something to do with the fact that the expectation of $X$ is 0.
 A: This inequality is called Cantelli's inequality (Probability and Measure by Patrick Billingsley, Exercise 5.5).  To prove it, note that for $x > 0$, $\{X \geq \lambda\} \subseteq \{(X + x)^2 \geq (\lambda + x)^2\}$, hence it follows by Markov's inequality that
\begin{align}
P(X \geq \lambda) \leq P((X + x)^2 \geq (\lambda + x)^2) \leq \frac{E[(X + x)^2]}{(\lambda + x)^2} = \frac{\sigma^2 + x^2}{(\lambda + x)^2}. \tag{1}
\end{align}
Observe that (i.e., "completing the squares"):
\begin{align}
\frac{\sigma^2 + x^2}{(\lambda + x)^2} = 
(\lambda^2 + \sigma^2)\left[\frac{1}{\lambda + x} - \frac{\lambda}{\lambda^2 + \sigma^2}\right]^2 + \frac{\sigma^2}{\sigma^2 + \lambda^2},
\end{align}
whence
\begin{align}
\min_{x > 0}\frac{\sigma^2 + x^2}{(\lambda + x)^2} = \frac{\sigma^2}{\sigma^2 + \lambda^2}. \tag{2}
\end{align}
Combining $(1)$ and $(2)$ gives:
\begin{align}
P(X \geq \lambda) \leq \min_{x > 0}\frac{\sigma^2 + x^2}{(\lambda + x)^2}
= \frac{\sigma^2}{\sigma^2 + \lambda^2}.
\end{align}

For a general random variable $X$ with mean $m$ and variance $\sigma^2$, the inequality becomes (simply note $X - m$ has mean $0$ and use the inequality proved for the zero mean case):
\begin{align}
P(X - m \geq \lambda) \leq \frac{\sigma^2}{\sigma^2 + \lambda^2}.
\end{align}
A: When $E[X=0]$ then the variance is
$$\sigma^2 = \int_{-\infty}^{\infty} x^2 f(x) dx$$
We can consider some parts of this integral seperately. Consider the area 1 and area 2 in the image below.

$$\sigma^2 = \int_{-\infty}^{\infty} x^2 f(x) dx \geq \underbrace{ \int_{-\infty}^0 x^2 f(x) dx}_{\text{contribution from area 2}} +  \underbrace{ \int_{\lambda}^\infty x^2 f(x) dx}_{\text{contribution from area 1}}$$
The part from area 1
$$\int_{\lambda}^\infty x^2 f(x) dx \geq \int_{\lambda}^\infty \lambda^2 f(x) dx = \lambda^2 P(X\geq \lambda)$$
The part from area 2
$$\int_{-\infty}^0 x^2 f(x) dx \geq \mu_{X < 0}^2 P(X < 0) \geq \lambda^2 \frac{P(X \geq \lambda)^2}{1-P(X \geq \lambda)}$$
Where $\mu_{X<0}$ is the mean of the part below 0.

*

*The first inequality for area 2 follows from $E[X^2] = \sigma^2 + \mu^2 \geq  \mu^2$, the relationship between the raw moment and the mean.


*The second inequality for area 2 follows from the fact that $\mu_{X<0}$ must equal the part above 0. $$\mu_{X < 0} P(X < 0) + \mu_{X > 0} P(X > 0) = E[X] = 0$$ and we can relate this to the probability mass for $X \geq \lambda$ $$-\mu_{X<0} = \frac{\mu_{X > 0} P(X > 0)}{P(X < 0)} \geq \frac{\lambda P(X\geq \lambda)}{P(X < 0)} \geq \frac{\lambda P(X\geq \lambda)}{1-P(X \geq \lambda)}$$
From the inequalities with the two parts it follows that
$$\sigma^2 \geq \lambda^2 P(X\geq \lambda) + \lambda^2 \frac{P(X \geq \lambda)^2}{1-P(X \geq \lambda)} = \frac{\lambda^2}{P(X \geq \lambda)^{-1}-1}$$
and
$$ P(X\geq \lambda) \leq \frac{\sigma^2}{\sigma^2+\lambda^2}$$
The equality occurs for a discrete distribution that concentrates a mass $P(X\geq \lambda)$ in the point $\lambda$ and a mass $1-P(X\geq \lambda)$ in the point $\mu_{X<0} = \lambda \frac{P(X\geq \lambda)}{1-P(X\geq \lambda)}$
