i123456x422736252239∑xi=191y510812137∑yi=55xy210270288300286273∑xiyi=1627x2176472912966254841521∑xi2=6419y2251006414416949∑yi2=551 a) Compute the line of regression
Calculating the mean (xˉ,yˉ)
x=n∑xi=6191,y=n∑xi=655 The equation of a simple linear regression line (the line of best fit) is y = mx + b,
m=slope=n∑xi2−(∑xi)2n∑xiyi−∑xi∑yi
m=6⋅6419−(191)26⋅1627−191⋅55≈−0.365470
b=y−mx
b≈655−(−0.365470)⋅6191≈20.800787 The line of regression
y=−0.365470x+20.800787
b) Calculate coefficient of correlation (r)
r=n∑xi2−(∑xi)2⋅n∑yi2−(∑yi)2n∑xiyi−∑xi∑yi
r=6⋅6419−(191)26⋅551−(55)26⋅1627−191⋅55≈−0.983030
r=−0.983030
Comments