Linear Regression: Fitting a Line to Scatter Plot Data - Prof. Stephanie L. Holcombe, Papers of Algebra

Instructions on how to perform linear regression analysis using mathematical equations and a calculator. It covers topics such as scatter plots, curve fitting, hand-drawing best fit lines, and using a calculator to find the linear model and correlation coefficient. The document also includes examples and exercises.

Typology: Papers

Pre 2010

Uploaded on 08/16/2009

koofers-user-q8o
koofers-user-q8o 🇺🇸

8 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
MATH 1111
MATH 1111-
-College Algebra
College Algebra
Data Analysis, Curve Fitting, and Data Analysis, Curve Fitting, and
Linear RegressionLinear Regression
MATH MODELING
MATH MODELING
bbWhen a realWhen a real--world problem can be world problem can be
described in mathematical language, we described in mathematical language, we
have a have a mathematical modelmathematical model..
bbOften functions (equations) are used as the Often functions (equations) are used as the
mathematical model.mathematical model.
bbIf the realIf the real--world data contains two variable world data contains two variable
values, one dependent (y) upon the values, one dependent (y) upon the
independent value (x), the data forms (x,y) independent value (x), the data forms (x,y)
scatter points called a scatter plotscatter points called a scatter plot
For Evaluation Only.
Copyright (c) by Foxit Software Company, 2004
Edited by Foxit PDF Editor
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Linear Regression: Fitting a Line to Scatter Plot Data - Prof. Stephanie L. Holcombe and more Papers Algebra in PDF only on Docsity!

MATH 1111- MATH 1111-College AlgebraCollege Algebra

Data Analysis, Curve Fitting, andData Analysis, Curve Fitting, and

Linear RegressionLinear Regression

MATH MODELING MATH MODELING

bb When a realWhen a real--world problem can beworld problem can be

described in mathematical language, wedescribed in mathematical language, we

have ahave a mathematical modelmathematical model..

bb Often functions (equations) are used as theOften functions (equations) are used as the

mathematical model.mathematical model.

bb If the realIf the real--world data contains two variableworld data contains two variable

values, one dependent (y) upon thevalues, one dependent (y) upon the

independent value (x), the data forms (x,y)independent value (x), the data forms (x,y)

scatter points called a scatter plotscatter points called a scatter plot

For Evaluation Only.

Copyright (c) by Foxit Software Company, 2004

Edited by Foxit PDF Editor

Curve Fitting (Math Modeling) Curve Fitting (Math Modeling)

bb Mathematicians try to fit the realMathematicians try to fit the real--worldworld

scatter plot as closely as possible with ascatter plot as closely as possible with a

mathematical equation (function). This ismathematical equation (function). This is

called curve fitting or math modeling.called curve fitting or math modeling.

bb If the scatter plot data appears to mostly lieIf the scatter plot data appears to mostly lie

along a straight line, the data can bealong a straight line, the data can be

modeled with a linear equation. Fitting themodeled with a linear equation. Fitting the

data with a linear equation is called lineardata with a linear equation is called linear

regression.regression.

Linear Modeling by hand Linear Modeling by hand

bb Plot scatter data. IfPlot scatter data. If the data appears tothe data appears to fall along a line, handfall along a line, hand-- draw the line so that itdraw the line so that it appears closest toappears closest to most points. Choosemost points. Choose two points on the line.two points on the line. Use pointUse point--slope formslope form to write the equationto write the equation (linear model).(linear model).

Viewing the scatter plot Viewing the scatter plot

bb After data is enteredAfter data is entered into lists (L1 for x andinto lists (L1 for x and L2 for y leaving outL2 for y leaving out 1900, etc. )or( L2 for x1900, etc. )or( L2 for x and L3 for y), use 2ndand L3 for y), use 2nd y= which is [STATy= which is [STAT PLOT]; hit [ENTER]PLOT]; hit [ENTER]

bb Hit [ENTER] onHit [ENTER] on ONON,, arrow down and set xarrow down and set x-- list,ylist,y--list to L1,L2,... aslist to L1,L2,... as appropriateappropriate

Viewing scatter data continued Viewing scatter data continued

