Precalculus 2e — Original English

Fitting Linear Models to Data

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

Using a Scatter Plot to Investigate Cricket Chirps

The table below shows the number of cricket chirps in 15 seconds, for several different air temperatures, in degrees FahrenheitSelected 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 1 Two rows and ten columns. The first row is labeled, 'chirps'. The second row is labeled is labeled, 'Temp'. Reading the remaining rows as ordered pairs (i.e., (chirps, Temp), we have the following values: (44, 80.5), (35, 70.5), (20.4, 57), (33, 66), (31, 68), (35, 72), (18.5, 52), (37, 73.5) and (26, 53).
Chirps 44 35 20.4 33 31 35 18.5 37 26
Temperature 80.5 70.5 57 66 68 72 52 73.5 53
Solution

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

Example 2

Finding a Line of Best Fit

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

Solution

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

m=6050=1.2

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

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.

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)'.
Figure 4 Interpolation occurs within the domain and range of the provided data whereas extrapolation occurs outside.

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.

Example 3
Understanding Interpolation and Extrapolation

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

  1. 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.
  2. 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.
Solution
  1. 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:
    T(30)=30+1.2(30)          =66degrees

    Based on the data we have, this value seems reasonable.
  2. 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:
    40=30+1.2c 10=1.2c c8.33

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)'.
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.

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 valuesTechnically, 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 calculatorsFor 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.

Example 4
Finding a Least Squares Regression Line

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

Solution
  1. Enter the input (chirps) in List 1 (L1).
  2. Enter the output (temperature) in List 2 (L2). See Table 2.
    Table 2 Two rows and ten columns. The first row is labeled, 'L1'. The second row is labeled is labeled, 'L2'. Reading the remaining rows as ordered pairs (i.e., (L2, L2), we have the following values: (44, 80.5), (35, 70.5), (20.4, 57), (33, 66), (31, 68), (35, 72), (18.5, 52), (37, 73.5) and (26, 53).
    L1 44 35 20.4 33 31 35 18.5 37 26
    L2 80.5 70.5 57 66 68 72 52 73.5 53
  3. 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:

T(30)=30.281+1.143(30)          =64.571          64.6 degrees

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

Distinguishing Between Linear and Non-Linear 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.

This image displays a 3x7 grid of scatter plots, each accompanied by a numerical value representing the Pearson correlation coefficient. The top row demonstrates varying strengths of positive and negative linear correlation, ranging from a perfect positive correlation (1.0) to no linear correlation (0.0) in a circular cluster, and then to a perfect negative correlation (-1.0). The middle row features plots with perfect linear correlations (1.0 and -1.0) at different orientations, including a perfectly horizontal line with a 0.0 coefficient, emphasizing that linearity can be present without a strong slope. The bottom row showcases diverse non-linear patterns (such as a sine wave, square, diamond, crescent, X-shape, circle, and four clusters) all of which result in a Pearson correlation coefficient of 0.0, highlighting that this metric only captures linear relationships and can be misleading for non-linear associations.
Figure 7 Plotted data and related correlation coefficients. (credit: “DenisBoigelot,” Wikimedia Commons)
Example 5

Finding a Correlation Coefficient

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

Solution

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.

Predicting with a Regression Line

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

Using a Regression Line to Make Predictions

Gasoline consumption in the United States has been steadily increasing. Consumption data from 1994 to 2004 is shown in Table 3http://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 3 Two rows and twelve columns. The first row is labeled, 'Year'. The second row is labeled is labeled, 'Consumption (billions of gallons)'. Reading the remaining rows as ordered pairs (i.e., (Year, Consumption), we have the following values: ('94, 113), ('95, 116), ('96, 118), ('97, 119), ('98, 123), ('99, 125), ('00, 126), ('01, 128), ('02, 131), ('03, 133), and ('04, 136).
Year '94 '95 '96 '97 '98 '99 '00 '01 '02 '03 '04
Consumption (billions of gallons) 113 116 118 119 123 125 126 128 131 133 136

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)'.
Figure 8
Solution

We can introduce 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),

C(14)=113.318+2.209(14)          =144.244

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

