Professional Documents
Culture Documents
Chapter 3B - Regression - Teaching (04.2020)
Chapter 3B - Regression - Teaching (04.2020)
1. Linear regression
Criteria for a “Best” Fit
Least-Squares Fit of a Straight Line
Quantification of Error of Linear Regression
Linearization of Nonlinear Relationships
2. Polynomial regression
Gauss elimination method
1
4/11/2020
A more appropriate strategy for such cases is to derive an approximating function that fits the
shape or general trend of the data without necessarily matching the individual points.
derive a curve that minimizes the discrepancy between the data points and the curve called
least-squares regression
3
2
4/11/2020
Fit a straight line to a set of paired observations: (x1, y1), (x2, y2), . . . , (xn, yn).
The mathematical expression
e - the error (residual) is the discrepancy between the true value of y and the
approximate value, a0 + a1x, predicted by the linear equation.
3
4/11/2020
Minimize the sum of the residual errors for all the available data
Minimize the sum of the squares of the residuals between the measured y
and the y calculated with the linear model
Teaching
4
4/11/2020
Teaching
Problem Statement: Fit a straight line to the x and y values in the first two
columns of Table 17.1.
Teaching
Problem Statement: Fit a straight line to the x and y values in the first two
columns of Table 17.1.
10
5
4/11/2020
Teaching
Problem Statement: Fit a straight line to the x and y values in the first two
columns of Table 17.1.
11
Standard deviation
Correlation coefficient
12
6
4/11/2020
13
(b)
Where
v = velocity (m/s),
g = gravitational constant (9.8 m/s2),
m = mass equal to 68.1 kg,
c = drag coefficient of 12.5 kg/s.
(c)
7
4/11/2020
(b)
(c)
15
16
8
4/11/2020
Teaching
x y log(x) log(y)
1 0.5 0.000 -0.301
2 1.7 0.301 0.230
3 3.4 0.477 0.531
4 5.7 0.602 0.756
5 8.4 0.699 0.924
Teaching
4
0.200
3
0.000 2
0.000 0.200 0.400 0.600 0.800 1
-0.200
0
-0.400
0 2 4 6
logx
x
9
4/11/2020
Teaching
Teaching
10
4/11/2020
Teaching
11
4/11/2020
Teaching
The initial step will be to eliminate the first unknown, x1, from
the second through the nth equations. To do this, multiply Eq.
(9.12a) by a21/a11.
Teaching
12
4/11/2020
Teaching
13
4/11/2020
14
4/11/2020
15
4/11/2020
16
4/11/2020
Velocity (m/s)
0.4 0.29 0.13 0.07 0.05
1
0.45 0.32 0.15 0.08 0.06 y = 0.3595x - 0.0103
0.5 0.35 0.18 0.1 0.07 0.8
0.55 0.4 0.2 0.11 0.08 y = 0.2434x - 0.0227
0.6 0.44 0.21 0.12 0.09 0.6
0.65 0.47 0.22 0.13 0.1
0.4
0.7 0.49 0.24 0.15 0.11
0.75 0.5 0.26 0.16 0.12 0.2 y = 0.1924x - 0.0259
0.8 0.52 0.28 0.18 0.13
0.85 0.56 0.3 0.19 0.15 0
0.9 0.61 0.33 0.2 0.15 0 0.5 1 1.5 2 2.5 3
0.95 0.67 0.35 0.21 0.16 -0.2
Time (s)
1 0.71 0.36 0.22 0.16
Series1 Series2 Series3 Series4
1.05 0.75 0.37 0.23 0.17
1.1 0.78 0.37 0.25 0.18 Linear (Series1) Linear (Series1) Linear (Series2) Linear (Series2)
1.15 0.81 0.37 0.26 0.19
Linear (Series3) Linear (Series3) Linear (Series4)
1.2 0.85 0.39 0.28 0.2
1.25 0.88 0.42 0.3 0.21
1.3 0.89 0.46 0.31 0.22
17