# Statistics - Least Squares

1. Feb 19, 2012

### XodoX

How do I calculate least squares? The way it's described is confusing to me. $\hat{β}$= r* sy/sx . sx and sy is the standard deviation of x and y, correct ? So let's say I have sets of numbers such as (16,19),(18,17) etc... 16 and 18 would be x and 19 and 17 would be y. So I have to calculate the variance first to get the SD , right? Then I would be the values for sy/sx. But what's r here?
The I go on to calculate $\alpha$, which is $\hat{\alpha}$= $\bar{y}$-$\hat{β}$*$\bar{x}$. Then I just plu in the previously calculated values.