Simple question about least square regression line?

#1
A study on the effect of bus fare (X) on the number of passengers (Y) produced the following result.

Bus fare ($) 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
Passengers 800 780 740 660 640 620 600 600
per 50 km

Calculate the least squares regression line.

I keep getting SSXY = -1095 and SSX = 10.5 and the b1 (beta coefficient) = -104.28 when the answer for the line = Y = 951 - 63.8X
 

BGM

TS Contributor
#2
Here is what I got in R:

> x<-c(2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0)
> y<-c(800, 780, 740, 660, 640, 620, 600, 600)
> m<-lm(y~x)
> m

Call:
lm(formula = y ~ x)

Coefficients:
(Intercept) x
951.19 -63.81

> cov(x,y)*7
[1] -670
> var(x)*7
[1] 10.5
So you should get \( SXY = -670, SXX = 10.5 \)