Key Concepts

  • Scatter plots show the relationship between two sets of data. See Example 1.
  • Scatter plots may represent linear or non-linear models.
  • The line of best fit may be estimated or calculated, using a calculator or statistical software. See Example 2.
  • Interpolation can be used to predict values inside the domain and range of the data, whereas extrapolation can be used to predict values outside the domain and range of the data. See Example 3.
  • The correlation coefficient, r, indicates the degree of linear relationship between data. See Example 5.
  • A regression line best fits the data. See Example 6.
  • The least squares regression line is found by minimizing the squares of the distances of points from a line passing through the data and may be used to make predictions regarding either of the variables. See Example 4.

Section Exercises

Verbal

Exercise 1

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

Solution

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

Exercise 2

What is interpolation when using a linear model?

Exercise 3

What is extrapolation when using a linear model?

Solution

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

Exercise 4

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

Exercise 5

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

Solution

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

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

y=ax+b a=−1.341 b=32.234 r=−0.896
Exercise 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.

y=ax+b a=6.301 b=−1.044 r=0.970
Solution

61.966 years

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

Exercise 8
Two rows and six columns. Reading the column and row as ordered pairs, we have (0, -22), (2, -19), (4, -15), (6, -11), (8, -6), and (10, -2).
0 2 4 6 8 10
–22 –19 –15 –11 –6 –2
Exercise 9
Two rows and six columns. Reading the column and row as ordered pairs, we have (1, 46), (2, 50), (3, 59), (4, 75), (5, 100), and (6, 136).
1 2 3 4 5 6
46 50 59 75 100 136
Solution

No.

Exercise 10
Two rows and six columns. Reading the column and row as ordered pairs, we have (100, 12), (250, 12.6), (300, 13.1), (450, 14), (600, 14.5), and (750, 15.2).
100 250 300 450 600 750
12 12.6 13.1 14 14.5 15.2
Exercise 11
Two rows and six columns. Reading the column and row as ordered pairs, we have (1, 1), (3, 9), (5, 28), (7, 65), (9, 125), and (11, 216).
1 3 5 7 9 11
1 9 28 65 125 216
Solution

No.

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

