Outliers are no problem

Algebra Level 3

Find the best line to fit the data points ( 1 , 0 ) , ( 2 , 0 ) , , ( 9 , 0 ) , ( 10 , 40 ) . (1,0), (2,0), \ldots, (9,0), (10,40). Use the least squares method: the line should be the one that minimizes the sum of the squares of the errors in the y y -coordinates.

If the line is written as y = m x + b , y = mx+b, where m = p q m =\frac pq with p p and q q being coprime prime positive integers and b b is an integer, find p + q + b . p+q+b.


The answer is 27.

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.

1 solution

Patrick Corn
Jul 7, 2016

For points ( x i , y i ) , (x_i,y_i), the best-fit line y = m x + b y=mx+b is given by the formulas m = n ( x i y i ) ( x i ) ( y i ) n x i 2 ( x i ) 2 b = ( x i 2 ) ( y i ) ( x i ) ( x i y i ) n x i 2 ( x i ) 2 \begin{aligned} m &= \frac{n \left( \sum x_iy_i \right) - \left( \sum x_i \right) \left( \sum y_i \right)}{n \sum x_i^2 - \left( \sum x_i \right)^2} \\ b &= \frac{\left( \sum x_i^2 \right) \left( \sum y_i \right) - \left( \sum x_i \right) \left( \sum x_iy_i \right)}{n \sum x_i^2 - \left(\sum x_i\right)^2} \end{aligned}

In our case, this gives m = 10 ( 400 ) 55 ( 40 ) 10 385 5 5 2 = 24 / 11 m = \dfrac{10 (400) - 55(40)}{10 \cdot 385-55^2} = 24/11 and b = 385 ( 40 ) 55 ( 400 ) 10 385 5 5 2 = 8 , b=\dfrac{385(40)-55(400)}{10 \cdot 385-55^2} = -8, so the answer is 24 + 11 8 = 27 . 24+11-8 = \fbox{27}.

Where does n=10 come from? I only see 4 data points.

J D - 4 months ago

Log in to reply

The ellipsis in the middle was supposed to denote all the points ( n , 0 ) (n,0) for 1 n 9. 1 \le n \le 9.

Patrick Corn - 3 months, 4 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...