Calculate straight line `(y=a+bx)` using Least square methodStraight line equation is `y = a + bx`. The normal equations are `sum y = an + b sum x` `sum xy = a sum x + b sum x^2` `x`  `y`  `x^2`  `x*y`  5  1  25  5  4  2  16  8  3  3  9  9  2  4  4  8  1  5  1  5          15  15  55  35 
Substituting these values in the normal equations `15=5a+15b` `35=15a+55b` Solving these two equations using Elimination method, `5a+15b=15` `5 (a+3b)=5 * 3` `a+3b=3` `15a+55b=35` `5 (3a+11b)=5 * 7` `3a+11b=7` `a+3b=3 >(1)` `3a+11b=7 >(2)` equation`(1) xx 3 => 3a+9b=9` equation`(2) xx 1 => 3a+11b=7` Substracting `=> 2b=2` `=> 2b=2` `=> b=2 / 2` `=> b=1` Putting `b=1` in equation `(1)`, we have `a+3(1)=3` `=> a=3+3` `=> a=6` `:. a=6" and "b=1` Now substituting this values in the equation is `y = a + bx`, we get `y = 6 x`