Two columns and six rows. The first column is labeled, 'Year'. The second column is labeled is labeled, 'Population'. Reading the remaining columns as ordered pairs (i.e., (Year, Population), we have the following values: (1990, 11500), (1995, 12100), (2000, 12700), (2005, 13000), and (2010, 13750).
YearPopulation
199011,500
199512,100
200012,700
200513,000
201013,750
Exercise 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.

Two rows and six columns. The first row is labeled, 'Temperature, Degrees F'. The second row is labeled is labeled, 'Time, seconds'. Reading the remaining rows as ordered pairs (i.e., (Year, Population), we have the following values: (16, 46), (18, 50), (20, 54), (25, 55), and (30, 62).
Temperature, °F 16 18 20 25 30
Time, seconds 46 50 54 55 62
Solution

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.

Two scatter plots (a) and (b) display randomly distributed blue points on a light background, illustrating a lack of discernible patterns or relationships within the data.
Figure 9
Two scatter plots. Plot (c) shows data with a negative correlation, while plot (d) illustrates data with a positive correlation.
Figure 10
Exercise 14

r=0.95

Exercise 15

r=0.89

Solution

C

Exercise 16

r=0.26

Exercise 17

r=0.39

Solution

B

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

Exercise 18
A scatter plot shows ten blue data points on a cream background, with x-axis values from 0 to 10 and y-axis values from 0 to 10. The points generally increase from left to right, indicating a positive trend.
Exercise 19
A scatter plot with an x-axis labeled from 0 to 10 and a y-axis labeled from 0 to 10. Several blue circular data points are scattered across the lower part of the plot, primarily between y=0 and y=3.5.
Solution
A scatter plot displays data points with a positive linear regression line. The orange line shows an upward trend among the blue data points, suggesting a positive correlation between the variables on the x and y axes.
Exercise 20
A scatter plot displaying data points with a general downward trend, indicating a negative correlation. Both the x-axis and y-axis range from 0 to 10.
Exercise 21
This scatter plot displays a series of data points across an x-axis from 0 to 10 and a y-axis from 0 to 10. The points illustrate a curvilinear, U-shaped relationship, initially decreasing from approximately y=2.5 at x=0 to a minimum around x=2 (y=3.0), and then steadily increasing to y=6.0 at x=10.
Solution
A scatter plot with blue data points showing a positive linear relationship, and an orange line representing the linear regression fit.

Numeric

Exercise 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 4http://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 4 Two columns and eleven rows. The first column is labeled, 'Year'. The second column is labeled is labeled, 'Percent Graduates'. Reading the remaining columns as ordered pairs (i.e., (Year, Percent Graduates), we have the following values: (1990, 21.3), (1992, 21.4), (1994, 22.2), (1996, 23.6), (1998, 24.4), (2000, 25.6), (2002, 26,7), (2004, 27.7), (2006, 28), and (2008, 29.4).
YearPercent Graduates
199021.3
199221.4
199422.2
199623.6
199824.4
200025.6
200226.7
200427.7
200628
200829.4
Exercise 23

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

Table 5 Two columns and eleven rows. The first column is labeled, 'Year'. The second column is labeled is labeled, 'Imports'. Reading the remaining rows as ordered pairs (i.e., (Year, Imports), we have the following values: (1992, 2665), (1994, 2688), (1996, 3565), (1998, 4129), (2000, 4584), (2002, 5655), (2004, 6549), (2006, 7950), (2008, 8487), and (2009, 9462).
YearImports
19922665
19942688
19963565
19984129
20004584
20025655
20046549
20067950
20088487
20099462
Solution

Yes, trend appears linear because r=0.985 and will exceed 12,000 near midyear, 2016, 24.6 years since 1992.

Exercise 24

Table 6 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 6 Two columns and eleven rows. The first column is labeled, 'Year'. The second column is labeled is labeled, 'Unemployment'. Reading the remaining rows as ordered pairs (i.e., (Year, Unemployment), we have the following values: (1990, 750), (1992, 670), (1994, 650), (1996, 605), (1998, 550), (2000, 510), (2002, 460), (2004, 420), (2006, 380), and (2008, 320).
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.

Exercise 25
Six rows and two columns. The first column in the first row is labeled x, and the second column in the first row is labeled y. Reading the remaining rows as ordered pairs (i.e., (x , y)), we have: (8, 23), (15, 41), (26, 53), (31, 72), and (56, 103).
x 8 15 26 31 56
y 23 41 53 72 103
Solution

y=1.640x+13.800, r=0.987

Exercise 26
Six rows and two columns. The first column in the first row is labeled x, and the second column in the first row is labeled y. Reading the remaining rows as ordered pairs (i.e., (x , y)), we have: (5, 4), (7, 12), (10, 17), (12, 22), and (15, 24).
x 5 7 10 12 15
y 4 12 17 22 24
Exercise 27
Seventeen rows and two columns. The first column in the first row is labeled x, and the second column in the first row is labeled y. Reading the remaining rows as ordered pairs (i.e., (x , y)), we have: (3, 21.9), (4, 22.22), (5, 22.74), (6, 22.26), (7, 20.78), (8, 17.6), (9, 16.52), (10, 18.54), (11, 15.76), (12, 22), (13, 14.1), (14, 14.02), (15, 11.94), (16, 12.76), (17, 11.28) and (18, 9.1).
x y x y
321.91115.76
422.221213.68
522.741314.1
622.261414.02
720.781511.94
817.61612.76
916.521711.28
1018.54189.1
Solution

y=0.962x+26.86,r=0.965

Exercise 28
Eleven rows and two columns. The first column in the first row is labeled x, and the second column in the first row is labeled y. Reading the remaining rows as ordered pairs (i.e., (x , y)), we have: (4, 44.8), (5, 43.1), (6, 38.8), (7, 39), (8, 38), (9, 32.7), (10, 30.1), (11, 29.3), (12, 27), and (13, 25.8).
x y
444.8
543.1
638.8
739
838
932.7
1030.1
1129.3
1227
1325.8
Exercise 29
seven columns and two rows. The first row in the first column is labeled x, and the first row in the second column is labeled y. Reading the remaining rows as ordered pairs (i.e., (x , y)), we have: (21, 17), (25, 11), (30, 2), (31, -1), (40, -18), and (50, -40).
x 21 25 30 31 40 50
y 17 11 2 -1 -18 -40
Solution

y=1.981x+60.197; r=0.998

Exercise 30
Seven columns and two rows. The first row in the first column is labeled x, and the second column in the first row is labeled y. Reading the remaining rows as ordered pairs (i.e., (x , y)), we have: (100, 2000), (80, 1798), (60, 1589), (55, 1589), (40, 1390), and (20, 1202).
x 100 80 60 55 40 20
y 2000 1798 1589 1580 1390 1202
Exercise 31
Two coumns and seven rows. The first row in the first column is labeled x, and the second row in the first column is labeled y. Reading the remaining rows as ordered pairs (i.e., (x , y)), we have: (900, 70), (988, 80), (1000, 82), (1010, 84), (1200, 105), and (1205, 108).
x 900 988 1000 1010 1200 1205
y 70 80 82 84 105 108
Solution

y=0.121x38.841,r=0.998

Extensions

Exercise 32

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

Exercise 33

Graph f(x)=2x10. Pick a set of 5 ordered pairs using inputs x=−2, 1, 5, 6, 9 and use linear regression to verify the function.

Solution

(−2,−6),(1,−12),(5,−20),(6,−22),(9,−28); y=−2x−10

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

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

Exercise 35

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

Solution

(189.8,0) If 18,980 units are sold, the company will have a profit of zero dollars.

Exercise 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:

(2500, 2000), (2650, 2001), (3000, 2003), (3500, 2006), (4200, 2010)

Exercise 37

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

Solution

y=0.00587x+1985.41

Exercise 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:

(46, 250),(48, 305),(50, 350),(52, 390),(54, 410).

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

Solution

y=20.25x671.5

Exercise 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:

(46, 250), (48, 225), (50, 205), (52, 180), (54, 165).

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

Solution

y=10.75x+742.50

Exercise 42

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

Chapter Review Exercises

Linear Functions

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

Solution

Yes

Determine whether the algebraic equation is linear. 6x2y=5

Determine whether the function is increasing or decreasing.

f(x)=7x2

Solution

Increasing.

Determine whether the function is increasing or decreasing.

g(x)=x+2

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

Passes through (7,5) and (3,17)

Solution

y=3x+26

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

x-intercept at (6,0) and y-intercept at (0,10)

Find the slope of the line shown in the line graph.
A two-dimensional Cartesian coordinate system shows a straight blue line. Both the x-axis and y-axis are scaled from -6 to 6. The line passes through the x-intercept at (1, 0) and the y-intercept at (0, -3), having a positive slope of 3.

Solution

3

Find the slope of the line graphed.
A Cartesian coordinate system is displayed with the x-axis and y-axis both ranging from -6 to 6. Grid lines are present at each integer value. A solid blue horizontal line is drawn across the graph at y = -2. The line extends indefinitely in both positive and negative x-directions, as indicated by arrows on each end. This represents the linear equation y = -2.

Write an equation in slope-intercept form for the line shown.
A graph displays a blue straight line on a Cartesian coordinate plane with x and y axes, each labeled from -6 to 6. The line has a positive slope, passing through the y-axis at (0, -2) and the x-axis at (1, 0).

Solution

y=2x2

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

Two rows and five columns. The first column in the first row is labeled x, and the first column in the second row is labeled y. Reading the remaining rows as ordered pairs (i.e., (x , y)), we have: (-4, 18), (0, -2), (2, -12), and (10, -52).
x –4 0 2 10
g(x) 18 –2 –12 –52

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

Two rows and five columns. The first column in the first row is labeled x, and the first column in the second row is labeled g(x). Reading the remaining rows as ordered pairs (i.e., (x , g(x))), we have: (6, -8), (8, -12), (12, -18), and (26, -46).
x 6 8 12 26
g(x) –8 –12 –18 –46
Solution

Not linear.

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?

Graphs of Linear Functions

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

2x6y=12 x+3y=1

Solution

parallel

y= 1 3 x2 3x+y=9

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

7x+9y=−63

Solution

(–9,0);(0,–7)

f(x)=2x1

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?

  • Line 1: Passes through (5,11) and (10,1)
  • Line 2: Passes through (−1,3) and (−5,11)
Solution

Line 1: m=2; Line 2: m=2; Parallel

  • Line 1: Passes through (8,−10) and (0,−26)
  • Line 2: Passes through (2,5) and (4,4)

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

Solution

y=0.2x+21

Find the equation of a line with a y- intercept of (0,2) and slope 12.

Sketch a graph of the linear function f(t)=2t5.

Solution
A coordinate plane showing a blue line passing through the points (0, -5) and (2.5, 0). The x-axis ranges from -4 to 6, and the y-axis ranges from -6 to 6.

Find the point of intersection for the 2 linear functions: x=y+62xy=13

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?

Solution

250.

Modeling with Linear Functions

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

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.

Solution

118,000.

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.
A line graph showing a linear decrease. The line starts at approximately (5, 10,000) and descends to approximately (25, 4,000), indicating a negative relationship between x and y.
Figure 11

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

Solution

y=300x+11,500

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.

Assume the population is changing linearly.

  1. How much did the population grow between the year 2004 and 2012?
  2. What is the average population growth per year?
  3. Find an equation for the population, P, of the school t years after 2004.
Solution
  • a) 800
  • b) 100 students per year
  • c) P(t)=100t+1700

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.

Find a formula for the moose population, P.

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

Solution

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 7. Assume that the house values are changing linearly.

Table 7 Three rows and three columns. In the first column, are the years 1970 and 2010. In the second columns are the house values for Pima Central, which are 32,000 for 1970 and 85,000 for 2010. In the third columns are the house values for East Valley, which are 120,250 for 1970 and 150,000 for 2010.
Year Pima Central East Valley
1970 32,000 120,250
2010 85,000 150,000

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

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

Solution

$91,625

Fitting Linear Models to Data

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

Table 8 Two rows and six columns. Reading the columns and rows as ordered pairs, we have: (0, -105), (2, -50), (4, 1), (6, 55), (8, 105), and (10, 160).
0 2 4 6 8 10
–105 –50 1 55 105 160

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

Table 9 Two columns and six rows. The first column in the first row is labeled 'Year', and the second column in the first row is labeled 'Population'. Reading the remaining rows as ordered pairs (i.e., (Year , Population)), we have: (1990, 5600), (1995, 5950), (2000, 6300), (2005, 6600), and (2010, 6900).
YearPopulation
19905,600
19955,950
20006,300
20056,600
20106,900
Solution

Extrapolation.

A scatter plot shows the population from 1990 to 2010. The population steadily increased, starting at 5,600 in 1990 and rising to 6,900 in 2010.

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

Table 10 Two columns and nine rows. The first column in the first row is labeled 'Predicted', and the second column in the first row is labeled 'Actual'. Reading the remaining rows as ordered pairs (i.e., (Predicted , Actual)), we have: (6, 6), (7, 7), (7, 8), (8, 8), (9, 10), (10, 10), and (10, 9).
PredictedActual
66
77
78
88
79
910
1010
109

Draw a best-fit line for the plotted data.
A scatter plot shows five data points generally trending upwards. The x-axis ranges from 0 to 12, and the y-axis ranges from 0 to 120.

Solution

A two-dimensional scatter plot displays six data points with an upward-sloping orange line, indicating a positive linear trend. The x-axis is labeled 'x' and ranges from 0 to 12, with major tick marks every 2 units. The y-axis is labeled 'y' and ranges from 0 to 120, with major tick marks every 20 units. The plotted points are approximately (2, 75), (3, 88), (4, 82), (6, 84), (8, 89), and (10, 98). The orange line represents a linear regression fit to these data points.

For the following exercises, consider the data in Table 11, 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 11 Two columns and six rows. The first column in the first row is labeled 'Year', and the second column in the first row is labeled 'Percent Graduates'. Reading the remaining rows as ordered pairs (i.e., (Year , Percent Graduates)), we have: (2000, 6.5), (2002, 7.0), (2005, 7.4), (2007, 8.2), and (2010, 9.0).
Year 2000 2002 2005 2007 2010
Percent Graduates 6.5 7.0 7.4 8.2 9.0

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.

In what year will the percentage exceed 12%?

Solution

Midway through 2024.

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

Table 12 Two rows and six columns. The first column in the first row is labeled 'x', and the second column in the first row is labeled 'y'. Reading the remaining rows as ordered pairs (i.e., (x, y)), we have: (17, 15), (20, 25), (23, 31), (26, 37), and (29, 40).
x 17 20 23 26 29
y 15 25 31 37 40

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

Table 13 Two rows and six columns. The first column in the first row is labeled 'x', and the second column in the first row is labeled 'y'. Reading the remaining rows as ordered pairs (i.e., (x, y)), we have: (10, 36), (12, 34), (15, 30), (18, 28), and (20, 22).
x 10 12 15 18 20
y 36 34 30 28 22
Solution

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:

(3,600, 2000); (4,000, 2001); (4,700, 2003); (6,000, 2006)

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

Predict when the population will hit 12,000.

Solution

Early in 2022

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

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

Solution

7,660

Practice Test

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

Solution

Yes.

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

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

Solution

Increasing

Given the following set of information, find a linear equation satisfying the conditions, if possible.

Passes through (5, 1) and (3, –9)

Given the following set of information, find a linear equation satisfying the conditions, if possible.

x intercept at (–4, 0) and y-intercept at (0, –6)

Solution

y=−1.5x6

Find the slope of the line in Figure 12.

A graph displays a straight line with a negative slope on a coordinate plane, passing through the y-axis at (0, 2) and the x-axis at (1, 0).
Figure 12

Write an equation for line in Figure 13.

A Cartesian coordinate plane displays a straight line. The x-axis and y-axis both range from -6 to 6, with grid lines at integer intervals. The line passes through the origin (0,0) and has a negative slope of -2. It extends infinitely, passing through points such as (-2, 4) and (2, -4), and is represented by the equation y = -2x.
Figure 13
Solution

y=2x1

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

Table 14 Two rows and five columns. The first column in the first row is labeled x, and the first column in the second row is labeled g(x). Reading the remaining rows as ordered pairs (i.e., (x , g(x))), we have: (-6, 12), (0, 32), (2, 38), and (4, 44).
x –6 0 2 4
g(x) 14 32 38 44

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

Table 15 Two rows and five columns. The first column in the first row is labeled x, and the first column in the second row is labeled g(x). Reading the remaining rows as ordered pairs (i.e., (x , g(x))), we have: (1, 4), (3, 9), (7, 19), and (11, 12).
x 1 3 7 11
g(x) 4 9 19 12
Solution

No.

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:

y= 3 4 x9 4x3y=8

Solution

Perpendicular

2x+y=3 3x+ 3 2 y=5

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

Solution

(7,0); (0,2)

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)

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

