HW7P2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

HW7P2

Cole
How do we explicitly use sums to find beta1 in problem 2?
Reply | Threaded
Open this post in threaded view
|

Re: HW7P2

Darth Knight
Think about the form of SSxx on the denominator of the beta_hat_1.
It is the sum of squared deviations from the sample mean; so,
if x=c(1,2,3,4,5), then by using the basic operators:

> SSxx<-sum((x-mean(x))^2)
> SSxx
[1] 10

As SSxy can be similarly obtained, we can find out the beta_hat_1.
For the beta_hat_0, just recall x_bar=mean(x), y_bar=mean(y).

Please let me know if it needs further clarification!