EXAMPLE 4 Calculating the correlation coefficient r
highlowtemp
Find the value of the correlation coefficient r for the temperature data in Table 3.
Solution
We will outline the steps used in calculating the value of r using the temperature data.
ˉx=∑xn=40,ˉy=∑yn=64
City | x | y | (x−ˉx) | (x−ˉx)2 | (y−ˉy) | (y−ˉy)2 | (x−ˉx) (y−ˉy) |
---|---|---|---|---|---|---|---|
Boston | 30 | 50 | −10 | 100 | −14 | 196 | 140 |
Chicago | 35 | 55 | −5 | 25 | −9 | 81 | 45 |
Philadelphia | 40 | 70 | 0 | 0 | 6 | 36 | 0 |
Washington, DC | 45 | 65 | 5 | 25 | 1 | 1 | 5 |
Dallas | 50 | 80 | 10 | 100 | 16 | 256 | 160 |
∑(x−ˉx)2=250 | ∑(y−ˉy)2=570 | ∑(x−ˉx)(y−ˉy)=350 |
Note on Rounding: Whenever you calculate a quantity that will be needed for later calculations, do not round. Round only when you arrive at the final answer. Here, because the quantities sx and sy are used to calculate the correlation coefficient r, neither of them is rounded until the end of the calculation.
sx=√∑(x−ˉx)2n−1=√2505−1≈7.90569415andsy=√∑(y−ˉy)2n−1=√5705−1≈11.93733639
r=∑(x−ˉx)(y−ˉy)(n−1)sxsy=350(4)(7.90569415)(11.93733639)≈0.92717265≈0.9272
The correlation coefficient r for the high and low temperatures is 0.9272.
NOW YOU CAN DO
Exercises 13c–20c.