Fitting Linear Fitting Linear Functions to DataFunctions to Data
Lesson 1.6Lesson 1.6
2
Cricket Chirps & Temp.Cricket Chirps & Temp.
►Your assignment was toYour assignment was tocount cricket chirpscount cricket chirpsand check the temperatureand check the temperature
►The data is saved and The data is saved and displayed on a spreadsheetdisplayed on a spreadsheet
►Your science teacher wantsYour science teacher wantsto know if you can find ato know if you can find alinear equation to more orlinear equation to more orless match the dataless match the data
3
Problems with DataProblems with Data
►Real data recordedReal data recorded Experiment resultsExperiment results Periodic transactionsPeriodic transactions
►ProblemsProblems Data not always recorded accuratelyData not always recorded accurately Actual data may not exactly fit theoretical Actual data may not exactly fit theoretical
relationshipsrelationships► In any case …In any case …
Possible to use linear (and other) functions Possible to use linear (and other) functions to analyze and model the datato analyze and model the data
4
Fitting Functions to DataFitting Functions to Data
►Consider the data Consider the data given by this examplegiven by this example
►Note the plot ofNote the plot ofthe data pointsthe data points CloseClose to being to being
in a straight linein a straight line
TemperatureViscosity
(lbs*sec/in2)
160 28
170 26
180 24
190 21
200 16
210 13
220 11
230 9
Viscosity (lbs*sec/in2)
0
5
10
15
20
25
30
160 170 180 190 200 210 220 230 240
5
Finding a Line to Approximate the Finding a Line to Approximate the DataData
►Draw a line “by eye”Draw a line “by eye” Note slope, y-interceptNote slope, y-intercept
►Statistical process (least squares Statistical process (least squares method)method)
►Use a computer programUse a computer programsuch as Excelsuch as Excel
►Use your TI calculatorUse your TI calculator
Chart Title
0
5
10
15
20
25
30
35
160 170 180 190 200 210 220 230 240
6
You Try ItYou Try It
►From Exercise 2, pg 65From Exercise 2, pg 65►Enter data into data matrix ofEnter data into data matrix of
calculatorcalculator APPS, 6, Current, Clear contentsAPPS, 6, Current, Clear contents
Weight Calories
100 2.7
120 3.2
150 4.0
170 4.6
200 5.4
220 5.9
7
Using Regression On Using Regression On CalculatorCalculator
►Choose F5 for Choose F5 for CalculationsCalculations
►Choose calculationChoose calculationtype (LinReg for this)type (LinReg for this)
►Specify columns where x and y values Specify columns where x and y values will come fromwill come from
8
Using Regression On Using Regression On CalculatorCalculator
► It is possible to store the Regression It is possible to store the Regression EQuation to one of the EQuation to one of the Y=Y= functions functions
9
Using Regression On Using Regression On CalculatorCalculator
►When all options areWhen all options areset, press ENTER andset, press ENTER andthe calculator comesthe calculator comesup with an equation approximates your up with an equation approximates your datadata
Note both the original x-y values and the function which
approximates the data
10
Using the FunctionUsing the Function
►Resulting function:Resulting function:►Use function to find CaloriesUse function to find Calories
for 195 lbs.for 195 lbs.►C(195) = 5.24C(195) = 5.24
This is called This is called extrapolationextrapolation
► Note: It is dangerous to extrapolate Note: It is dangerous to extrapolate beyondbeyond the the existing dataexisting data Consider C(1500) or C(-100) in the context of the Consider C(1500) or C(-100) in the context of the
problemproblem The function gives a value but it is not validThe function gives a value but it is not valid
( ) 0.027 0.0169C x x Weight Calories
100 2.7
120 3.2
150 4.0
170 4.6
200 5.4
220 5.9
11
InterpolationInterpolation
►Use given dataUse given data►Determine Determine
proportionalproportional“distances”“distances”
Weight Calories
100 2.7
120 3.2
150 4.0
170 4.6
195 ??
200 5.4
220 5.9
30 0.825 x
25
30 0.80.4167
4.6 0.4167 5.167
x
x
C
Note : This answer is different from the
extrapolation results
12
Interpolation vs. Interpolation vs. ExtrapolationExtrapolation
►Which is right?Which is right?► InterpolationInterpolation
Between values with ratiosBetween values with ratios
►ExtrapolationExtrapolation Uses modeling functionsUses modeling functions Remember do NOT go beyond limits of Remember do NOT go beyond limits of
known dataknown data
( ) 0.027 0.0169C x x
13
Correlation CoefficientCorrelation Coefficient
►A statistical measure of how well a A statistical measure of how well a modeling function fits the datamodeling function fits the data
►-1 ≤ corr ≤ +1-1 ≤ corr ≤ +1
►|corr| close to 1 |corr| close to 1 high correlation high correlation
►|corr| close to 0 |corr| close to 0 low correlation low correlation
►Note: high correlation does NOT imply Note: high correlation does NOT imply cause and effect relationshipcause and effect relationship
14
AssignmentAssignment
►Lesson 1.6Lesson 1.6►Page 48Page 48►ExercisesExercises
1, 3, 5, 71, 3, 5, 7