silemus.

49Least-squares line fit

Find the least-squares line y=mx+c\displaystyle y = mx + c through (0,0)\displaystyle (0, 0), (1,1)\displaystyle (1, 1) and (2,3)\displaystyle (2, 3). Give the answer to 3 decimal places.

The best-fit line through (0,0), (1,1), (2,3) is y = 1.500x − 0.167, found from the slope formula m = (nΣxy − ΣxΣy)/(nΣx² − (Σx)²) and c = ȳ − mx̄. Check: at x=1, y ≈ 1.333, reasonably close to the actual y=1.

How good is this answer?