# Homework Help: Linear Models: I've attached a picture, please explain how my professor got this?

1. Jul 12, 2011

### retspool

Linear models is the topic

And i believe my professor wrote this n*Sum(XiYi) - Sum(XiYi) = Sum(Xi - Xbar)(Yi - Ybar)

i was hoping if some one could tell me if this is true of if it is my bad in typing down.

If it is true then can some one please tell me how?

I've attached an image i'd appreciate it if someone could explain to me the last 3 steps.

Thanks

#### Attached Files:

• ###### IMAG0315.jpg
File size:
27.3 KB
Views:
100
2. Jul 12, 2011

### retspool

And this too. I've written simplifies at the center of the paper, i don't know how they get the Betas.

Thanks

#### Attached Files:

• ###### IMAG0317.jpg
File size:
22 KB
Views:
80
3. Jul 12, 2011

### Ray Vickson

Let <x> and <y> denote the x and y averages (you called them Xbar Nd Ybar). You want S = sum{(xj -<x>)(yj - < y>): j=1...n}. The nth term, expanded out, is xj*yj - <x>*yj - <y>*xj + <x>*<y>. Now sum <x>*yj = <x>*sum yj = n*<x>*<y>, etc., so we end up with S = sum(xy) - 2*n*<x>*<y> + n*<x>*<y> = sum(xy) - n<x><y>.

RGV