In order to compute the regression coefficients, the following table needs to be used:
"\\def\\arraystretch{1.5}\n \\begin{array}{c:c:c:c:c:c}\n & X & Y & XY & X^2 & Y^2 \\\\ \\hline\n & 18 & 8 & 144 & 324 & 64 \\\\\n \\hdashline\n & 20 & 6 & 120 & 400 & 36 \\\\\n \\hdashline\n & 25 & 5 & 125 & 625 & 25 \\\\\n \\hdashline\n & 27 & 2 & 54 & 729 & 4 \\\\\n \\hdashline\nSum= & 90 & 21 & 443 & 2078 & 129 \\\\\n\\end{array}"
"\\bar{X}=\\dfrac{1}{n}\\sum _{i}X_i=\\dfrac{90}{4}=22.5"
"\\bar{Y}=\\dfrac{1}{n}\\sum _{i}Y_i=\\dfrac{21}{4}=5.25"
"SS_{XX}=\\sum_iX_i^2-\\dfrac{1}{n}(\\sum _{i}X_i)^2""=2078-\\dfrac{90^2}{4}=53"
"SS_{YY}=\\sum_iY_i^2-\\dfrac{1}{n}(\\sum _{i}Y_i)^2""=129-\\dfrac{(21)^2}{4}=18.75"
"SS_{XY}=\\sum_iX_iY_i-\\dfrac{1}{n}(\\sum _{i}X_i)(\\sum _{i}Y_i)""=443-\\dfrac{90(21)}{4}=-29.5"
"r=\\dfrac{SS_{XY}}{\\sqrt{SS_{XX}SS_{YY}}}=\\dfrac{-29.5}{\\sqrt{53(18.75)}}"
"=-0.9358"
Strong negative correlation
Comments
Leave a comment