- #1
XodoX
- 203
- 0
How do I calculate least squares? The way it's described is confusing to me. [itex]\hat{β}[/itex]= 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 [itex]\alpha[/itex], which is [itex]\hat{\alpha}[/itex]= [itex]\bar{y}[/itex]-[itex]\hat{β}[/itex]*[itex]\bar{x}[/itex]. Then I just plu in the previously calculated values.
The I go on to calculate [itex]\alpha[/itex], which is [itex]\hat{\alpha}[/itex]= [itex]\bar{y}[/itex]-[itex]\hat{β}[/itex]*[itex]\bar{x}[/itex]. Then I just plu in the previously calculated values.