SlideShare a Scribd company logo
1 of 22
Download to read offline
4.3 Fitting Linear Models to
Data
Chapter 4 Linear Functions
Concepts & Objectives
⚫ Objectives for this section are
⚫ Draw and interpret scatter diagrams.
⚫ Use a graphing utility to find the line of best fit.
⚫ Distinguish between linear and nonlinear relations.
⚫ Fit a regression line to a set of data and use the linear
model to make predictions.
Scatter Plots
⚫ A scatter plot is a graph of plotted points that may show
a relationship between two sets of data.
⚫ The data may or may not correlate, and the data may or
may not correlate to a linear model, but if it is linear, we
can draw conclusions based on our knowledge of linear
functions.
Scatter Plots
⚫ Example: The table shows the number of cricket chirps
in 15 seconds, for several different air temperatures, in
degrees Fahrenheit. Plot this data, and determine
whether the data appears to be linearly related.
Scatter Plots
⚫ Example: The table shows the number of cricket chirps
in 15 seconds, for several different air temperatures, in
degrees Fahrenheit. Plot this data, and determine
whether the data appears to be linearly related.
To plot this data, we need to let one row be x and one
row be y, and create a table in Desmos.
Scatter Plots (cont.)
⚫ The green dots suggest
that they may be a
trend.
⚫ We can see from the
trend that the number
of chirps increases as
the temperature
increases.
⚫ The trend appears to be
roughly linear, though
not perfectly so.
Finding the Line of Best Fit
⚫ Once we recognize a need for a linear function to model
the data, the next question would be “what is that linear
function?”
⚫ One way to approximate our linear function is to sketch
the line that seems to best fit the data. Then we can
extend the line until we can verify the y-intercept.
⚫ We can approximate the slope of the line by extending it
until we can estimate the rise over run.
Finding the Line of Best Fit (cont.)
⚫ Example (cont.): Find a linear function that fits the
cricket chirp data by “eyeballing” a line that seems to fit.
Finding the Line of Best Fit (cont.)
⚫ Example (cont.): Find a linear function that fits the
cricket chirp data by “eyeballing” a line that seems to fit.
From the graph, we could
try using the starting and
ending points (18.5, 52)
and (44, 80.5).
80.5 52
1.12
44 18.5
m
−
= 
−
( )
52 1.12 18.5
y x
− = −
1.12 31.28
y x
= +
Finding the Line of Best Fit (cont.)
⚫ Example (cont.): Find a linear function that fits the
cricket chirp data by “eyeballing” a line that seems to fit.
This gives a function of
where c is the number of chirps in 15
seconds, and T(c) is the temperature in
degrees Fahrenheit.
( ) 1.12 31.28
T c c
= +
Finding the Line of Best Fit (cont.)
⚫ Example (cont.): Find a linear function that fits the
cricket chirp data by linear regression in Desmos.
Assuming your table is labeled x1 and y1, type the
following into the next line in Desmos
and Desmos will generate the following:
1 1
~
y mx b
+
Finding the Line of Best Fit (cont.)
⚫ Example (cont.): Find a linear function that fits the
cricket chirp data by linear regression in Desmos.
What we want are the
numbers at the bottom:
m = 1.14316
b = 30.2806
These are our slope and
y-intercept, which gives
us the function:
( ) 1.14 30.28
T c c
= +
Interpolation vs. Extrapolation
⚫ While the data for most examples does not fall perfectly
on the line, the equation is our best estimate as to how
the relationship will behave outside of the values for
which we have data.
⚫ We use a process known as interpolation when we
predict a value inside the domain and range of the data.
⚫ The process of extrapolation is used when we predict a
value outside the domain and range of the data.
⚫ Predicting a value outside of the domain and range has
its limitations. When our model no applies after a
certain point, it is sometimes called model breakdown.
Interpolation vs. Extrapolation
Predict the temperature
when crickets are
chirping 30 times in 15
sec. Is this interpolation
or extrapolation?
Interpolation
Extrapolation
Interpolation vs. Extrapolation
Predict the temperature
when crickets are
chirping 30 times in 15
sec. Is this interpolation
or extrapolation?
Since 30 chirps are
inside the domain, it
would be interpolation.
Interpolation
Extrapolation
( ) ( )
30 1.14 30 30.28
64 F
T = +
 
