24.4k views
2 votes
In the class we discussed how to fit a line y = mx+c to data points (xi,yi),i = 1,2,··· ,n such that the least-squares error is minimized. Assume instead that we seek to fit a function of the form y = a/x + b to the same data. Find the pair of equations whose solution determines a and b.

User Wil
by
7.8k points

1 Answer

0 votes

Final answer:

To determine the values of a and b that minimize the sum of squared errors (SSE) for the function y = a/x + b, we can follow a similar approach to linear regression. By minimizing the SSE, we can find the points that are on the line of best fit for the given data.

Step-by-step explanation:

To determine the values of a and b that make the sum of squared errors (SSE) a minimum for the function y = a/x + b, we can follow a similar approach to linear regression. Let's assume we have n data points (xi, yi). The goal is to minimize the SSE, which is the sum of the squared differences between the actual values yi and the predicted values a/xi + b.

To find the values of a and b that minimize SSE:

  1. For each data point (xi, yi), calculate the squared difference between yi and (a/xi + b).
  2. Sum up all the squared differences to get the SSE.
  3. Differentiate the SSE with respect to a and b, set the derivatives equal to zero, and solve the resulting equations to find the values of a and b that minimize SSE.

By finding the solution to the pair of equations obtained from step 3, you can determine the values of a and b that minimize the sum of squared errors (SSE) for the function y = a/x + b.

User Jhonathan
by
7.9k points