In: Statistics and Probability
On October 17, 2007, the classified ads on the web site of The Seattle Times listed the following 13 used Toyota Prius automobiles for sale; the data set below shows the year, color, mileage (in miles) and asking price (in U.S. dollars) for each car:
year color mileage price 2006 green 17043 25995 2007 gray 12628 24980 2005 maroon 24039 24885 2005 silver 48226 23995 2006 black 10522 22995 2004 silver 66345 21995 2007 white 5611 21995 2005 gold 24479 21595 2004 white 14618 20995 2005 silver 53699 20980 2004 silver 47649 17995 2003 white 39600 17500 2005 black 103126 16995
1. compute the correlation between mileage and price:
1)
S.No | X | Y | (x-x̅)2 | (y-y̅)2 | (x-x̅)(y-y̅) |
1 | 17043 | 25995 | 358158536.5444 | 17922196.60 | -80118585.2663 |
2 | 12628 | 24980 | 544759190.7751 | 10358494.67 | -75119139.8817 |
3 | 24039 | 24885 | 142302876.2367 | 9756011.98 | -37260012.9586 |
4 | 48226 | 23995 | 150256678.1598 | 4988350.44 | 27377599.7337 |
5 | 10522 | 22995 | 647502830.7751 | 1521427.37 | -31386757.1893 |
6 | 66345 | 21995 | 922757455.6213 | 54504.29 | 7091843.1953 |
7 | 5611 | 21995 | 921552119.3136 | 54504.29 | -7087209.8817 |
8 | 24479 | 21595 | 131998888.5444 | 27735.06 | 1913373.1953 |
9 | 14618 | 20995 | 455825784.6213 | 587581.21 | 16365655.1183 |
10 | 53699 | 20980 | 314385633.1598 | 610802.37 | -13857398.3432 |
11 | 47649 | 17995 | 136443963.9290 | 14186811.98 | -43996646.0355 |
12 | 39600 | 17500 | 13190865.2367 | 18160710.06 | -15477579.8817 |
13 | 103126 | 16995 | 4510186632.0059 | 22719888.91 | -320110823.3432 |
Total | 467585 | 282900 | 9249321454.9231 | 100949019.23 | -571665681.5385 |
Mean | 35968.077 | 21761.54 | SSX | SSY | SXY |
correlation coefficient r= | Sxy/(√Sxx*Syy) = | -0.5916 |