Interpolation vs. Extrapolation
What about a
temperature of 40 F?
40 F is outside our
range, so this would be
extrapolation.
Interpolation
Extrapolation
40 1.14 30.28
1.14 9.72
8.5 chirps/15 min.
c
c
c
= +
=

Linear and Nonlinear Models
⚫ While the cricket data exhibited a strong linear trend,
other data can be nonlinear. Desmos (and other
calculators that compute linear regressions) can also
provide us with the correlation coefficient, which is a
measure of how closely the line fits the data, which is
conventionally labeled r.
⚫ The correlation coefficient provides an easy way to get
an idea of how close to a line the data falls. In our cricket
example, our r-value was 0.9509 (a straight line has an
r-value of 1).
Linear and Nonlinear Models
⚫ The figure below shows some large data sets with their
correlation coefficients.
⚫ The closer the value is to 0, the more scattered the data.
⚫ The closer the value is to 1 or –1, the less scattered the
data is.
Fitting a Regression Line
⚫ Example: Gasoline consumption in the United States has
been steadily increasing. Comsumption data from 1994
to 2004 is shown in the table. Determine whether the
trend is linear, and if so, find a model for the data. Use
the model to predict the consumption in 2008.
Fitting a Regression Line (cont.)
⚫ First, enter the table into Desmos. To make our data
easier to graph, let x represent years since 1994.
In order to see the graph, you will need
to adjust the settings of the graph (or just
zoom and pan until you see the data).
Fitting a Regression Line (cont.)
⚫ Using linear regression, we get the following
information:
⚫ Our function is thus
⚫ In 2008, x = 14, so ,
or 144.244 billion gallons of gasoline in 2008.
Our r-value is
0.9965, which is very
close to 1, which
suggests a very
strong increasing
linear trend.
( ) 2.209 113.318
C x x
= +
( ) ( )
14 2.209 14 113.318 144.244
C = + =
Classwork
⚫ College Algebra 2e
⚫ 4.3: 8-16 (even); 4.2: 32-44 (even); 4.1: 72-96 (x4)
⚫ 4.3 Classwork Check
⚫ Quiz 4.2

More Related Content

What's hot

5.1 Quadratic Functions
5.1 Quadratic Functions5.1 Quadratic Functions
5.1 Quadratic Functionssmiller5
 
Partial differential equations
Partial differential equationsPartial differential equations
Partial differential equationsaman1894
 
02 first order differential equations
02 first order differential equations02 first order differential equations
02 first order differential equationsvansi007
 
Eigen values and eigenvectors
Eigen values and eigenvectorsEigen values and eigenvectors
Eigen values and eigenvectorsAmit Singh
 
Terraces:Soil Water Conservation structure
Terraces:Soil Water Conservation structureTerraces:Soil Water Conservation structure
Terraces:Soil Water Conservation structureMoudud Hasan
 
Higher Maths 1.2.2 - Graphs and Transformations
Higher Maths 1.2.2 - Graphs and TransformationsHigher Maths 1.2.2 - Graphs and Transformations
Higher Maths 1.2.2 - Graphs and Transformationstimschmitz
 
3.1 Tool identification
3.1 Tool identification3.1 Tool identification
3.1 Tool identificationkelly_teesdale
 
Partial differential equation & its application.
Partial differential equation & its application.Partial differential equation & its application.
Partial differential equation & its application.isratzerin6
 
Laplace transforms
Laplace transforms Laplace transforms
Laplace transforms yash patel
 
Matrix of linear transformation
Matrix of linear transformationMatrix of linear transformation
Matrix of linear transformationbeenishbeenish
 
