Download Method of Least Squares Predicting Y from X

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Method of Least Squares
Predicting Y from X
X
1
2
3
4
5
6
Y
2
3
4
4
5
7
2 = 1b +a
3 = 2b +a
4 = 3b +a
4 = 4b +a
5 = 5b +a
7 = 6b +a
y = bx + a
No values of “b” and “a” will satisfy simultaneously all six equations.
Obtain two equations: 1st and 2nd Normal Equations.
1st = multiplying each equation by its “b” coefficient and summing.
2nd = multiplying each equation by tis “a” coefficient and summing.
1st Normal
1b + 1a = 2
4b + 2a = 6
9b + 3a = 12
16b + 4a = 16
25b + 5a = 25
36b + 21a = 42
91b + 21a = 103
2nd Normal
1b + 1a = 2
2b + 1a = 3
3b + 1a = 4
4b + 1a = 4
5b + 1a = 5
6b + 1a = 7
21b + 6a = 25
Thus: b and a for the least squared solution are derived by solving the 1st and 2nd
Normal Equations simultaneously.
91b + 21a = 103
21b + 6a = 25
Divide 1st by 91d and 2nd by 21
b + .2857a = 1.1905
b + .2308a = 1.1319
and subtract 1st from the 2nd
.0549a = 0.0586
a = 1.067
Substitute the a value into the 1st equation and solve for b
b = 1.1318 - (.2308)(1.067)
= .886
y = .886x + 1.065
Related documents