Covariance and Correlation
Covariance and Correlation
Remarks:
Cov(X, Y ) = 0
and
ρX,Y = 0.
By definition of correlation,
Cov(X, Y )
ρX,Y = √ = 0.
V ar(X)V ar(Y )
Therefore,
Cov(X, Y ) = Cov(X, X + Z)
= Cov(X, X) + Cov(X, Z) = 1 + 0 = 1.
V ar(Y ) = V ar(X + Z)
= V ar(X) + V ar(Z)
by independence assumption
= 1.01.
So
1
ρX,Y = √ = 0.995.
1.01
12
A useful variance formula
V ar(aX + bY )
= a2V ar(X) + 2abCov(X, Y ) + b2V ar(Y ).
Proof:
V ar(aX + bY )
= Cov(aX + bY, aX + bY )
= Cov(aX, aX + bY ) + Cov(bY, aX + bY )
= Cov(aX, aX) + Cov(aX, bY )
+Cov(bY, aX) + Cov(bY, bY )
= a2 Cov(X, X) + 2abCov(X, Y ) + b2 Cov(Y, Y )
= a2 V ar(X) + 2abCov(X, Y ) + b2 V ar(Y ).
V ar(a1X1 + · · · + anXn)
n
∑ n
∑
= a2
i V ar(Xi ) + 2 aiaj Cov(Xi, Xj ).
i=1 i<j
The proof is left as an optional Hw problem.
13
Ex3 If V ar(X) = 1, V ar(Y ) = 2 and Cov(X, Y ) =
−1. If U = 3X−2Y , V = X+2Y . Find V ar(U ),
V ar(V ) and Cov(U, V ).
V ar(U ) = V ar(3X − 2Y )
= 32V ar(X) + 2 · 3 · (−2)Cov(X, Y )
+(−2)2V ar(Y )
= 9 · 1 + 2 · 3 · (−2) · (−1) + 4 · 2 = 29.
V ar(V ) = V ar(X + 2Y )
= 12V ar(X) + 2 · 1 · 2Cov(X, Y )
+(2)2V ar(Y )
= 1 − 4 + 8 = 5.
[Cov(X, Y )]2
g(t0) = V ar(X) −
V ar(Y )
Since g(t) = V ar(Zt) ≥ 0 for all t, we must
have
[Cov(X, Y )]2
V ar(X) − ≥0
V ar(Y )
which means
[Cov(X, Y )]2
1≥ .
V ar(X)V ar(Y )
Thus by the definition of ρ(X, Y ) we see
1 ≥ ρ2(X, Y ).
15
Markov Inequality
Y = X − aI(X > a) ≥ 0
Why? because if X ≤ a then Y = X − 0 = X >
0; and if X ≥ a, then Y = X − a ≥ 0. Since
Y is a non-negative random variable, by the
definition of expectation, its mean is greater
or equal to zero, so E[Y ] ≥ 0.
18
An important application of Chebyshev
inequality
19
The Law of Large Numbers
Pr( lim X̄ = µ) = 1.
n→∞
20