Curve Fitting (PowerPoint)

advertisement
Curve Fitting
Disposition
Breeding Chows and Vizslas
10
9
8
7
6
5
4
3
2
1
0
0
1
2
3
4
5
6
7
8
9
10
Appearance
John C. Mayer
Introduction to Mathematical
Modeling
1
Source of Example
The chow/vizsla example is from
“Lessons for A First Course in
System Dynamics Modeling v1.0”
by Diana M. Fisher.
Summer Creek Press, 1998.
John C. Mayer
Introduction to Mathematical
Modeling
2
Procedure



Given paired data points (xi,yi).
Produce a scatterplot of the paired
data points.
Fit a linear equation
Y = aX+b


John C. Mayer
and its graph (curve) to the data.
Evaluate the fit.
Analyze the result.
Introduction to Mathematical
Modeling
3
Research Question



John C. Mayer
Can the appearance of a chowvizsla hybrid be used to predict its
disposition?
Dogs are rated based upon their
chow-like and vizsla-like
characteristics.
Scale 0 (most like vizsla) to 10
(most like chow).
Introduction to Mathematical
Modeling
4
Table of Data
Breeding Chows and Vizslas
Dog
Appearance Disposition
Sam
4
2
Jake
6
6
Gus
7
7
Max
3
3
Suzie
7
10
Rover
8
10
Zeek
2
5
Rex
4
6
Tiesha
3
3
BJ
4
5
Missy
7
7
Mean
5
5.82
John C. Mayer
Introduction to Mathematical
Modeling
10
9
8
7
6
5
4
3
2
1
0
0
5
Scatterplot of Data
Disposition
Breeding Chows and Vizslas
10
9
8
7
6
5
4
3
2
1
0
0
1
2
3
4
5
6
7
8
9
Appearance
John C. Mayer
Introduction to Mathematical
Modeling
6
Plotting the Means (x,y)=(5,5.82)
Disposition
Breeding Chows and Vizslas
10
9
8
7
6
5
4
3
2
1
0
0
1
2
3
4
5
6
7
8
9
Appearance
John C. Mayer
Introduction to Mathematical
Modeling
7
Adding a Trendline
Disposition
Breeding Chows and Vizslas
10
9
8
7
6
5
4
3
2
1
0
e2
e1
0
1
2
3
e3
4
5
6
7
8
9
Appearance
John C. Mayer
Introduction to Mathematical
Modeling
8
Least Squares Fit

Minimize the
error sum of squares
Q =  (ei)2

The smaller Q, the closer the
correlation coefficient R2 is to 1.
A perfect fit (all points on the
line) has R2=1.

John C. Mayer
Introduction to Mathematical
Modeling
9
Trendline and Equation
Disposition
Breeding Chows and Vizslas
D= 1.0476A + 0.5801
R2 = 0.6619
10
9
8
7
6
5
4
3
2
1
0
0
1
2
3
4
5
6
7
8
9
10
Appearance
John C. Mayer
Introduction to Mathematical
Modeling
10
No Correlation

This graph
shows
essentially
no
correlation
between
the
variables
X and Y.
John C. Mayer
R2 = 0.0003
7
6
5
Y
4
3
2
1
0
0
1
2
3
4
5
6
7
8
9 10
X
Introduction to Mathematical
Modeling
11
High Correlation

This graph
shows a
high
degree of
correlation
between X
and Y.
24
20
16
Y 12
8
4
0
0
2
4
X
John C. Mayer
Introduction to Mathematical
Modeling
6
8
10
12
Y = 1.6927X + 3.0273
R2 = 0.9996
12
Outliers


Outliers
affect the
degree of
correlation.
Outliers
affect the
fitted
curve.
24
20
16
Y 12
8
4
0
0
2
4
X
John C. Mayer
Introduction to Mathematical
Modeling
6
8
10
12
Y = 1.5698X+ 3.9045
R2 = 0.7968
13
Download