In: Math
You ask 6 of your friends how many dogs they have and how many cats they have. You record the data as ordered pairs (0,0), (0,1), (1,1), (2,1), (3,3), (5, 4).
1.Create a scatter plot of the data
2.Draw in an estimate of the least squares regression
3.Calculate the least squares regression line. Write the equation of that line.
1)
2)
3)
x | y | (x-x̅)² | (y-ȳ)² | (x-x̅)(y-ȳ) |
0 | 0 | 3.36 | 2.78 | 3.06 |
0 | 1 | 3.36 | 0.44 | 1.22 |
1 | 1 | 0.69 | 0.44 | 0.56 |
2 | 1 | 0.03 | 0.44 | -0.11 |
3 | 3 | 1.36 | 1.78 | 1.56 |
5 | 4 | 10.03 | 5.44 | 7.39 |
ΣX | ΣY | Σ(x-x̅)² | Σ(y-ȳ)² | Σ(x-x̅)(y-ȳ) | |
total sum | 11 | 10 | 18.83333333 | 11.3 | 13.67 |
mean | 1.83 | 1.67 | SSxx | SSyy | SSxy |
sample size , n = 6
here, x̅ = Σx / n= 1.83 ,
ȳ = Σy/n = 1.67
SSxx = Σ(x-x̅)² = 18.8333
SSxy= Σ(x-x̅)(y-ȳ) = 13.7
estimated slope , ß1 = SSxy/SSxx = 13.7
/ 18.833 = 0.7257
intercept, ß0 = y̅-ß1* x̄ =
0.3363
so, regression line is Ŷ =
0.3363 + 0.7257
*x