Solution

y=0.25x+12

Sketch a line with a y-intercept of (0,5) and slope 52.

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

Solution
A coordinate plane with the x-axis labeled from -5 to 8 and the y-axis labeled from -2 to 7. A straight line is plotted, passing through the y-axis at the point (0, 6) and the x-axis at the point (6, 0). The line has a negative slope, decreasing from left to right, and extends infinitely in both directions.

For the two linear functions, find the point of intersection: x=y+22x3y=−1

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?

Solution

150

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

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.

Solution

165,000

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.

A line graph in a coordinate plane displays a single blue line segment with a positive slope. The x-axis is labeled from 0 to 30 in increments of 5, and the y-axis is labeled from 0 to 35,000 in increments of 5,000. The line starts approximately at x=5, y=16,000 and extends to approximately x=25, y=31,000, illustrating a positive linear correlation between the two variables.
Figure 14

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

Solution

y=875x+10,675

Find and interpret the y-intercept.

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

  1. How much did the population drop between the year 2004 and 2012?
  2. What is the average population decline per year?
  3. Find an equation for the population, P, of the school t years after 2004.
Solution
  • a) 375
  • b) dropped an average of 46.875, or about 47 people per year
  • c) y=46.875t+1250

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

Table 16 Two rows and six columns. Reading the columns and rows as ordered pairs, we have: (0, -450), (2, -200), (4, 10), (6, 265), (8, 500), and (10, 755).
0 2 4 6 8 10
–450 –200 10 265 500 755