3.7 Inverse Functions
3.7 Inverse Functions3.7 Inverse Functions
3.7 Inverse Functionssmiller5
 
introduction to differential equations
introduction to differential equationsintroduction to differential equations
introduction to differential equationsEmdadul Haque Milon
 
Breadth first search and depth first search
Breadth first search and  depth first searchBreadth first search and  depth first search
Breadth first search and depth first searchHossain Md Shakhawat
 
Matrices and determinants
Matrices and determinantsMatrices and determinants
Matrices and determinantsoscar
 
Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method  Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method AMINULISLAM439
 

What's hot (20)

5.1 Quadratic Functions
5.1 Quadratic Functions5.1 Quadratic Functions
5.1 Quadratic Functions
 
Partial differential equations
Partial differential equationsPartial differential equations
Partial differential equations
 
02 first order differential equations
02 first order differential equations02 first order differential equations
02 first order differential equations
 
Eigen values and eigenvectors
Eigen values and eigenvectorsEigen values and eigenvectors
Eigen values and eigenvectors
 
Terraces:Soil Water Conservation structure
Terraces:Soil Water Conservation structureTerraces:Soil Water Conservation structure
Terraces:Soil Water Conservation structure
 
Higher Maths 1.2.2 - Graphs and Transformations
Higher Maths 1.2.2 - Graphs and TransformationsHigher Maths 1.2.2 - Graphs and Transformations
Higher Maths 1.2.2 - Graphs and Transformations
 
3.1 Tool identification
3.1 Tool identification3.1 Tool identification
3.1 Tool identification
 
Partial differential equation & its application.
Partial differential equation & its application.Partial differential equation & its application.
Partial differential equation & its application.
 
Laplace transforms
Laplace transforms Laplace transforms
Laplace transforms
 
Trees
TreesTrees
Trees
 
Matrix of linear transformation
Matrix of linear transformationMatrix of linear transformation
Matrix of linear transformation
 
3.7 Inverse Functions
3.7 Inverse Functions3.7 Inverse Functions
3.7 Inverse Functions
 
matrices basic operation.ppt
matrices basic operation.pptmatrices basic operation.ppt
matrices basic operation.ppt
 
introduction to differential equations
introduction to differential equationsintroduction to differential equations
introduction to differential equations
 
Breadth first search and depth first search
Breadth first search and  depth first searchBreadth first search and  depth first search
Breadth first search and depth first search
 
Determinants
DeterminantsDeterminants
Determinants
 
Homomorphisms
HomomorphismsHomomorphisms
Homomorphisms
 
Matrices and determinants
Matrices and determinantsMatrices and determinants
Matrices and determinants
 
Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method  Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method
 
Functions
FunctionsFunctions
Functions
 

Similar to 4.3 Fitting Linear Models to Data

Grade 11, U0-L3-Graphing
Grade 11, U0-L3-GraphingGrade 11, U0-L3-Graphing
Grade 11, U0-L3-Graphinggruszecki1
 
Java căn bản - Chapter3
Java căn bản - Chapter3Java căn bản - Chapter3
Java căn bản - Chapter3Vince Vo
 
Essay On Linear Function
Essay On Linear FunctionEssay On Linear Function
Essay On Linear FunctionAngie Lee
 
BUS 308 Week 4 Lecture 3 Developing Relationships in Exc.docx
  BUS 308 Week 4 Lecture 3 Developing Relationships in Exc.docx  BUS 308 Week 4 Lecture 3 Developing Relationships in Exc.docx
BUS 308 Week 4 Lecture 3 Developing Relationships in Exc.docxShiraPrater50
 
Brock Butlett Time Series-Great Lakes
Brock Butlett Time Series-Great Lakes Brock Butlett Time Series-Great Lakes
Brock Butlett Time Series-Great Lakes Brock Butlett
 
(8) Lesson 9.2
(8) Lesson 9.2(8) Lesson 9.2
(8) Lesson 9.2wzuri
 
