# Cauchy-Schwarz Inequality (Probability) and the Fundamental Bridge

In a section on the Cauchy-Schwarz inequality (a marginal bound on a joint expectation), my textbook, Introduction to Probability, Second Edition, by Blitzstein and Hwang, presents the following example:

Example 10.1.3 (Second moment method). Let $$X$$ be a nonnegative r.v., and suppose that we want an upper bound on $$P(X = 0)$$. For example, $$X$$ could be the number of questions that Fred gets wrong on an exam (then $$P(X = 0)$$ is the probability of Fred getting perfect score), or $$X$$ could be the number of pairs of people at a party with the same birthday (then $$P(X = 0)$$ is the probability of no birthday matches). Note that

$$X = XI(X > 0),$$

where $$I(X > 0)$$ is the indicator of $$X > 0$$. This is true since if $$X = 0$$, then both sides are $$0$$, while if $$X > 0$$ then both sides are $$X$$. By Cauchy-Schwarz,

$$E(X) = E(XI(X > 0)) \le \sqrt{E(X^2) E(I(X > 0))}.$$

Rearranging this and using the fundamental bridge, we have

$$P(X > 0) \ge \dfrac{(EX)^2}{E(X^2)},$$

or equivalently,

$$P(X = 0) \le \dfrac{Var(X)}{E(X^2)}.$$

The fundamental bridge (between probability and expectation) is the fact that there is a one-to-one correspondence between events and indicator r.v.s, and the probability of an event $$A$$ is the expected value of its indicator r.v. $$I_A$$:

$$P(A) = E(I_A).$$

Given this, we can get the first result as follows:

\begin{align} &E(X) \le \sqrt{E(X^2)E(I(X > 0))} \\ &\Rightarrow E(X)^2 \le E(X^2)E(I(X > 0)) = E(X^2)P(X > 0) \\ &\Rightarrow \dfrac{E(X)^2}{E(X^2)} \le P(X > 0) \end{align}

But how does one derive the second result? In particular, I'm confused as to where the $$Var(X)$$ came from? I would greatly appreciate it if people would please take the time to clarify this.

$$P(X=0)=1-P(X>0) \leq 1-\frac {(EX)^{2}} {EX^{2}}=\frac {EX^{2}-(EX)^{2}} {EX^{2}} =\frac {var (X)} {EX^{2}}$$.
• Oh, I see: We have on the left-hand side that $$E(XI(X > 0)) = P(X > 0) = 1 - P(X = 0) \Rightarrow 1 - P(X > 0) = P(X = 0).$$ Dec 30 '19 at 23:59
• Yes,but you wrote $EXI(X>0)$ instead of $EI(X>0)$. Dec 31 '19 at 0:00
• Hmm? But it is $E(XI(X > 0))$? Dec 31 '19 at 0:02
• And for the right-hand side, we have that $$E(X^2) E(I(X > 0)) = E(X^2) P(X > 0) = E(X^2) [1 - P(X = 0)],$$ by the same reasoning as for the LHS. Dec 31 '19 at 0:07
• If $X$ takes the values $1$ and $2$ with probability $\frac 1 2$ each then $EXI(X>0)=(1)(\frac 1 2)+(2)(\frac 1 2)=1.5$ but $P(X>0)=1$. Dec 31 '19 at 0:09