Statistics Definitions > Cauchy-Schwarz Inequality

## What is the Cauchy-Schwarz Inequality?

The Cauchy-Schwarz Inequality is useful for bounding expected values that are difficult to calculate. The formula is:

Given that X and Y have finite variances.

What this is basically saying is that for two random variables, X and Y, the expected value of the square of them multiplied together** E(XY) ^{2}** will always be less than or equal to the expected value of the product of the squares of each.

**E(X**

^{2})E(Y^{2}).The inequality can be written, equivalently, as:

**Cov ^{2}(X,Y)≤σ^{2}_{x}σ^{2}_{y}.**

The Cauchy-Schwarz inequality is arguably the inequality with the widest number of applications. As well as probability and statistics, the inequality is used in many other branches of mathematics, including:

- Classical Real and Complex Analysis,
- Hilbert spaces theory,
- Numerical analysis,
- Qualitative theory of differential equations.

## Example

**Example question:** use the Cauchy-Schwarz inequality to find the maximum of x + 2y + 3z,

given that x^{2} + y^{2} + z^{2} = 1.

*We know that*: (x + 2y + 3x)^{2} ≤ (1^{2} + 2^{2} 3^{2})(x^{2} + y^{2} + z^{2}) = 14.

*Therefore*: x + 2y + 3z ≤ √14.

*The equality holds when*: x/1 = y/2 = z/3.

*We are given that*: x^{2} + y^{2} + z^{2} = 1,

so:

x = 1/√14,

x = 2/√14,

x = 3/√14,

## Proof

Many proofs are out there for this inequality, but it’s actually one of the simplest to visualize; one look at the formula should tell you that it is true. Here’s one of the simpler proofs:

Assume that **E[X ^{2}]>0 and E[Y^{2}]>0, **and:

*It can be shown that*: **2|UV|≤U ^{2} + V^{2}.**

*Therefore*: **2|E[UV]|≤2E[|UV|]≤E[U ^{2}] + E[V^{2}] = 2**

Giving:

**(E[UV])**

^{2}≤ (E[|UV|])^{2}≤ 1.*This implies that:
*

You can find a comprehensive list of proofs for the Cauchy-Schwarz inequality here.

If you prefer an online interactive environment to learn R and statistics, this free R Tutorial by Datacamp is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try this Statistics with R track.

Comments are now closed for this post. Need help or want to post a correction? Please post a comment on our Facebook page and I'll do my best to help!