Draw a best-fit line for the plotted data.
A scatter plot displaying five data points that show a general upward trend, indicating a positive correlation between the x and y variables.

Solution

This scatter plot displays several data points that exhibit a clear positive linear relationship. An orange line of best fit is drawn through the data, visually representing this trend. The x-axis is labeled 'x' and ranges from 0 to 12, while the y-axis is labeled 'y' and ranges from 0 to 35.

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

Table 17 Two columns and six rows. The first column in the first row is labeled 'Year', and the second column in the first row is labeled 'Percent Graduates'. Reading the remaining rows as ordered pairs (i.e., (Year , Percent Graduates)), we have: (2000, 8.5), (2002, 8.0), (2005, 7.2), (2007, 6.7), and (2010, 6.4).
Year 2000 2002 2005 2007 2010
Percent Graduates 8.5 8.0 7.2 6.7 6.4

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.

In what year will the percentage drop below 4%?

Solution

Early in 2018

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

Table 18 Two rows and six columns. The first column in the first row is labeled x, and the first column in the second row is labeled y. Reading the remaining rows as ordered pairs (i.e., (x , y)), we have: (16, 106), (18, 110), (20, 115), (24, 120), and (26, 125).
x 16 18 20 24 26
y 106 110 115 120 125

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)

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

Solution

y=0.00455x+1979.5

Predict when the population will hit 20,000.

What is the correlation coefficient for this model?

Solution

r=0.999

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