Excel Regression
Excel Regression
Excel Regression
y = ax + b
Model
y
y11
e11
y11
x
x11
SSE yi yi
i 1
yi a xi b
n xi yi xi yi
i 1 i 1
a i 1
2
n
n
2
n xi xi
i 1
i 1
n
y
i 1
x
i 1
1460
1440
1420
1400
1380
1360
1340
1320
1989
1990
1991
1992
1993
1994
1995
Year
1996
1997
1998
1999
2000
n xi yi xi yi
i 1 i 1
a i 1
2
n
n
n xi2 xi
i 1
i 1
n
y
i 1
x
i 1
1500
y = 21.32x - 41090
1450
1400
1350
1300
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
Year
10
Trendline
Select
Add Trendline
option
1460
CO2 Emissions (MMT C)
Right-click on a
data point to get
context-sensitive
menu
1440
1420
1400
1380
1360
1340
1320
1989
1990
1991
1992
1993
1994
1995
Year
1996
1997
1998
1999
11
2000
Linear selected
by default
OK for this
problem
Click on
Options tab
12
Options tab
Set for
Display equation
on chart
Click OK
13
Fix up
equation
display
y = 21.315x - 41090
1500
1450
1400
1350
1300
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
Year
14
1500
y = 21.315x - 41090
1450
1400
1350
1300
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
Year
Initial, empty
Regression
dialog box
16
checking Residuals
will give us also
model predictions
17
Format
Autoformat
OK
and fix up
display for
appropriate
significant
figures
18
used to judge
goodness of
fit
intercept
and slope
values
used to judge
whether terms
belong in the
model
add to data graph
for visual comparison
with model
19
adjustment to R2 that
penalizes the value for
using a model with too
many terms
A P-value of 5%
(0.05) or greater
causes suspicion
that the coefficient
may not be
significant and that
the term should
probably be dropped
from the model
21
22
y a bx cx 2 dx 3 L
y ae
x1
x2
23
Nonlinear models
Transformable to linear
ln y ln a b x
y a eb x
Not transformable
P 10
B
T C
straight-line
regression!
24
Viscosity (cp)
1.400
1.200
1.000
0.800
0.600
0.400
0.200
0.000
0
50
100
150
200
250
Temperature (degF)
25
26
check
Residuals
27
model performance
adjR2
model coefficients
copy to graph
28
Viscosity (cp)
1.400
Quadratic
1.200
1.000
0.800
0.600
0.400
0.200
0.000
0
50
100
150
200
250
Temperature (degF)
29
30
Viscosity (cp)
1.400
Quadratic
Cubic
1.200
4th Order
1.000
0.800
0.600
0.400
0.200
0.000
20
40
60
80
100
120
140
160
180
200
220
Temperature (degF)
31
32
Model 1: y a b x1 c x2
Model 2:
y b x1 c x2
33
10.0
Predicted y
8.0
Model 1
6.0
Model 2
4.0
2.0
0.0
0
10
12
Measured y
34
Nonlinear Regression
Fitting the parameters of the van der Waals equation of state
Data for SO2
RT
a
V b V 2
35
36
Basic data
Calculated Pressure
37
Ideal Gas
Sum of Squares
Calculation Calculation
Error Calculation
38
Results
39
Results
40
Note departure of
ideal gas predictions
at higher pressures
10000000
8000000
van der Waals
Ideal Gas
6000000
4000000
2000000
0
0
2000000
4000000
6000000
8000000
10000000
12000000
41