MX Algebra 4.3 Fitting Linear Models to Data

Section 4.34.3 Fitting Linear Models to Data

Corequisite Skills review (optional warm-up)

Learning Objectives

  • Plot points in a rectangular coordinate system (IA 3.1.1).
  • Find an equation of the line given two points (IA 3.3.3).

Objectives: Plot points in a rectangular coordinate system (IA 3.1.1) and find an equation of the line given two points. (IA 3.3.3)

In this section we will be plotting collections of data points and looking for patterns in these data sets. A scatterplot is a collection of points plotted on the same coordinate system. When trying to fit a function to a data set it is important to note if there is a pattern to the data set and whether that pattern is linear or nonlinear. If the dependent variable increases as the independent variable increases, we call this a positive association. If the dependent variable decreases as the independent variable increases, we call this a negative association.

Plot points in a rectangular coordinate system, then find a line through two of the data points.

Try It #1

A precalculus instructor is looking at a random sample of students to see if there is a relationship between the number of hours spent working in a homework platform for a given chapter, and the score for the chapter exam.

Table 1
Hours spent doing homework, x10801321115918
Exam score, y726838809376627185

ⓐ Plot each of the data points on a coordinate system below. You may either plot the points by hand or using a graphing utility. Be sure to label your x and y axes.

Scatter plot, titled 'Final Exam Score VS Age'. The x-axis is the age, and the y-axis is the final exam score. The range of ages are between 20s - 50s, and the range for scores are between upper 50s and 90s.

ⓑ Observe any patterns in the data points. Do you think the association between the variables is positive or negative? Is the pattern linear or nonlinear?

ⓒ What would you suggest to a friend enrolled in this course based on the data set you graphed?

ⓓ Choose two points that seem to represent the general pattern in the data set. Write these points as ordered pairs below.
\((\,,\,)\)
\((\,,\,)\)

ⓔ Find the slope of a line passing through these two points. Interpret its value in terms of the variables being measured.
\(m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}=\)

ⓕUse point-slope form or slope intercept form to write the equation of the line passing through these data points.
\(y-{y}_{1}=m(x-{x}_{1})\) or \(y=mx+b\)

ⓖ Write this equation in slope-intercept form.
\(y=mx+b\)

ⓗ Rewrite this equation using function notation.
\(f(x)=\)

ⓘ This equation is a linear model. Sketch the line on the graph created in part a.

ⓙ Use this mathematical linear model to predict the exam score for a student who spent 15 hours working on this chapter in their homework system. Show your work below.

Did you get it?

Practice Makes Perfect

P1

The data below shows the relationship between the mass of an automobile (measured in kg) and the fuel efficiency of the car (measured in miles per gallon) for 7 automobiles.

Table 2
Mass (kg), x1305115019251628150614521835
Fuel Efficiency (MPG), y27281524232519

ⓐ Draw a scatter plot (by hand or using a graphing utility) for the data provided being sure to label your axes.

ⓑ Does the data appear to be linearly related? Is the association between the variables positive or negative?

ⓒ Choose two points that seem to represent the general pattern in the data set. Write these points as ordered pairs below.
\((\,,\,)\)
\((\,,\,)\)

ⓓ Write the equation of the line passing through the points you listed in part c. in slope intercept form. Show your work below.

ⓔ Use the linear function you found in part d. to predict the fuel efficiency of an Audi A5 Quattro whose mass is 1610 kg.

P2

The data set below shows the relationship between the number of hours worked and the tips received by Nyla, a server at Pi Pizzeria.

Table 3
Hours worked in a week, x10152025303540
Tips received, y$66$100$118$160$190$235$272

ⓐ Draw a scatter plot (by hand or using a graphing utility) for the data provided being sure to label your axes.

ⓑ Does the data appear to be linearly related? Is the association between the variables positive or negative?

ⓒ Choose two points that seem to represent the general pattern in the data set. Write these points as ordered pairs below.
\((\,,\,)\)
\((\,,\,)\)

ⓓ Write the equation of the line passing through the points you listed in part c. in slope intercept form. Show your work below.

ⓔ Based on the linear function you found in part d, how much could Nyla expect to make in tips if they work 38 hours in a given week?

A professor is attempting to identify trends among final exam scores. His class has a mixture of students, so he wonders if there is any relationship between age and final exam scores. One way for him to analyze the scores is by creating a diagram that relates the age of each student to the exam score received. In this section, we will examine one such diagram known as a scatter plot.

Drawing and Interpreting Scatter Plots

A scatter plot is a graph of plotted points that may show a relationship between two sets of data. If the relationship is from a linear model, or a model that is nearly linear, the professor can draw conclusions using his knowledge of linear functions. Figure 1 shows a sample scatter plot.

Scatter plot, titled 'Final Exam Score VS Age'. The x-axis is the age, and the y-axis is the final exam score. The range of ages are between 20s - 50s, and the range for scores are between upper 50s and 90s.
Figure 1 — A scatter plot of age and final exam score variables

Notice this scatter plot does not indicate a linear relationship. The points do not appear to follow a trend. In other words, there does not appear to be a relationship between the age of the student and the score on the final exam.

Example 1