bb After setting xAfter setting x--list,ylist,y-- list to proper L1,L2,…list to proper L1,L2,… depending where (x,y)depending where (x,y) data was entered, hitdata was entered, hit [ZOOM 9] to see the[ZOOM 9] to see the scatter plot.scatter plot.

bb Plot scatter plot onPlot scatter plot on paper. Handpaper. Hand--draw adraw a “best fit” line as close“best fit” line as close to most points asto most points as possiblepossible

Developing Linear Model Developing Linear Model

bb Pick two points on linePick two points on line you drew. Let’syou drew. Let’s assume your line goesassume your line goes through (3,61.4) andthrough (3,61.4) and (7,74.8).(7,74.8).

bb Now write theNow write the equation of your lineequation of your line using pointusing point--slopeslope form. Put into slopeform. Put into slope-- intercept form.intercept form.

m y y m x x y x y x y x

= −− = = − = − − = − − = − = +

748 614 7 3

134 4 335

74 8 3 35 7 74 8 3 35 2345 335 5135

1 1

... (^). ( ) .. ( ) ... .. This is the linear model (equation) of the "best fit" line you drew through your scatter pl ot. Enter it into TI using y = 3.35x +51.35, hit graph to see line.

Using Linear Regression on TI83 Using Linear Regression on TI

bb You may also haveYou may also have TI83 find the linearTI83 find the linear model (equation) ofmodel (equation) of best fit. This is calledbest fit. This is called linear regression. Itlinear regression. It tries to find the linetries to find the line “closest” to most“closest” to most scatter points also.scatter points also. This equation will beThis equation will be slightly different thanslightly different than yours.yours.

Linear Regression continued Linear Regression continued

bb The calculator also produces a coefficientThe calculator also produces a coefficient

of linear correlation, r, called theof linear correlation, r, called the

correlation coefficient.correlation coefficient.

bb -1£-1£rr£1£

bb The closer to 1 orThe closer to 1 or --1 r is, the better fit the1 r is, the better fit the

model is for the data. A good fit is .9 ormodel is for the data. A good fit is .9 or --.9 or.9 or

closer to 1. Zero means does not fit data atcloser to 1. Zero means does not fit data at

all. Between .9 andall. Between .9 and --.9 is not a very good fit..9 is not a very good fit.

bb For this data, r=.986, so model is a good fit.For this data, r=.986, so model is a good fit.

Linear Regression continued Linear Regression continued

bb On TI83, you may alsoOn TI83, you may also have the TI83shave the TI83s equationequation automatically put intoautomatically put into y1,y2,…y1,y2,…

bb Clear y1 first. HitClear y1 first. Hit [STAT][CALC][4] [L2,L3,][STAT][CALC][4] [L2,L3,] [VARS] [Y[VARS] [Y--VARS]VARS] [ENTER] [ENTER] to pick[ENTER] [ENTER] to pick up y1, then hit [ENTER]up y1, then hit [ENTER]

Application of Linear Modeling Application of Linear Modeling

bb Fit a handFit a hand--drawn best fit line to the data ondrawn best fit line to the data on

the following slide. Write the equationthe following slide. Write the equation

(model) of the line you drew. Use your(model) of the line you drew. Use your

model to predict the number of cases ofmodel to predict the number of cases of

skin cancer in US in 1998, 2000, and 2010.skin cancer in US in 1998, 2000, and 2010.

bb Let the TI83 choose the line and find theLet the TI83 choose the line and find the

linear model by using the regressionlinear model by using the regression

feature on your TI83. Give the model. Is thefeature on your TI83. Give the model. Is the

model a “good fit”? How do you know?model a “good fit”? How do you know?

Cases of Skin Cancer in US Cases of Skin Cancer in US

Cases of Skin Cancer in US

Year Year, x Number of Cases,

y (in thousands)

Skin Cancer continued Skin Cancer continued

bb Using linearUsing linear regression on theregression on the TI83, the best fitTI83, the best fit model ismodel is y=230x+5800y=230x+

bb r=.997 which is veryr=.997 which is very close to 1 so theclose to 1 so the model is a very goodmodel is a very good fit and can be used tofit and can be used to predict into the future.predict into the future.

Data Analysis, Curve Fitting, and Data Analysis, Curve Fitting, and

Linear RegressionLinear Regression

concludedconcluded