Transcript Plot

Empirical Model Building I: Objectives:
By the end of this class you should be able to:
•
•
•
•
find the equation of the “best fit” line for a
linear model
explain the criteria for a “best fit” line
linearize exponential and power models.
use plots to determine if a linear, exponential
or power model fits a given data set.
Palm, Section 5.5
Download file FnDiscovery.mat
and load into MATLAB
Review Exercise (pairs)
The compressive strength of samples of a specific type
of cement can be modeled by a normal distribution
with a mean of 6000 kilograms per square centimeter
and a standard deviation of 100 kilograms per square
centimeter
• What is the variance of this compressive strength?
• What percent of a batch of cement samples is
expected to be greater than 5800 kg/cm2?
Adapted from: Montgomery, Runger and Hubele,
Engineering Statistics, 2nd Ed., Wiley (2001)
Expected Proportions for known 
mean
Percentage of
observations in
the given range
probability density (scaled frequency)
0.4
0.35
0.3
68 %
 1s
0.25
0.2
95.5 %
0.15
0.1
0.05
0
-4
99.7%
 2
 3
-3
-2
-1
0
1
2
standard deviations from the mean
3
4
Modeling Spring Lengthening
What type of model (equation) would you use
to represent the data below? Why?
Force (lb)
Spring Length Increase (in.)
0
0
0.47
2.5
1.15
5.9
1.64
8.2
Capacitor Discharge Data
Plot this data.
Can you fit a linear model to it?
t = Time (s)
V = Voltage (V)
0
0.5
1
100
62
38
1.5
2
2.5
21
13
7
3
4
3.5
4
2
3
Three Basic Two-parameter Models
(colored equations down on a blank paper)
• Linear
y  mx  b
• Power
y  bx
• Exponential
y  be
m
mx
y  b10
mx
or
Remember basic Log/ln rules
•
Multiplication:
log(ab) = log(a) + log(b)
or
ln(ab) = ln(a) + ln(b)
•
Powers:
log(am) = m log(a)
or
ln(am) = m ln(a)
For the power and exponential models you wrote down :
Take the log of both sides and simplify
A few notes on MatLAB commands
Log transformations:
Also remember:
>> log(x)
 the natural log of x
(i.e., ln(x))
>> semilogy(x,y, ...)
 creates a plot with a log
scale on the y axis
>> log10(x)
 the base 10 log of x
>> loglog(x,y, ...)
 creates a plot with log
scales on both axes
This pattern is typical
for many programs
Function Discovery: 2-parameter models
(Try to find a plot that makes the data look linear)
Model
Linear
Exponential
Equation
Linerized
equation
y  mx  b
y  be
mx
y  b10
Power
y  bx
m
mx
y  mx  b
Plot
(command)
linear
(plot)
semilog
ln( y )  ln( b)  mx (semilogy)
log( y )  log( b)  mx
log( y ) 
log( b)  m log( x)
log-log
(loglog)
Exercise:
Determine the likely model form for:
1. Deflection of a cantilever beam (F, d)
2. x1 vs. y1
3. x2 vs y2
Data vectors Available
• On handout
• In MATLAB data file FnDiscovery.mat