Find the best line to fit the data points Use the least squares method: the line should be the one that minimizes the sum of the squares of the errors in the -coordinates.
If the line is written as where with and being coprime prime positive integers and is an integer, find
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
For points ( x i , y i ) , the best-fit line y = m x + b is given by the formulas m b = n ∑ x i 2 − ( ∑ x i ) 2 n ( ∑ x i y i ) − ( ∑ x i ) ( ∑ y i ) = n ∑ x i 2 − ( ∑ x i ) 2 ( ∑ x i 2 ) ( ∑ y i ) − ( ∑ x i ) ( ∑ x i y i )
In our case, this gives m = 1 0 ⋅ 3 8 5 − 5 5 2 1 0 ( 4 0 0 ) − 5 5 ( 4 0 ) = 2 4 / 1 1 and b = 1 0 ⋅ 3 8 5 − 5 5 2 3 8 5 ( 4 0 ) − 5 5 ( 4 0 0 ) = − 8 , so the answer is 2 4 + 1 1 − 8 = 2 7 .