Line uo,please
Line uo,pleaseLine uo,please
Line uo,pleaseheba_ahmad
 
Predicting US house prices using Multiple Linear Regression in R
Predicting US house prices using Multiple Linear Regression in RPredicting US house prices using Multiple Linear Regression in R
Predicting US house prices using Multiple Linear Regression in RSotiris Baratsas
 
Linear functions and modeling
Linear functions and modelingLinear functions and modeling
Linear functions and modelingIVY SOLIS
 
Application's of Numerical Math in CSE
Application's of Numerical Math in CSEApplication's of Numerical Math in CSE
Application's of Numerical Math in CSEsanjana mun
 
Simple Linear Regression with R
Simple Linear Regression with RSimple Linear Regression with R
Simple Linear Regression with RJerome Gomes
 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)Abhimanyu Dwivedi
 

Similar to 4.3 Fitting Linear Models to Data (20)

Grade 11, U0-L3-Graphing
Grade 11, U0-L3-GraphingGrade 11, U0-L3-Graphing
Grade 11, U0-L3-Graphing
 
R nonlinear least square
R   nonlinear least squareR   nonlinear least square
R nonlinear least square
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
R9
R9R9
R9
 
working with python
working with pythonworking with python
working with python
 
Java căn bản - Chapter3
Java căn bản - Chapter3Java căn bản - Chapter3
Java căn bản - Chapter3
 
Essay On Linear Function
Essay On Linear FunctionEssay On Linear Function
Essay On Linear Function
 
Correlation in Statistics
Correlation in StatisticsCorrelation in Statistics
Correlation in Statistics
 
BUS 308 Week 4 Lecture 3 Developing Relationships in Exc.docx
  BUS 308 Week 4 Lecture 3 Developing Relationships in Exc.docx  BUS 308 Week 4 Lecture 3 Developing Relationships in Exc.docx
BUS 308 Week 4 Lecture 3 Developing Relationships in Exc.docx
 
Chapter#8
Chapter#8Chapter#8
Chapter#8
 
Brock Butlett Time Series-Great Lakes
Brock Butlett Time Series-Great Lakes Brock Butlett Time Series-Great Lakes
Brock Butlett Time Series-Great Lakes
 
(8) Lesson 9.2
(8) Lesson 9.2(8) Lesson 9.2
(8) Lesson 9.2
 
Line uo,please
Line uo,pleaseLine uo,please
Line uo,please
 
Predicting US house prices using Multiple Linear Regression in R
Predicting US house prices using Multiple Linear Regression in RPredicting US house prices using Multiple Linear Regression in R
Predicting US house prices using Multiple Linear Regression in R
 
Linear functions and modeling
Linear functions and modelingLinear functions and modeling
Linear functions and modeling
 
Linear Regression
Linear RegressionLinear Regression
Linear Regression
 
Curvefitting
CurvefittingCurvefitting
Curvefitting
 
Application's of Numerical Math in CSE
Application's of Numerical Math in CSEApplication's of Numerical Math in CSE
Application's of Numerical Math in CSE
 
Simple Linear Regression with R
Simple Linear Regression with RSimple Linear Regression with R
Simple Linear Regression with R
 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)
 

More from smiller5

6.7 Exponential and Logarithmic Models
6.7 Exponential and Logarithmic Models6.7 Exponential and Logarithmic Models
6.7 Exponential and Logarithmic Modelssmiller5
 
4.5 Special Segments in Triangles
4.5 Special Segments in Triangles4.5 Special Segments in Triangles
4.5 Special Segments in Trianglessmiller5
 
1.4 Conditional Statements
1.4 Conditional Statements1.4 Conditional Statements
1.4 Conditional Statementssmiller5
 
1.3 Distance and Midpoint Formulas
1.3 Distance and Midpoint Formulas1.3 Distance and Midpoint Formulas
1.3 Distance and Midpoint Formulassmiller5
 
1.5 Quadratic Equations.pdf
1.5 Quadratic Equations.pdf1.5 Quadratic Equations.pdf
1.5 Quadratic Equations.pdfsmiller5
 
