1 Finding Line Equations

Find the equation of the line that passes through the points (0,-2) and (3,7).

2 Finding Line of Best Fit

  1. Graph the following points: (0,8), (1,5), (2,7), and (3,4), and draw and estimate the line of best fit.
  2. Given the line of best fit follows the equation, \(y=ax+b\), write an expression for the sum of square error, \(SSE\).
  3. Write the partial derivatives of \(SSE\) with respect to \(a\) and \(b\), and simplify.
  4. Set your two equations in part (c) equal to zero and solve for \(a\) and \(b\). Does this solution minimize or maximize \(SSE\)?
  5. Write the equation that for this line of best fit (called the least squares regression model)
x = c(0,1,2,3)
y = c(8,5,7,4)

3 Practice

Repeat the process in problem 2 to find the least squares regression linear equation for the following data.

x = c(1,3,4)
y = c(1,2,2)