The table below shows the number of cricket chirps in 15 seconds, for several different air temperatures, in degrees Fahrenheit (Selected data from http://classic.globe.gov/fsl/scientistsblog/2007/10/. Retrieved Aug 3, 2010). Plot this data, and determine whether the data appears to be linearly related.

Table 4
Chirps443520.433313518.53726
Temperature80.570.5576668725273.553

Plot the (chirps, temperature) pairs and look at whether they roughly trace a straight line.

Plotting this data, as depicted in Figure 2 suggests that there may be a trend. We can see from the trend in the data that the number of chirps increases as the temperature increases. The trend appears to be roughly linear, though certainly not perfectly so.

Scatter plot, titled 'Cricket Chirps vs. Air Temperature'. The x-axis is the Cricket Chirps in 15 Seconds, and the y-axis is the Temperature (F). The line regression is generally positive.
Figure 2

Finding the Line of Best Fit

Once we recognize a need for a linear function to model that data, the natural follow-up question is “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 \(\frac{\text{rise}}{\text{run}}.\)

Example 2

Find a linear function that fits the data in Table 4 by “eyeballing” a line that seems to fit.

Pick two points that look like they sit on your hand-drawn line, then use them to find the slope and y-intercept.

On a graph, we could try sketching a line. Using the starting and ending points of our hand drawn line, points (0, 30) and (50, 90), this graph has a slope of

\[\begin{array}{lll}m & = & \frac{60}{50} \\ & = & 1.2\end{array}\]

and a y-intercept at 30. This gives an equation of

\[T(c)=1.2c+30\]

where \(c\) is the number of chirps in 15 seconds, and \(T(c)\) is the temperature in degrees Fahrenheit. The resulting equation is represented in Figure 3.

Scatter plot, showing the line of best fit: T(c) = 1.2c + 30. It is titled 'Cricket Chirps Vs Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.
Figure 3
Analysis

This linear equation can then be used to approximate answers to various questions we might ask about the trend.

Recognizing Interpolation or Extrapolation

While the data for most examples does not fall perfectly on the line, the equation is our best guess as to how the relationship will behave outside of the values for which we have data. We use a process known as interpolationwhen we predict a value inside the domain and range of the data. The process of extrapolationis used when we predict a value outside the domain and range of the data.

Figure 4 compares the two processes for the cricket-chirp data addressed in Example 2. We can see that interpolation would occur if we used our model to predict temperature when the values for chirps are between 18.5 and 44. Extrapolation would occur if we used our model to predict temperature when the values for chirps are less than 18.5 or greater than 44.

There is a difference between making predictions inside the domain and range of values for which we have data and outside that domain and range. Predicting a value outside of the domain and range has its limitations. When our model no longer applies after a certain point, it is sometimes called model breakdown. For example, predicting a cost function for a period of two years may involve examining the data where the input is the time in years and the output is the cost. But if we try to extrapolate a cost when \(x=50,\) that is in 50 years, the model would not apply because we could not account for factors fifty years in the future.

Scatter plot, showing the line of best fit. It is titled 'Cricket Chirps Vs Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.  The area around the scattered points is enclosed in a box labeled: Interpolation.  The area outside of this box is labeled: Extrapolation.
Figure 4 — Interpolation occurs within the domain and range of the provided data whereas extrapolation occurs outside.
Interpolation and Extrapolation

Different methods of making predictions are used to analyze data.

The method of interpolation involves predicting a value inside the domain and/or range of the data.
The method of extrapolation involves predicting a value outside the domain and/or range of the data.
Model breakdown occurs at the point when the model no longer applies.

Example 3

Use the cricket data from Table 4 to answer the following questions:

  • ⓐWould predicting the temperature when crickets are chirping 30 times in 15 seconds be interpolation or extrapolation? Make the prediction, and discuss whether it is reasonable.
  • ⓑWould predicting the number of chirps crickets will make at 40 degrees be interpolation or extrapolation? Make the prediction, and discuss whether it is reasonable.

Check whether the input value falls inside or outside the range of the original data before deciding which term applies.

  • ⓐThe number of chirps in the data provided varied from 18.5 to 44. A prediction at 30 chirps per 15 seconds is inside the domain of our data, so would be interpolation. Using our model:Based on the data we have, this value seems reasonable.

    \[\begin{array}{lll}\text{T (30)} & = & \text{30 + 1.2(30)} \\ & = & \text{66 degrees}\end{array}\]

    Based on the data we have, this value seems reasonable.

  • ⓑThe temperature values varied from 52 to 80.5. Predicting the number of chirps at 40 degrees is extrapolation because 40 is outside the range of our data. Using our model:

    \[\begin{array}{l}40=30+1.2c \\ 10=1.2c \\ \,\,c\approx 8.33\end{array}\]

We can compare the regions of interpolation and extrapolation using Figure 5.

Scatter plot, showing the line of best fit and where interpolation and extrapolation occurs. It is titled 'Cricket Chirps vs. Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.  An additional point is plotted inside of the box to represent an interpolated point.  There is another additional point plotted outside of the box to represent an extrapolated point.
Figure 5
Analysis

Our model predicts the crickets would chirp 8.33 times in 15 seconds. While this might be possible, we have no reason to believe our model is valid outside the domain and range. In fact, generally crickets stop chirping altogether below around 50 degrees.

Try It #2

According to the data from Table 4, what temperature can we predict it is if we counted 20 chirps in 15 seconds?

\(54°\text{F}\)

Did you get it?

Finding the Line of Best Fit Using a Graphing Utility

While eyeballing a line works reasonably well, there are statistical techniques for fitting a line to data that minimize the differences between the line and data values (Technically, the method minimizes the sum of the squared differences in the vertical direction between the line and the data values.). One such technique is called least squares regression and can be computed by many graphing calculators, spreadsheet software, statistical software, and many web-based calculators (For example, http://www.shodor.org/unchem/math/lls/leastsq.html). Least squares regression is one means to determine the line that best fits the data, and here we will refer to this method as linear regression.

How To

Given data of input and corresponding outputs from a linear function, find the best fit line using linear regression.

  • Enter the input in List 1 (L1).
  • Enter the output in List 2 (L2).
  • On a graphing utility, select Linear Regression (LinReg).
Example 4

Find the least squares regression line using the cricket-chirp data in Table 5.

Enter the chirps as L1 and temperatures as L2, then run the calculator's linear regression feature.

  • Enter the input (chirps) in List 1 (L1).
  • Enter the output (temperature) in List 2 (L2). See Table 5.
    Table 5
    L1443520.433313518.53726
    L280.570.5576668725273.553
  • On a graphing utility, select Linear Regression (LinReg). Using the cricket chirp data from earlier, with technology we obtain the equation:

\[T(c)=30.281+1.143c\]

Analysis

Notice that this line is quite similar to the equation we “eyeballed” but should fit the data better. Notice also that using this equation would change our prediction for the temperature when hearing 30 chirps in 15 seconds from 66 degrees to:

\[\begin{array}{l}T(30)=30.281+1.143(30) \\ \,\,=64.571 \\ \,\,\approx 64.6\,\text{degrees}\end{array}\]

The graph of the scatter plot with the least squares regression line is shown in Figure 6.

Scatter plot, showing the line of best fit: T(c) = 30.281 + 1.143c. It is titled 'Cricket Chirps vs. Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.
Figure 6
Q&A

Will there ever be a case where two different lines will serve as the best fit for the data?

No. There is only one best fit line.

Distinguishing Between Linear and Nonlinear Models

As we saw above with the cricket-chirp model, some data exhibit strong linear trends, but other data, like the final exam scores plotted by age, are clearly nonlinear. Most calculators and computer software can also provide us with the correlation coefficient, which is a measure of how closely the line fits the data. Many graphing calculators require the user to turn a "diagnostic on" selection to find the correlation coefficient, which mathematicians label as \(r\) The correlation coefficient provides an easy way to get an idea of how close to a line the data falls.

We should compute the correlation coefficient only for data that follows a linear pattern or to determine the degree to which a data set is linear. If the data exhibits a nonlinear pattern, the correlation coefficient for a linear regression is meaningless. To get a sense for the relationship between the value of \(r\) and the graph of the data, Figure 7 shows some large data sets with their correlation coefficients. Remember, for all plots, the horizontal axis shows the input and the vertical axis shows the output.

Correlation coefficients values range from -1.0 - 1.0.  Collections of dots representing an example of each kind of correlation coefficient are plotted underneath them.  The closer to 1.0 the more the points are grouped tightly to form a line in the positive direction.  The closer to -1.0 the more the points are grouped tightly to form a line in the negative direction.  The closer to 0 the points are very scattered and do not form a line.  Several shapes are displayed at the bottom row, none of which are lines, but all of them have values of 0.
Figure 7 — Plotted data and related correlation coefficients. (credit: “DenisBoigelot,” Wikimedia Commons)
Correlation Coefficient

The correlation coefficient is a value, \(r,\) between –1 and 1.

  • \(r>0\) suggests a positive (increasing) relationship
  • \(r<0\) suggests a negative (decreasing) relationship
  • 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.
Example 5

Calculate the correlation coefficient for cricket-chirp data in Table 4.

Run the same linear regression as before — the calculator reports r alongside the slope and intercept.

Because the data appear to follow a linear pattern, we can use technology to calculate \(r\) Enter the inputs and corresponding outputs and select the Linear Regression. The calculator will also provide you with the correlation coefficient, \(r=0.9509.\) This value is very close to 1, which suggests a strong increasing linear relationship.

Note: For some calculators, the Diagnostics must be turned "on" in order to get the correlation coefficient when linear regression is performed: [2nd]>[0]>[alpha][x–1], then scroll to DIAGNOSTICSON.

Fitting a Regression Line to a Set of Data

Once we determine that a set of data is linear using the correlation coefficient, we can use the regression line to make predictions. As we learned above, a regression line is a line that is closest to the data in the scatter plot, which means that only one such line is a best fit for the data.

Example 6

Gasoline consumption in the United States has been steadily increasing. Consumption data from 1994 to 2004 is shown in Table 6. (http://www.bts.gov/publications/national_transportation_statistics/2005/html/table_04_10.html) Determine whether the trend is linear, and if so, find a model for the data. Use the model to predict the consumption in 2008.

Table 6
Year'94'95'96'97'98'99'00'01'02'03'04
Consumption (billions of gallons)113116118119123125126128131133136

The scatter plot of the data, including the least squares regression line, is shown in Figure 8.

Scatter plot, showing the line of best fit. It is titled 'Gas Consumption VS Year'. The x-axis is 'Year After 1994', and the y-axis is 'Gas Consumption (billions of gallons)'. The points are strongly positively correlated and the line of best fit goes through most of the points completely.
Figure 8

Let t be years since 1994, run linear regression on the data, then evaluate the resulting equation at t=14.

We can introduce a new input variable, \(t,\) representing years since 1994.

The least squares regression equation is:

\[C(t)=113.318+2.209t\]

Using technology, the correlation coefficient was calculated to be 0.9965, suggesting a very strong increasing linear trend.

Using this to predict consumption in 2008 \((t=14),\)

\[\begin{array}{l}C(14)=113.318+2.209(14) \\ \,\,=144.244\end{array}\]

The model predicts 144.244 billion gallons of gasoline consumption in 2008.

Try It #3

Use the model we created using technology in Example 6 to predict the gas consumption in 2011. Is this an interpolation or an extrapolation?

150.871 billion gallons; extrapolation

Did you get it?
Media

Access these online resources for additional instruction and practice with fitting linear models to data.

Key Concepts

Section Exercises

Verbal

1

Describe what it means if there is a model breakdown when using a linear model.

When our model no longer applies, after some value in the domain, the model itself doesn’t hold.

2

What is interpolation when using a linear model?

3

What is extrapolation when using a linear model?

We predict a value outside the domain and range of the data.

4

Explain the difference between a positive and a negative correlation coefficient.

5

Explain how to interpret the absolute value of a correlation coefficient.

The closer the number is to 1, the less scattered the data, the closer the number is to 0, the more scattered the data.

Algebraic

6

A regression was run to determine whether there is a relationship between hours of TV watched per day \((x)\) and number of sit-ups a person can do \((y).\) The results of the regression are given below. Use this to predict the number of sit-ups a person who watches 11 hours of TV can do.

\[\begin{array}{l}y=ax+b \\ a=-1.341 \\ b=32.234 \\ \,\,r=-0.896\end{array}\]

7

A regression was run to determine whether there is a relationship between the diameter of a tree ( \(x\) , in inches) and the tree’s age ( \(y\) , in years). The results of the regression are given below. Use this to predict the age of a tree with diameter 10 inches.

\[\begin{array}{l}y=ax+b \\ a=6.301 \\ b=-1.044 \\ \,\,r=0.970\end{array}\]

61.966 years

For the following exercises, draw a scatter plot for the data provided. Does the data appear to be linearly related?

8
Table 7
0246810
–22–19–15–11–6–2
9
Table 8
123456
46505975100136
Scatter plot with a collection of points appearing at (1,46); (2,50); (3,59); (4,75); (5, 100); and (6,136); they do not appear linear

No.

10
Table 9
100250300450600750
1212.613.11414.515.2
11
Table 10
1357911
192865125216
Scatterplot with a collection of points at (1,1); (3,9); (5,28); (7,65); (9,125); and (11,216); they do not appear linear

No.

12

For the following data, draw a scatter plot. If we wanted to know when the population would reach 15,000, would the answer involve interpolation or extrapolation? Eyeball the line, and estimate the answer.

Table 11
YearPopulation
199011,500
199512,100
200012,700
200513,000
201013,750
13

For the following data, draw a scatter plot. If we wanted to know when the temperature would reach 28°F, would the answer involve interpolation or extrapolation? Eyeball the line and estimate the answer.

Table 12
Temperature,°F1618202530
Time, seconds4650545562
Scatterplot with a collection of points at (16,46); (18,50); (20,54); (25,55); and (30,62); they appear nonlinear

Interpolation. About \(60°F.\)

Graphical

For the following exercises, match each scatterplot with one of the four specified correlations in Figure 9 and Figure 10.

Side-by-side scatter plots.  The first is a scattered correlation in the positive direction.  The second is a scattered correlation in the negative direction
Figure 9
Side-by-side scatter plots.  The first has a strong negative correlation with all the points spaced out evenly near the top and center, but more spread out near the bottom.  The second has a strong positive correlation, with the points more spread out near the bottom and closer together near the center and top.
Figure 10
14

\(r=0.\text{95}\)

15

\(r=-0.\text{89}\)

\(\text{This value of r indicates a strong negative correlation or slope, so C}\)

16

\(r=-0.26\)

17

\(r=-0.39\)

\(\text{This value of r indicates a weak negative correlation, so B}\)

For the following exercises, draw a best-fit line for the plotted data.

18
Scatter plot with a domain of 0 to 10 and a range of 4 to 9.  The points are at (0,5); (2.1,4.2); (3.5,6); (4.5,6.5); (5.5,6.8); (7,7.4); (8,8.5); (9,8); and (10,9).
19
Scatter plot with a domain of 0 to 10 and a range of -1 to 4.  The points are at (0,1.5); (1.5, -0.1); (2.1,1.9); (3.4, 1.5); (4.5,2.5); (5.8,2.2); (6.8,3.8); (7.8,3.6); (8.8,2); and (10,2.4).
Scatter plot with domain 0 to 10 and a range from -1 to 4 with the line of best fit drawn going through the points: (0,1.5); (1.5, -0.1); (2.1,1.9); (3.4, 1.5); (4.5,2.5); (5.8,2.2); (6.8,3.8); (7.8,3.6); (8.8,2); and (10,2.4).
20
Scatter plot with a domain of 0 to 10 and range of 0 to 7 with the points: (0,7.3); (1,7); (2.2,6); (3.6,7); (4.8,6.2); (5.8,4); (6.6,3.8); (7.9,2.4); (8.8,2); and (10,0.1).
21
Scatter plot with a domain of 0 to 10 and a range of 2 to 6 with the points: (0,2.1); (1,3.9); (2.1,3.6); (3.6,3.9); (4.4,4); (5.6,4.2); (6.8,5); (7.8,5); (9,5.6); and (10,6).
Scatter plot with a domain of 0 to 10 and a range of 2 to 6 and the line of best fit going through the points: (0,2.1); (1,3.9); (2.1,3.6); (3.6,3.9); (4.4,4); (5.6,4.2); (6.8,5); (7.8,5); (9,5.6); and (10,6)

Numeric

22

The U.S. Census tracks the percentage of persons 25 years or older who are college graduates. That data for several years is given in Table 13. (Based on data from http://www.census.gov/hhes/socdemo/education/data/cps/historical/index.html. Accessed 5/1/2014.) Determine whether the trend appears linear. If so, and assuming the trend continues, in what year will the percentage exceed 35%?

Table 13
YearPercent Graduates
199021.3
199221.4
199422.2
199623.6
199824.4
200025.6
200226.7
200427.7
200628
200829.4
23

The U.S. import of wine (in hectoliters) for several years is given in Table 14. Determine whether the trend appears linear. If so, and assuming the trend continues, in what year will imports exceed 12,000 hectoliters?

Table 14
YearImports
19922665
19942688
19963565
19984129
20004584
20025655
20046549
20067950
20088487
20099462

Yes, trend appears linear because \(r=0.\text{985}\) and will exceed 12,000 near midyear, 2016, 24.6 years since 1992.

24

Table 15 shows the year and the number of people unemployed in a particular city for several years. Determine whether the trend appears linear. If so, and assuming the trend continues, in what year will the number of unemployed reach 5?

Table 15
YearNumber Unemployed
1990750
1992670
1994650
1996605
1998550
2000510
2002460
2004420
2006380
2008320

Technology

For the following exercises, use each set of data to calculate the regression line using a calculator or other technology tool, and determine the correlation coefficient to 3 decimal places of accuracy.

25
Table 16
\(x\)815263156
\(y\)23415372103

\(y=\text{1}.\text{64}0x+\text{13}.\text{8}00,\) \(r=0.\text{987}\)

26
Table 17
\(x\)57101215
\(y\)412172224
27
Table 18
\(x\)\(y\)\(x\)\(y\)
321.91018.54
422.221115.76
522.741213.68
622.261314.1
720.781414.02
817.61511.94
916.521612.76

\(y=-0.962x+26.86, r=-0.965\)

28
Table 19
\(x\)\(y\)
444.8
543.1
638.8
739
838
932.7
1030.1
1129.3
1227
1325.8
29
Table 20
\(x\)212530314050
\(y\)17112–1–18–40

\(y=-\text{1}.\text{981}x+\text{6}0.\text{197;}\) \(r=-0.\text{998}\)

30
Table 21
\(x\)\(y\)
1002000
801798
601589
551580
401390
201202
31
Table 22
\(x\)9009881000101012001205
\(y\)70808284105108

\(y=0.\text{121}x-38.841,r=0.998\)

Extensions

32

Graph \(f(x)=0.5x+10.\) Pick a set of five ordered pairs using inputs \(x=-2,\text{1},\text{5},\text{6},9\) and use linear regression to verify that the function is a good fit for the data.

33

Graph \(f(x)=-2x-10.\) Pick a set of five ordered pairs using inputs \(x=-2,\text{1},\text{5},\text{6},9\) and use linear regression to verify the function.

\((-2,-6),(1,\text{-12}),(5,-20),(6,\text{-22}),(9,\text{-28});\) Yes, the function is a good fit.

For the following exercises, consider this scenario: The profit of a company decreased steadily over a ten-year span. The following ordered pairs shows dollars and the number of units sold in hundreds and the profit in thousands of dollars over the ten-year span, (number of units sold, profit) for specific recorded years:

\((46,1,600),(48,1,550),(50,1,505),(52,1,540),(54,1,495).\)

34

Use linear regression to determine a function \(P\) where the profit in thousands of dollars depends on the number of units sold in hundreds.

35

Find to the nearest tenth and interpret the x-intercept.

\((\text{189}.8,0)\) If 18,980 units are sold, the company will have a profit of zero dollars.

36

Find to the nearest tenth and interpret the y-intercept.

Real-World Applications

For the following exercises, consider this scenario: The population of a city increased steadily over a ten-year span. The following ordered pairs shows the population and the year over the ten-year span, (population, year) for specific recorded years:

\((\text{25}00,2000),(\text{265}0,2001),(3000,2003),(\text{35}00,2006),(\text{42}00,2010)\)

37

Use linear regression to determine a function \(y,\) where the year depends on the population. Round to three decimal places of accuracy.

\(y=0.00587x+\text{1985}.4\text{1}\)

38

Predict when the population will hit 8,000.

For the following exercises, consider this scenario: The profit of a company increased steadily over a ten-year span. The following ordered pairs show the number of units sold in hundreds and the profit in thousands of dollars over the ten year span, (number of units sold, profit) for specific recorded years:

\((\text{46},\text{25}0),(\text{48},\text{3}05),(50,\text{35}0),(\text{52},\text{39}0),(\text{54},\text{41}0).\)

39

Use linear regression to determine a function y, where the profit in thousands of dollars depends on the number of units sold in hundreds.

\(y=\text{2}0.\text{25}x-\text{671}.\text{5}\)

40

Predict when the profit will exceed one million dollars.

For the following exercises, consider this scenario: The profit of a company decreased steadily over a ten-year span. The following ordered pairs show dollars and the number of units sold in hundreds and the profit in thousands of dollars over the ten-year span (number of units sold, profit) for specific recorded years:

\((\text{46},\text{25}0),(\text{48},\text{225}),(50,\text{2}05),(\text{52},\text{18}0),(\text{54},\text{165}).\)

41

Use linear regression to determine a function y, where the profit in thousands of dollars depends on the number of units sold in hundreds.

\(y=-\text{1}0.\text{75}x+\text{742}.\text{5}0\)

42

Predict when the profit will dip below the $25,000 threshold.

Chapter Review Exercises

Linear Functions

1

Determine whether the algebraic equation is linear. \(2x+3y=7\)

Yes

2

Determine whether the algebraic equation is linear. \(6{x}^{2}-y=5\)

3

Determine whether the function is increasing or decreasing.

\(f(x)=7x-2\)

Increasing

4

Determine whether the function is increasing or decreasing.

\(g(x)=-x+2\)

5

Given each set of information, find a linear equation that satisfies the given conditions, if possible.

Passes through \((\text{7},\text{5})\) and \((\text{3},\text{17})\)

\(y=-\text{3}x+\text{26}\)

6

Given each set of information, find a linear equation that satisfies the given conditions, if possible.

x-intercept at \((\text{6},0)\) and y-intercept at \((0,\text{1}0)\)

7

Find the slope of the line shown in the graph.

This is a graph of an increasing line with a y-intercept of -3 and x-intercept of 1 on an x, y coordinate plane.  The x and y-axis range from -6 to 6.

3

8

Find the slope of the line graphed.

This is a graph of a line with a y-intercept of -2 and no x-intercepts on an x, y coordinate plane.  The x- and y-axis range from -6 to 6
9

Write an equation in slope-intercept form for the line shown.

This is a graph of a line with a y-intercept of -2 and x-intercept of 1 on an x, y coordinate plane.  The x- and y-axis both range from -6 to 6.

\(y=\text{2}x-\text{2}\)

10

Does the following table represent a linear function? If so, find the linear equation that models the data.

Table 23
x–40210
g(x)18–2–12–52
11

Does the following table represent a linear function? If so, find the linear equation that models the data.

Table 24
x681226
g(x)–8–12–18–46

Not linear.

12

On June 1st, a company has $4,000,000 profit. If the company then loses 150,000 dollars per day thereafter in the month of June, what is the company’s profit nthday after June 1st?

For the following exercises, determine whether the lines given by the equations below are parallel, perpendicular, or neither parallel nor perpendicular:

13

\(\begin{array}{l}2x-6y=12 \\ -x+3y=1\end{array}\)

parallel

14

\(\begin{array}{l}y=\frac{1}{3}x-2 \\ 3x+y=-9\end{array}\)

For the following exercises, find the x- and y- intercepts of the given equation

15

\(7x+9y=-63\)

\((-9,0);(0,-7)\)

16

\(f(x)=2x-1\)

For the following exercises, use the descriptions of the pairs of lines to find the slopes of Line 1 and Line 2. Is each pair of lines parallel, perpendicular, or neither?

17

Line 1: Passes through \((5,11)\) and \((10,1)\)

Line 2: Passes through \((-1,3)\) and \((-5,11)\)

Line 1: \(m=-2;\) Line 2: \(m=-2;\) Parallel

18

Line 1: Passes through \((8,-10)\) and \((0,-26)\)

Line 2: Passes through \((2,5)\) and \((4,4)\)

19

Write an equation for a line perpendicular to \(f(x)=5x-1\) and passing through the point (5, 20).

\(y=-0.2x+21\)

20

Find the equation of a line with a y- intercept of \((0,2)\) and slope \(-\frac{1}{2}.\)

21

Sketch a graph of the linear function \(f(t)=2t-5.\)


This is a graph of f of t = 2 times t minus 5 on a x, y coordinate plane.  The x-axis ranges from -4 to 6 and the y-axis ranges from -6 to 6. The curve is an increasing linear function that goes through the points (0,-5) and (2.5,0).
22

Find the point of intersection for the 2 linear functions: \(\begin{array}{l}x=y+6 \\ 2x-y=13\end{array}.\)

23

A car rental company offers two plans for renting a car.

Plan A: 25 dollars per day and 10 cents per mile

Plan B: 50 dollars per day with free unlimited mileage

How many miles would you need to drive for plan B to save you money?

More than 250

Modeling with Linear Functions

24

Find the area of a triangle bounded by the y axis, the line \(f(x)=10-2x,\) and the line perpendicular to \(f\) that passes through the origin.

25

A town’s population increases at a constant rate. In 2010 the population was 55,000. By 2012 the population had increased to 76,000. If this trend continues, predict the population in 2016.

118,000

26

The number of people afflicted with the common cold in the winter months dropped steadily by 50 each year since 2004 until 2010. In 2004, 875 people were inflicted.

Find the linear function that models the number of people afflicted with the common cold C as a function of the year, \(t.\) When will no one be afflicted?

For the following exercises, use the graph in Figure 11 showing the profit, \(y,\) in thousands of dollars, of a company in a given year, \(x,\) where \(x\) represents years since 1980.

This graph shows profits starting at 1985 at $10,000 and ending at 2005 at $4,000.  The x-axis ranges from 0 to 30 in intervals of 5 and the y –axis goes from 0 to 12,000 in intervals of 2,000.
Figure 11
27

Find the linear function y, where y depends on \(x,\) the number of years since 1980.

\(y=-\text{3}00x+\text{11},\text{5}00\)

28

Find and interpret the y-intercept.

For the following exercise, consider this scenario: In 2004, a school population was 1,700. By 2012 the population had grown to 2,500.

29

Assume the population is changing linearly.

  • ⓐHow much did the population grow between the year 2004 and 2012?
  • ⓑWhat is the average population growth per year?
  • ⓒFind an equation for the population, P, of the school t years after 2004.
  • ⓐ 800
  • ⓑ 100 students per year
  • ⓒ \(P(t)=\text{1}00t+\text{17}00\)

For the following exercises, consider this scenario: In 2000, the moose population in a park was measured to be 6,500. By 2010, the population was measured to be 12,500. Assume the population continues to change linearly.

30

Find a formula for the moose population, \(P\) .

31

What does your model predict the moose population to be in 2020?

18,500

For the following exercises, consider this scenario: The median home values in subdivisions Pima Central and East Valley (adjusted for inflation) are shown in Table 25. Assume that the house values are changing linearly.

Table 25
YearPima CentralEast Valley
197032,000120,250
201085,000150,000
32

In which subdivision have home values increased at a higher rate?

33

If these trends were to continue, what would be the median home value in Pima Central in 2015?

$91,625

Fitting Linear Models to Data

34

Draw a scatter plot for the data in Table 26. Then determine whether the data appears to be linearly related.

Table 26
0-105
2-50
41
655
8105
10160
35

Draw a scatter plot for the data in Table 27. If we wanted to know when the population would reach 15,000, would the answer involve interpolation or extrapolation?

Table 27
YearPopulation
19905,600
19955,950
20006,300
20056,600
20106,900

Extrapolation


Scatter plot with the points (1990,5600); (1995,5950); (2000,6300); (2005,6600); and (2010,6900).
36

Eight students were asked to estimate their score on a 10-point quiz. Their estimated and actual scores are given in Table 28. Plot the points, then sketch a line that fits the data.

Table 28
PredictedActual
66
77
78
88
79
910
1010
109
37

Draw a best-fit line for the plotted data.

Scatter plot of the points: (2,78); (4,81); (6,85); (8,90); and (10,99).


Scatter plot of: (2,78); (4,81); (6,85); (8,90); and (10,99) and the line of best fit running through these points.  The line of best fit goes through most of the points.

For the following exercises, consider the data in Table 29, which shows the percent of unemployed in a city of people 25 years or older who are college graduates is given below, by year.

Table 29
Year20002002200520072010
Percent Graduates6.57.07.48.29.0
38

Determine whether the trend appears to be linear. If so, and assuming the trend continues, find a linear regression model to predict the percent of unemployed in a given year to three decimal places.

39

In what year will the percentage exceed 12%?

2023

40

Based on the set of data given in Table 30, calculate the regression line using a calculator or other technology tool, and determine the correlation coefficient to three decimal places.

Table 30
\(x\)1720232629
\(y\)1525313740
41

Based on the set of data given in Table 31, calculate the regression line using a calculator or other technology tool, and determine the correlation coefficient to three decimal places.

Table 31
\(x\)1012151820
\(y\)3634302822

\(y=-1.294x+49.412; r=-0.974\)

For the following exercises, consider this scenario: The population of a city increased steadily over a ten-year span. The following ordered pairs show the population and the year over the ten-year span (population, year) for specific recorded years:

\((\text{3,6}00,2000);(\text{4,}000,2001);(\text{4,7}00,2003);(\text{6,}000,2006)\)

42

Use linear regression to determine a function \(y,\) where the year depends on the population, to three decimal places of accuracy.

43

Predict when the population will hit 12,000.

2027

44

What is the correlation coefficient for this model to three decimal places of accuracy?

45

According to the model, what is the population in 2014?

7,660

Chapter Practice Test

1

Determine whether the following algebraic equation can be written as a linear function. \(2x+3y=7\)

Yes

2

Determine whether the following function is increasing or decreasing. \(f(x)=-2x+5\)

3

Determine whether the following function is increasing or decreasing. \(f(x)=7x+9\)

Increasing

4

Find a linear equation that passes through (5, 1) and (3, –9), if possible.

5

Find a linear equation, that has an x intercept at (–4, 0) and a y-intercept at (0, –6), if possible.

y = −1.5x − 6

6

Find the slope of the line in Figure 12.

This image is a graph of a decreasing linear function on an x, y coordinate plane. The x and y-axis range from -6 to 6. The line passes through the points (0,2) and (1,0).
Figure 12
7

Write an equation for line in Figure 13.

This image is a graph showing a decreasing linear function on an x, y coordinate plane. The x and y axis range from -6 to 6. The line passes through the points (0,-1) and (-.5,0).
Figure 13

y = −2x − 1

8

Does Table 32 represent a linear function? If so, find a linear equation that models the data.

Table 32
\(x\)–6024
\(g(x)\)14323844
9

Does Table 33 represent a linear function? If so, find a linear equation that models the data.

Table 33
x13711
g(x)491912

No

10

At 6 am, an online company has sold 120 items that day. If the company sells an average of 30 items per hour for the remainder of the day, write an expression to represent the number of items that were sold \(n\) after 6 am.

For the following exercises, determine whether the lines given by the equations below are parallel, perpendicular, or neither parallel nor perpendicular.

11

\(\begin{array}{l}y=\frac{3}{4}x-9 \\ -4x-3y=8\end{array}\)

Perpendicular

12

\(\begin{array}{l}-2x+y=3 \\ 3x+\frac{3}{2}y=5\end{array}\)

13

Find the x- and y-intercepts of the equation \(2x+7y=-14.\)

(−7, 0); (0, −2)

14

Given below are descriptions of two lines. Find the slopes of Line 1 and Line 2. Is the pair of lines parallel, perpendicular, or neither?

Line 1: Passes through \((-2,-6)\) and \((3,14)\)

Line 2: Passes through \((2,6)\) and \((4,14)\)

15

Write an equation for a line perpendicular to \(f(x)=4x+3\) and passing through the point \((8,10).\)

y = −0.25x + 12

16

Sketch a line with a y-intercept of \((0,\text{5})\) and slope \(-\frac{5}{2}.\)

17

Graph of the linear function \(f(x)=-x+6.\)

A graph of a straight blue line on a Cartesian plane, extending from the top left to the bottom right, indicating a negative slope and intercepts at (0,6) and (6,0).

Slope = −1 and y-intercept = 6

18

For the two linear functions, find the point of intersection: \(\begin{array}{l}x=y+2 \\ 2x-3y=-1\end{array}.\)

19

A car rental company offers two plans for renting a car.

Plan A: $25 per day and $0.10 per mile

Plan B: $40 per day with free unlimited mileage

How many miles would you need to drive for plan B to save you money?

150

20

Find the area of a triangle bounded by the y axis, the line \(f(x)=12-4x,\) and the line perpendicular to \(f\) that passes through the origin.

21

A town’s population increases at a constant rate. In 2010 the population was 65,000. By 2012 the population had increased to 90,000. Assuming this trend continues, predict the population in 2018.

165,000

22

The number of people afflicted with the common cold in the winter months dropped steadily by 25 each year since 2002 until 2012. In 2002, 8,040 people were inflicted. Find the linear function that models the number of people afflicted with the common cold \(C\) as a function of the year, \(t.\) When will less than 6,000 people be afflicted?

For the following exercises, use the graph in Figure 14, showing the profit, \(y,\) in thousands of dollars, of a company in a given year, \(x,\) where \(x\) represents years since 1980.

This image is a graph showing the company's profit from 1985 at around $15,000 to 2010 at about $32,500.  The x-axis goes from 0 to 30 in intervals of 5 and the y-axis goes from 0 to 35,000 in intervals of 5,000.
Figure 14
23

Find the linear function \(y,\) where \(y\) depends on \(x,\) the number of years since 1980.

y = 875x + 10,625

24

Find and interpret the y-intercept.

25

In 2004, a school population was 1250. By 2012 the population had dropped to 875. Assume the population is changing linearly.

  • ⓐHow much did the population drop between the year 2004 and 2012?
  • ⓑWhat is the average population decline per year?
  • ⓒFind an equation for the population, P, of the school t years after 2004.
  • ⓐ375
  • ⓑdropped an average of 46.875, or about 47 people per year
  • ⓒy = −46.875t + 1250
26

Draw a scatter plot for the data provided in Table 34. Then determine whether the data appears to be linearly related.

Table 34
0246810
–450–20010265500755
27

Draw a best-fit line for the plotted data.

Scatterplot with domain from 2 to 10 and range from 20 from 33.  The points plotted are (2,20); (4,23); (6,26); (8,26); and (10,32).
A scatter plot with five data points and an orange regression line showing a positive linear relationship. The x-axis ranges from 0 to 12, and the y-axis ranges from 0 to 35.

For the following exercises, use Table 35, which shows the percent of unemployed persons 25 years or older who are college graduates in a particular city, by year.

Table 35
Year20002002200520072010
Percent Graduates8.58.07.26.76.4
28

Determine whether the trend appears linear. If so, and assuming the trend continues, find a linear regression model to predict the percent of unemployed in a given year to three decimal places.

29

In what year will the percentage drop below 4%?

In early 2018

30

Based on the set of data given in Table 36, calculate the regression line using a calculator or other technology tool, and determine the correlation coefficient. Round to three decimal places of accuracy.

Table 36
x1618202426
y106110115120125

For the following exercises, consider this scenario: The population of a city increased steadily over a ten-year span. The following ordered pairs shows the population (in hundreds) and the year over the ten-year span, (population, year) for specific recorded years:

\((4,500,2000);(4,700,2001);(5,200,2003);(5,800,2006)\)

31

Use linear regression to determine a function y, where the year depends on the population. Round to three decimal places of accuracy.

y = 0.00455x + 1979.5

32

Predict when the population will hit 20,000.

33

What is the correlation coefficient for this model?

r = 0.999

Glossary

correlation coefficient
a value, \(r,\) between –1 and 1 that indicates the degree of linear correlation of variables, or how closely a regression line fits a data set.
extrapolation
predicting a value outside the domain and range of the data
interpolation
predicting a value inside the domain and range of the data
least squares regression
a statistical technique for fitting a line to data in a way that minimizes the differences between the line and data values
model breakdown
when a model no longer applies after a certain point