3.2 Graphs of Functions
3.2 Graphs of Functions3.2 Graphs of Functions
3.2 Graphs of Functionssmiller5
 
3.2 Graphs of Functions
3.2 Graphs of Functions3.2 Graphs of Functions
3.2 Graphs of Functionssmiller5
 
3.1 Functions
3.1 Functions3.1 Functions
3.1 Functionssmiller5
 
2.5 Transformations of Functions
2.5 Transformations of Functions2.5 Transformations of Functions
2.5 Transformations of Functionssmiller5
 
2.2 More on Functions and Their Graphs
2.2 More on Functions and Their Graphs2.2 More on Functions and Their Graphs
2.2 More on Functions and Their Graphssmiller5
 
1.6 Other Types of Equations
1.6 Other Types of Equations1.6 Other Types of Equations
1.6 Other Types of Equationssmiller5
 
1.5 Quadratic Equations (Review)
1.5 Quadratic Equations (Review)1.5 Quadratic Equations (Review)
1.5 Quadratic Equations (Review)smiller5
 
2.1 Basics of Functions and Their Graphs
2.1 Basics of Functions and Their Graphs2.1 Basics of Functions and Their Graphs
2.1 Basics of Functions and Their Graphssmiller5
 
9.6 Binomial Theorem
9.6 Binomial Theorem9.6 Binomial Theorem
9.6 Binomial Theoremsmiller5
 
13.3 Venn Diagrams & Two-Way Tables
13.3 Venn Diagrams & Two-Way Tables13.3 Venn Diagrams & Two-Way Tables
13.3 Venn Diagrams & Two-Way Tablessmiller5
 
13.2 Independent & Dependent Events
13.2 Independent & Dependent Events13.2 Independent & Dependent Events
13.2 Independent & Dependent Eventssmiller5
 
9.5 Counting Principles
9.5 Counting Principles9.5 Counting Principles
9.5 Counting Principlessmiller5
 
13.1 Geometric Probability
13.1 Geometric Probability13.1 Geometric Probability
13.1 Geometric Probabilitysmiller5
 
9.4 Series and Their Notations
9.4 Series and Their Notations9.4 Series and Their Notations
9.4 Series and Their Notationssmiller5
 
9.3 Geometric Sequences
9.3 Geometric Sequences9.3 Geometric Sequences
9.3 Geometric Sequencessmiller5
 

More from smiller5 (20)

6.7 Exponential and Logarithmic Models
6.7 Exponential and Logarithmic Models6.7 Exponential and Logarithmic Models
6.7 Exponential and Logarithmic Models
 
4.5 Special Segments in Triangles
4.5 Special Segments in Triangles4.5 Special Segments in Triangles
4.5 Special Segments in Triangles
 
1.4 Conditional Statements
1.4 Conditional Statements1.4 Conditional Statements
1.4 Conditional Statements
 
1.3 Distance and Midpoint Formulas
1.3 Distance and Midpoint Formulas1.3 Distance and Midpoint Formulas
1.3 Distance and Midpoint Formulas
 
1.5 Quadratic Equations.pdf
1.5 Quadratic Equations.pdf1.5 Quadratic Equations.pdf
1.5 Quadratic Equations.pdf
 
3.2 Graphs of Functions
3.2 Graphs of Functions3.2 Graphs of Functions
3.2 Graphs of Functions
 
3.2 Graphs of Functions
3.2 Graphs of Functions3.2 Graphs of Functions
3.2 Graphs of Functions
 
3.1 Functions
3.1 Functions3.1 Functions
3.1 Functions
 
2.5 Transformations of Functions
2.5 Transformations of Functions2.5 Transformations of Functions
2.5 Transformations of Functions
 
2.2 More on Functions and Their Graphs
2.2 More on Functions and Their Graphs2.2 More on Functions and Their Graphs
2.2 More on Functions and Their Graphs
 
