4.3 Fitting Linear Models to Data

smiller5 444 views 22 slides Jul 16, 2022
Slide 1
Slide 1 of 22
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22

About This Presentation

* 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.


Slide Content

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.

ScatterPlots
⚫A scatter plotis a graph of plotted points that may show
a relationship between two sets of data.
⚫Thedatamayormaynotcorrelate, 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 xand 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.
⚫Thetrendappearstobe
roughlylinear, 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?”
⚫Onewaytoapproximateourlinearfunctionistosketch
thelinethatseemstobestfitthedata.Thenwecan
extendthelineuntilwecanverifythey-intercept.
⚫We canapproximate 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.
Fromthegraph,wecould
tryusingthestarting and
ending points (18.5, 52)
and (44, 80.5).80.552
1.12
4418.5
m

=
− ( )521.1218.5yx−=− 1.1231.28yx=+

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
wherecisthenumberofchirpsin15
seconds,andT(c)is the temperature in
degrees Fahrenheit.()1.1231.28Tcc=+

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 x
1and y
1, type the
following into the next line in Desmos
andDesmoswillgeneratethefollowing:11
~ymxb+

Finding the Line of Best Fit (cont.)
⚫Example (cont.): Find a linear function that fits the
cricket chirp data by linear regression in Desmos.
Whatwewantarethe
numbersatthebottom:
m= 1.14316
b= 30.2806
Theseareour slope and
y-intercept, which gives
us the function:()1.1430.28Tcc=+

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.
⚫Weuse a process known as interpolationwhen we
predict a value inside the domain and range of the data.
⚫Theprocess of extrapolationis used when we predict a
value outside the domain and range of the data.
⚫Predictingavalueoutside 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
Predictthetemperature
whencricketsare
chirping30timesin15
sec.Isthisinterpolation
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() ()301.143030.28
64F
T =+


Interpolation vs. Extrapolation
What about a
temperature of 40F?
40F is outside our
range, so this would be
extrapolation.
Interpolation
Extrapolation401.1430.28
1.149.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.
⚫Thecloser the value is to 0, the more scattered the data.
⚫Thecloserthe value isto1or–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 xrepresent 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
⚫In2008,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.209113.318Cxx=+ () ()142.20914113.318144.244C =+=

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
Tags