nextupprevious
Next:About this document ...Up:No TitlePrevious:Solution to Exercise 5.22.

Solution to Exercise 5.30.

(a) Table 5 shows the calculation of

\begin{displaymath}E[XY] \; = \; 31 .\end{displaymath}

Thus, from the shortcut formula in the boxed proposition on p. 217, we obtain

\begin{displaymath}Cov[X,Y] \; = \; 31 - 5.55*8.55 \; = \; -16.4525 .\end{displaymath}


Table 5: Table for calculation of E[XY]. The sum of the last colum (shown in the entry in the last row and column) is E[XY].
x y pXY x*y*pXY
    0.02 0.0
5 5 0.04 1.0
10 10 0.01 1.0
  15 0.06 0.0
5   0.15 0.0
10 5 0.15 7.5
  10 0.02 0.0
5 15 0.20 15.0
10   0.14 0.0
  5 0.10 0.0
5 10 0.10 5.0
10 15 0.01 1.5
$\cdot$ $\cdot$ $\cdot$ 31.0

(b) We need to compute the standard deviations:

\begin{displaymath}E[X^2] \; = \; (0^2)*0.20 + (5^2)*0.49 + (10^2)*0.31 \; = \; 43.25 .\end{displaymath}

\begin{displaymath}\sigma_X \; = \; \sqrt{43.25-(5.55^2)} \; = \; 3.528101 .\end{displaymath}

\begin{displaymath}E[Y^2] \; = \; (0^2)*0.07 + (5^2)*0.36 + (10^2)*0.36 + (15^2)*0.21 \; = \; 92.25 .\end{displaymath}

\begin{displaymath}\sigma_Y \; = \; \sqrt{92.25-(8.55^2)} \; = \; 4.375786 .\end{displaymath}

Thus,

\begin{displaymath}\rho_{XY} \; = \; \frac{-16.4525}{3.528101*4.375786} \; = \; -1.0657 .\end{displaymath}

Clearly some mistake here as correlations are always between -1 and 1.

OK, I see the problem. In part (a) I was on auto-pilot when I put in the y column in Table 5. The corrected version appears as Table 6. The correct value for the covariance is

\begin{displaymath}Cov[X,Y] \; = \; 44.25 - 5.55*8.55 \; = \; -3.2025.\end{displaymath}

Thus,

\begin{displaymath}\rho_{XY} \; = \; \frac{-3.2025}{3.528101*4.375786} \; = \; -0.2074398.\end{displaymath}

OK, that value isn't obviously wrong. I hope it is correct.

NOTE: It is kind of funny to get a negative correlation for the scores on two exams. That means a higher score on one exam tends to go with a lower score on the other.
 
 

Table 6: Corrected table for calculation of E[XY].
x y pXY x*y*pXY
    0.02 0.00
5   0.04 0.00
10   0.01 0.00
  5 0.06 0.30
5 5 0.15 0.75
10 5 0.15 0.75
  10 0.02 0.20
5 10 0.20 2.00
10 10 0.14 1.40
  15 0.10 1.50
5 15 0.10 1.50
10 15 0.01 0.15
$\cdot$ $\cdot$ $\cdot$ 44.25



nextupprevious
Next:About this document ...Up:No TitlePrevious:Solution to Exercise 5.22.
Dennis Cox

3/10/2001