1.6 Other Types of Equations
1.6 Other Types of Equations1.6 Other Types of Equations
1.6 Other Types of Equations
 
1.5 Quadratic Equations (Review)
1.5 Quadratic Equations (Review)1.5 Quadratic Equations (Review)
1.5 Quadratic Equations (Review)
 
2.1 Basics of Functions and Their Graphs
2.1 Basics of Functions and Their Graphs2.1 Basics of Functions and Their Graphs
2.1 Basics of Functions and Their Graphs
 
9.6 Binomial Theorem
9.6 Binomial Theorem9.6 Binomial Theorem
9.6 Binomial Theorem
 
13.3 Venn Diagrams & Two-Way Tables
13.3 Venn Diagrams & Two-Way Tables13.3 Venn Diagrams & Two-Way Tables
13.3 Venn Diagrams & Two-Way Tables
 
13.2 Independent & Dependent Events
13.2 Independent & Dependent Events13.2 Independent & Dependent Events
13.2 Independent & Dependent Events
 
9.5 Counting Principles
9.5 Counting Principles9.5 Counting Principles
9.5 Counting Principles
 
13.1 Geometric Probability
13.1 Geometric Probability13.1 Geometric Probability
13.1 Geometric Probability
 
9.4 Series and Their Notations
9.4 Series and Their Notations9.4 Series and Their Notations
9.4 Series and Their Notations
 
9.3 Geometric Sequences
9.3 Geometric Sequences9.3 Geometric Sequences
9.3 Geometric Sequences
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 

