Proof of the Cauchy-Schwarz Inequality for Probability

Published July 31, 2025, 12:47 a.m. by james

The Cauchy-Schwarz inequality for expectations states that for any two random variables $X$ and $Y$:

$$(\text{E}[XY])^2 \le \text{E}[X^2]\text{E}[Y^2]$$

The proof relies on the fact that the expectation of a non-negative variable must itself be non-negative.

Step 1: Define a Non-Negative Function

Let $t$ be any real number. We define a function $g(t)$ as the expectation of a squared term, which is always non-negative.

$$g(t) = \text{E}[(tX - Y)^2]$$

Since $(tX - Y)^2 \ge 0$, it follows that its expectation must also be non-negative. Therefore, $g(t) \ge 0$ for all values of $t$.

Step 2: Expand the Function into a Quadratic Form

We expand the term inside the expectation:

$$g(t) = \text{E}[t^2X^2 - 2tXY + Y^2]$$

Using the linearity of expectation, we can write this as:

$$g(t) = t^2\text{E}[X^2] - 2t\text{E}[XY] + \text{E}[Y^2]$$

Step 3: Use the Discriminant of the Quadratic

The function $g(t)$ is a quadratic in the variable $t$ of the form $At^2 + Bt + C$, where:

$A = \text{E}[X^2]$
$B = -2\text{E}[XY]$
$C = \text{E}[Y^2]$

Since we established that $g(t) \ge 0$, this quadratic function can have at most one real root. This means its discriminant, $\Delta = B^2 - 4AC$, must be less than or equal to zero.

$$\Delta \le 0$$

Step 4: Solve the Inequality

Substitute the expressions for A, B, and C into the discriminant inequality:

$$(-2\text{E}[XY])^2 - 4(\text{E}[X^2])(\text{E}[Y^2]) \le 0$$

$$4(\text{E}[XY])^2 - 4\text{E}[X^2]\text{E}[Y^2] \le 0$$

Dividing by 4 and rearranging gives the desired inequality:

$$(\text{E}[XY])^2 \le \text{E}[X^2]\text{E}[Y^2]$$

Conclusion

Taking the square root of both sides gives the more common form of the inequality:

\[ \boxed{|\text{E}[XY]| \le \sqrt{\text{E}[X^2]} \cdot \sqrt{\text{E}[Y^2]}} \]

Share this post

Similar posts

Derivation of the Rayleigh Distribution from 2D Normal Variables

comment

There are no comments yet.

Add a new comment