Download presentation
Presentation is loading. Please wait.
1
7.4 – The Method of Least-Squares
Math 140 7.4 – The Method of Least-Squares
2
Q: Given a scatterplot of data, how do we find a function that “best fits” the data?
4
Linear model Good fit!
6
Exponential model Good fit!
8
Linear model Bad fit!
9
If we can minimize the vertical distances from the points to the function, then we’ll have a good fit. It turns out to be more convenient to use the squares of the vertical distances.
10
A function is a “best fit” according to the ____________________ if the sum of the squares of the vertical distances is minimized.
11
A function is a “best fit” according to the ____________________ if the sum of the squares of the vertical distances is minimized. least-squares criterion
12
We’ll focus on using a linear model here (𝑦=𝑚𝑥+𝑏), and so we’ll get a two-variable function (the two variables are 𝑚 and 𝑏) that we can minimize using partial derivatives.
13
Ex 1. Use the least-squares criterion to find the equation of the line that is closest to the three points (1,1), (2,3), and (4,3).
19
Note: The above method can be generalized to give two “nice” formulas for finding 𝑚 and 𝑏: 𝑚= 𝑛∑𝑥𝑦−∑𝑥∑𝑦 𝑛∑ 𝑥 2 − ∑𝑥 2 and 𝑏= ∑ 𝑥 2 ∑𝑦−∑𝑥∑𝑥𝑦 𝑛∑ 𝑥 2 − ∑𝑥 2 This result is used in statistics classes.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.