Recently uploaded (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 

4.3 Fitting Linear Models to Data

  • 1. 4.3 Fitting Linear Models to Data Chapter 4 Linear Functions
  • 2. Concepts & Objectives ⚫ Objectives for this section are ⚫ Draw and interpret scatter diagrams. ⚫ Use a graphing utility to find the line of best fit. ⚫ Distinguish between linear and nonlinear relations. ⚫ Fit a regression line to a set of data and use the linear model to make predictions.
  • 3. Scatter Plots ⚫ A scatter plot is a graph of plotted points that may show a relationship between two sets of data. ⚫ The data may or may not correlate, and the data may or may not correlate to a linear model, but if it is linear, we can draw conclusions based on our knowledge of linear functions.
  • 4. Scatter Plots ⚫ Example: The table shows the number of cricket chirps in 15 seconds, for several different air temperatures, in degrees Fahrenheit. Plot this data, and determine whether the data appears to be linearly related.
  • 5. Scatter Plots ⚫ Example: The table shows the number of cricket chirps in 15 seconds, for several different air temperatures, in degrees Fahrenheit. Plot this data, and determine whether the data appears to be linearly related. To plot this data, we need to let one row be x and one row be y, and create a table in Desmos.
  • 6. Scatter Plots (cont.) ⚫ The green dots suggest that they may be a trend. ⚫ We can see from the trend that the number of chirps increases as the temperature increases. ⚫ The trend appears to be roughly linear, though not perfectly so.
  • 7. Finding the Line of Best Fit ⚫ Once we recognize a need for a linear function to model the data, the next question would be “what is that linear function?” ⚫ One way to approximate our linear function is to sketch the line that seems to best fit the data. Then we can extend the line until we can verify the y-intercept. ⚫ We can approximate the slope of the line by extending it until we can estimate the rise over run.
  • 8. Finding the Line of Best Fit (cont.) ⚫ Example (cont.): Find a linear function that fits the cricket chirp data by “eyeballing” a line that seems to fit.
  • 9. Finding the Line of Best Fit (cont.) ⚫ Example (cont.): Find a linear function that fits the cricket chirp data by “eyeballing” a line that seems to fit. From the graph, we could try using the starting and ending points (18.5, 52) and (44, 80.5). 80.5 52 1.12 44 18.5 m − =  − ( ) 52 1.12 18.5 y x − = − 1.12 31.28 y x = +
  • 10. Finding the Line of Best Fit (cont.) ⚫ Example (cont.): Find a linear function that fits the cricket chirp data by “eyeballing” a line that seems to fit. This gives a function of where c is the number of chirps in 15 seconds, and T(c) is the temperature in degrees Fahrenheit. ( ) 1.12 31.28 T c c = +
  • 11. Finding the Line of Best Fit (cont.) ⚫ Example (cont.): Find a linear function that fits the cricket chirp data by linear regression in Desmos. Assuming your table is labeled x1 and y1, type the following into the next line in Desmos and Desmos will generate the following: 1 1 ~ y mx b +
  • 12. Finding the Line of Best Fit (cont.) ⚫ Example (cont.): Find a linear function that fits the cricket chirp data by linear regression in Desmos. What we want are the numbers at the bottom: m = 1.14316 b = 30.2806 These are our slope and y-intercept, which gives us the function: ( ) 1.14 30.28 T c c = +
  • 13. Interpolation vs. Extrapolation ⚫ While the data for most examples does not fall perfectly on the line, the equation is our best estimate as to how the relationship will behave outside of the values for which we have data. ⚫ We use a process known as interpolation when we predict a value inside the domain and range of the data. ⚫ The process of extrapolation is used when we predict a value outside the domain and range of the data. ⚫ Predicting a value outside of the domain and range has its limitations. When our model no applies after a certain point, it is sometimes called model breakdown.
  • 14. Interpolation vs. Extrapolation Predict the temperature when crickets are chirping 30 times in 15 sec. Is this interpolation or extrapolation? Interpolation Extrapolation
  • 15. Interpolation vs. Extrapolation Predict the temperature when crickets are chirping 30 times in 15 sec. Is this interpolation or extrapolation? Since 30 chirps are inside the domain, it would be interpolation. Interpolation Extrapolation ( ) ( ) 30 1.14 30 30.28 64 F T = +  
  • 16. Interpolation vs. Extrapolation What about a temperature of 40 F? 40 F is outside our range, so this would be extrapolation. Interpolation Extrapolation 40 1.14 30.28 1.14 9.72 8.5 chirps/15 min. c c c = + = 
  • 17. Linear and Nonlinear Models ⚫ While the cricket data exhibited a strong linear trend, other data can be nonlinear. Desmos (and other calculators that compute linear regressions) can also provide us with the correlation coefficient, which is a measure of how closely the line fits the data, which is conventionally labeled r. ⚫ The correlation coefficient provides an easy way to get an idea of how close to a line the data falls. In our cricket example, our r-value was 0.9509 (a straight line has an r-value of 1).
  • 18. Linear and Nonlinear Models ⚫ The figure below shows some large data sets with their correlation coefficients. ⚫ The closer the value is to 0, the more scattered the data. ⚫ The closer the value is to 1 or –1, the less scattered the data is.
  • 19. Fitting a Regression Line ⚫ Example: Gasoline consumption in the United States has been steadily increasing. Comsumption data from 1994 to 2004 is shown in the table. Determine whether the trend is linear, and if so, find a model for the data. Use the model to predict the consumption in 2008.
  • 20. Fitting a Regression Line (cont.) ⚫ First, enter the table into Desmos. To make our data easier to graph, let x represent years since 1994. In order to see the graph, you will need to adjust the settings of the graph (or just zoom and pan until you see the data).
  • 21. Fitting a Regression Line (cont.) ⚫ Using linear regression, we get the following information: ⚫ Our function is thus ⚫ In 2008, x = 14, so , or 144.244 billion gallons of gasoline in 2008. Our r-value is 0.9965, which is very close to 1, which suggests a very strong increasing linear trend. ( ) 2.209 113.318 C x x = + ( ) ( ) 14 2.209 14 113.318 144.244 C = + =
  • 22. Classwork ⚫ College Algebra 2e ⚫ 4.3: 8-16 (even); 4.2: 32-44 (even); 4.1: 72-96 (x4) ⚫ 4.3 Classwork Check ⚫ Quiz 4.2