Calc help!

ga14

Member
Nov 17, 2002
42
0
0
Hey Guys,

I need help with following question:

"Suppose you are given a set of ten data points {(x1, y1), (x2,y2), (x3, y3)...(x10,y10)} and you want to find the "best fit" line to the data. In statistics the best fit line (often called the least squares line) is defined to be the line y=mx+b that minimizes the sum of the squares of the differences between the line and the data points. More precisely, the line of best fit is the line y=mx+b that minimizes the Rieman sum from k=1 to n of (y_k-(mx_k+b))^2
where _k denotes "sub k".

In this problem, you can assume n=10. Use partial differentiation to show that the line of best fit has slope _______
and y intercept ________."

Thanks for any help at all!
 

rjain

Golden Member
May 1, 2003
1,475
0
0
Expand the equation for the sum from k=1 to 10. Then find its minimum.
 

ga14

Member
Nov 17, 2002
42
0
0
Ok, so I expand out (y_k-(mx_k+b))^2? Then take the partial derivative with respect to x?
 

rjain

Golden Member
May 1, 2003
1,475
0
0
You expand out all the terms in the sum, yes. Then you take partials based on the variables you are trying to minimize, namely m and b.