Multivariable-Calculus ยท Unit 8 ยท Video 5 ยท Interactive Practice
| Formula | Name | What you need |
|---|---|---|
| Total square deviation | The data and a candidate line | |
| Best-fit line: linear system | and , divided by | |
| , with | Exponential fit | The same system with in place of |
| Best parabola : first row of a system | Each row down lowers every power of by one, ending in |
Key Insight: the unknown coefficients enter the model linearly, so setting every partial derivative of to zero gives a linear system โ the data only supply its numbers.
Every coefficient of the system is a sum computed from the data points.
๐ก Challenge: place the three points so that , then so that the best-fit slope is although no two points share a height.
A straight line fitted to is an exponential curve on the ordinary scale.
Adding the point to the video's data bends the trend; a parabola needs sums up to .
Problem 1 ยท Build the 2 ร 2 System
Given: the data points , , โ find the linear system whose solution is the best-fit line .
Here and the four sums are
Placing them in and :
Subtracting the second from the first gives , so ; then gives . The best-fit line is .
Problem 2 ยท Fitting an Exponential
Given: the data points , , and the model , fitted by least squares on โ find and .
What is a?
What is c?
Taking logs, . With this is the line , fitted to the points , , โ the video's three points.
The sums are , , , , , so
Subtracting gives , so , and gives . Then
This fit minimizes the squared deviations of , not of itself.
Problem 3 ยท Four Points, Full Fit
Given: the data points , , , โ find the best-fit line and its total square deviation .
What is the best-fit line?
What is D at the best fit?
Sums ():
System:
Multiply the first by and the second by : and . Subtracting gives , so , and gives .
Deviations : , , , , so
Problem 4 ยท A One-Coefficient Model
Given: the model (no other terms) and the data points , , โ find the least-squares value of .
The total square deviation is a function of the single unknown :
By the chain rule, . Setting it to zero and dropping the :
With the data, and , so
This is the first row of the parabola system with the and columns removed, because those coefficients are no longer in the model. Since , it is a minimum.
Solved: 0 / 4