2.5. The Correlation Coefficient 127
and
σ^21 =E(X^2 )−μ^21 =
∫ 1
0
∫ 1
0
x^2 (x+y)dxdy−
(
7
12
) 2
=
11
144
.
Similarly,
μ 2 =E(Y)=
7
12
and σ 22 =E(Y^2 )−μ^22 =
11
144
.
The covariance ofXandYis
E(XY)−μ 1 μ 2 =
∫ 1
0
∫ 1
0
xy(x+y)dxdy−
(
7
12
) 2
=−
1
144
.
Accordingly, the correlation coefficient ofXandY is
ρ=
− 1441
√
( 14411 )( 14411 )
=−
1
11
.
We next establish that, in general,|ρ|≤1.
Theorem 2.5.1.For all jointly distributed random variables(X, Y)whose corre-
lation coefficientρexists,− 1 ≤ρ≤ 1.
Proof: Consider the polynomial invgiven by
h(v)=E
{
[(X−μ 1 )+v(Y−μ 2 )]^2
}
.
Thenh(v)≥0, for allv. Hence, the discriminant ofh(v) is less than or equal to 0.
To obtain the discriminant, we expandh(v)as
h(v)=σ 12 +2vρσ 1 σ 2 +v^2 σ^22.
Hence, the discriminant ofh(v)is4ρ^2 σ 12 σ 22 − 4 σ 22 σ^21. Since this is less than or equal
to 0, we have
4 ρ^2 σ 12 σ^22 ≤ 4 σ^22 σ 12 or ρ^2 ≤ 1 ,
which is the result sought.
Theorem 2.5.2.IfXandYare independent random variables then cov(X, Y)=0
and, hence,ρ=0.
Proof:BecauseXandYare independent, it follows from expression (2.4.3) that
E(XY)=E(X)E(Y). Hence, by (2.5.2) the covariance ofXandYis 0; i.e.,ρ=0.
As the following example shows, the converse of this theorem is not true:
Example 2.5.3.LetXandY be jointly discrete random variables whose distri-
bution has mass 1/4 at each of the four points (− 1 ,0),(0,−1),(1,0) and (0,1). It
follows that bothXandYhave the same marginal distribution with range{− 1 , 0 , 1 }
and respective probabilities 1/ 4 , 1 / 2 ,and 1/4. Hence,μ 1 =μ 2 = 0 and a quick cal-
culation shows thatE(XY)=0. Thus,ρ= 0. However,P(X=0,Y=0)=0
whileP(X=0)P(Y=0)=(1/2)(1/2) = 1/4. Thus,XandYare dependent but
the correlation coefficient ofXandYis 0.