# Cauchy-Schwarz inequality: cov(X,Y)]^2 ≤ var(X) var(Y)

1. Oct 10, 2009

### kingwinner

Suppose that X andy Y are (scalar) random variables. Show that
[cov(X,Y)]^2 ≤ var(X) var(Y). (Cauchy-Schwarz inequality)

Sow that equality holds if and only if there is a relationship of the form

m.s.
c=aX+bY (i.e. c is equal to aX+bY in "mean square").

=========================

Proof:
E[(X+tY)^2] is quadratic in t and is ≥0. This means that the graph of it has at most one real root, i.e. discriminant ≤ 0. Setting discriminant ≤ 0 gives gives [E(XY)]^2 ≤ E(X^2) E(Y^2).

Now I am stuck with the second part. I know that equality can only possibly happen when the graph of E[(X+tY)^2] has exactly one real root, i.e. discriminant = 0, but how can I prove that c is equal to aX+bY in "mean square"?

Any help is appreciated!:)

Last edited: Oct 10, 2009
2. Oct 15, 2009

### bpet

Something is missing in your expressions for variance and covariance?

3. Oct 17, 2009

### SW VandeCarr

$$|Cov(X,Y)|^2=|E(X-\mu)(Y-\nu)|^2=|\langle X-\mu, Y-\nu\rangle|^2$$

$$= E(X-\mu)^2E(Y-\nu)^2$$

$$= Var(X)Var(Y)$$

The Cauchy-Schwarz inequality is:$$E|(XY)|^2\leq E(X^2)E(Y^2)$$

Last edited: Oct 17, 2009
4. Oct 18, 2009

### kingwinner

But now the trouble is when the EQUALITY hold in the inequality [cov(X,Y)]^2 ≤ var(X) var(Y)...!?

5. Oct 19, 2009

### SW VandeCarr

$$|Cov(X,Y)|^2\leq \langle X-\mu,X-\mu \rangle \langle Y-\nu,Y-\nu\rangle$$

http://en.wikipedia.org/wiki/Cauchy–Schwarz_inequality

Last edited: Oct 19, 2009