Precalculus by Richard Wright

Previous Lesson Table of Contents Next Lesson

Are you not my student and
has this helped you?

This book is available
to download as an epub.


Jesus answered, “It is written: ‘Man shall not live on bread alone, but on every word that comes from the mouth of God.’” Matthew 4:4 NIV

1-10 Mathematical Modeling

Mr. Wright teaches the lesson.

Summary: In this section, you will:

SDA NAD Content Standards (2018): PC.5.4, PC.6.6, PC.7.1, PC.7.2, PC.7.3

field cricket
Field crickets. (publicdomainpictures.net/Jack Sparrow)

Physicist Amos Dolbear noticed that crickets chirped differently at different temperatures. He noticed that they chirped faster when it was hotter. So, he recorded how fast they chirped and the temperature. One way to analyze the data is to create a graph showing the number of chirps in 15 seconds versus the temperature. This is called creating a scatter plot.

Scatter Plots

A scatter plot is a graph of points used to determine relationships between two sets of data. If the relationship is linear, then the points should lie along a straight line, and it could be modeled by a linear function. Figure 2 shows a scatter plot that seems to have a linear relationship.

length vs mass
Scatter plot
Scatter Plot
  1. Graph all the points from the data.
  2. If the points seem to form a line, then there is likely a linear relationship.

Use a Scatter Plot to Investigate Cricket Chirps

Table 1 shows the number of cricket chirps in 15 seconds, for several different air temperatures, in degrees Fahrenheit. Plot this data and determine whether the data appears to be linearly related.

Table 1
Chirps 44 46.4 43.6 35 35 32.6 28.9 27.7 25.5 20.4 12.5
Temp 80.5 78.5 78 73.5 70.5 68 66 65 61.5 57 55

Solution

Graph the points as in figure 3. The temperature increases as the number of chirps increases in an approximately linear fashion. Thus, there is likely a relationship between temperature and the number of chirps a cricket makes in 15 seconds.

cricket chirps
There is a linear relationship between the number of cricket chirps in 15 seconds and the temperature.

Best-Fitting Line

After identifying a linear relationship, it seems natural to ask, "What is the linear function?" One way to approximate the best-fitting line is to draw a best guess and then find the equation. When drawing the best guess, try to draw the line through the center of the points so that there are the same number of points above the line as below the line. The average distance from the points to the line needs to be made as small as possible.

Estimate a Best-Fitting Line
  1. Draw a scatter plot.
  2. Draw the approximate best-fitting line such that
    • the line passes through the middle of the points,
    • there are the same number of points above and below the line,
    • and the average distance between the points and the line is a minimum.
  3. Pick two points on the line that are far apart (these do not have to be from the data set).
  4. Find the slope between the two lines.
  5. Use the slope and a point to find the equation of the line.

Find a Best-Fitting Line

Find a linear function that fits the data in table 1 by estimating the best fitting line.

Solution

Start by drawing a scatter plot of the data as was done in figure 3 which is duplicated here.

cricket chirps
There is a linear relationship between the number of cricket chirps in 15 seconds and the temperature.

Draw a line that appears to go through the middle of all the data such as the line in figure 4.

cricket chirps
Approximate best-fitting line.

Pick two points on the line. They do not have to be data point but could simply be places where the graph crosses the grid. The points should be far apart to reduce errors. The two red points in figure 5 will work well. Notice the point (9, 50) is not one of the original data points, but was read from the graph instead.

cricket chirps
Points to find the best-fitting line.

Find the slope between the two points, (9, 50) and (43.6, 78).

$$ slope = \frac{y_2 - y_1}{x_2 - x_1} $$

$$ m = \frac{78 - 50}{43.6 - 9} $$

m ≈ 0.8092

Finish finding the equation of the line through the points. Maybe use point-slope form with the point (9, 50).

yy1 = m(xx1)

y − 50 = 0.8092(x − 9)

y − 50 = 0.8092x − 7.2828

y − 50 = 0.8092x − 7.2828

y = 0.8092x + 42.7172

Finish by naming the variables something to represent the quantities. Perhaps call the y-variable T for temperature and the x-variable c for chirps.

T = 0.81c + 42.7

Analysis

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

Recognize Interpolation or Extrapolation

Notice the data points did not all fall perfectly on the best-fitting line. The equation is simply the best guess for how the relationship will be when it is not on one of the data points. Interpolation and extrapolation are used to make predictions based on the best-fitting line. Interpolation is predicting a value inside the domain and range of the data. Extrapolation is predicting a value outside of the domain and range of the data.

Figure 6 compares the two processes for the cricket-chirp data from Example 2. Interpolation occurs if the model is used to predict the temperature when the values for chirps are between 12.5 and 46.7. Extrapolation would occur if we used our model to predict temperature when the values for chirps are less than 12.5 or greater than 46.7.

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. Interpolation is probably nearly correct because it is surrounded by other data. Extrapolation, or predicting a value outside of the domain and range has its limitations. The farther the extrapolation is from the data, the more likely the model no longer applies. This is sometimes called model breakdown. For example, using a few years of data to predict what happened millions of years ago, or even thousands of years in the future may give results that do not apply due to model breakdown. Extrapolation provides a guess but cannot provide a certainty.

extrapolation vs interpolation
Interpolation occurs within the data, but extrapolation occurs outside.
Interpolation and Extrapolation

Methods of making predictions and analyzing data.

Understand Interpolation and Extrapolation

Use the cricket data from 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 43 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 12.5 to 46.7. A prediction at 30 chirps per 15 seconds is inside the domain of the data, so would be interpolation. Using the model:

    T = 0.81c + 42.7

    T = 0.81(30) + 42.7

    T ≈ 67.0 °F

    This is within the data, so this value seems reasonable.

  2. The temperature values varied from 55 to 80.5. Predicting the number of chirps at 43 degrees is extrapolation because 43 is outside the range of the data. Using the model:

    T = 0.81c + 42.7

    43 = 0.81c + 42.7

    0.3 = 0.81c

    0.37 = c

    The model predicts the crickets would chirp 0.37 times in 15 seconds. While this might be possible, there is no reason to believe the model is valid outside the domain and range. In fact, it has been observed that generally crickets stop chirping altogether below around 50 degrees.

According to the cricket-chirp data from example 2, what temperature can we predict it is if we counted 25 chirps in 15 seconds? Is this interpolation or extrapolation?

Answer

≈ 63.0 °F; interpolation

Find the Line of Best Fit Using a Graphing Utility

While estimating a best-fitting line works reasonably well, there are better statistical techniques for minimizing the distances from line to the data points. 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. Least squares regression is one means to determine the best-fitting for the data. Least squares regression is often called linear regression.

Find a Linear Regression on a TI-84
TI-84 Reg
TI-84 Linear Regression
  1. Push and select Edit….
  2. Enter the x-values in List 1 (L1) and the y-values in List 2 (L2).
  3. To see the graph of the points
    1. Push o and clear any equations.
    2. While still in o, go up and highlight Plot1 and press Í.
    3. Press q and select ZoomStat.
  4. Push and move over to the CALC menu.
  5. Select LinReg(ax+b) (Linear Regression).
  6. Make sure the Xlist: is L1,the Ylist: is L1, the FreqList: is blank, and the Store RegEQ: is Y1.
    1. Get Y1 by pressing ½ and select Y-VARS menu.
    2. Select Function….
    3. Select Y1.
  7. Press Calculate

The calculator will display the equation. To see the graph of the points and line, press s.

Note: Older TI graphing calculators do not have the screen in steps 6 and 7. After selecting the LinReg(ax+b), the screen just shows LinReg(ax+b). Press Í again to see the result. To see the graph, enter the equation into the o screen and press s.

Find a Linear Regression on a NumWorks Graphing Calculator
NumWorks Reg
NumWorks Linear Regression
  1. On the home screen select Regression.
  2. In the Data tab, enter the points.
  3. Move to the Graph tab.
  4. The default is a linear regression and is displayed at the bottom of the screen. To change the regression type
    1. Press O.
    2. Select Regression.
    3. Select the desired regression type.

Find a Least Squares Regression Line

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

Solution (TI-84)

On a TI-84 graphing calculator

  1. Push and select Edit….
  2. Enter the input x-values (chirps) in List 1 (L1).
  3. Enter the output y-values (temperature) in List 2 (L2).
    TI list screen
    STAT table on TI-84 Plus Color Silver Edition.
  4. Press and move over to the CALC menu. Then select Linear Regression LinReg(ax+b).
  5. Make sure the Xlist: is L1, the Ylist: is L2, and press Calculate.

    Note: To see the graph, enter Y1 for Store RegEQ: before pressing Calculate. Y1 is found in ½ ~ Y-VARS Function… Y1


    TI linear regression
    LinReg result on TI-84 Plus Color Silver Edition.

T(c) = 0.811c + 42.57

The graph of the scatter plot with the least squares regression line is shown in figure 12.

least squares regression
Graph of least squares regression with scatter plot on TI-84.
Solution (NumWorks)

On a NumWorks graphing calculator

  1. Select Regression from the home screen.
  2. Go to the Data tab.
  3. Enter the input x-values (chirps) in the first list (X1).
  4. Enter the output y-values (temperature) in the second list (Y1).
    TI list screen
    Data Regression table on NumWorks.
  5. Go to the Graph tab.
  6. The default is linear regression, and the equation is at the bottom of the screen. If needed, change the regression type by pressing O and choosing a different regression type.
    TI linear regression
    Linear Regress result on a NumWorks.

T(c) = 0.811c + 42.57

Distinguish Between Linear and Non-Linear Models

Some data such as the cricket-chirp model exhibit strong linear trends, but other data, like the height of a ball thrown in the air are nonlinear. Most calculators and computer software can also provide the correlation coefficient, r, which is a measure of how closely the line fits the data. Some graphing calculators require the user to use a “diagnostic on” selection to find the correlation coefficient. The correlation coefficient provides an easy way to get an idea of how close to a line the data falls. If r is very near 1 or −1, then the data is very linear; if r is near 0, then the data is not linear. However, the correlation coefficient should only be used on data that looks linear because some symmetric nonlinear data sets can have r = 1.

To get a sense for the relationship between the value of r and the graph of the data, figure 12 shows some large data sets with their correlation coefficients.

correlation coefficients for some distributions
Plotted data and related correlation coefficients. (wikimedia/DenisBoigelot)
Correlation Coefficient

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

Find 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 a calculator 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.9808. This value is very close to 1, which suggests a strong increasing linear relationship.

TI correlation coefficient
NumWorks correlation coefficient
Linear regression screen on a (a) TI-84 and (b) NumWorks.

Note: For some calculators, the Diagnostics must be turned “on” in order to get the correlation coefficient when linear regression is performed: For TI graphing calculators try z or N and scroll to DIAGNOSTICSON.

Variations

Some relationships depend only on one quantity, such as sales commissions. An employee who earns their pay by commission is given a percentage of the amount of sales he or she made. For example, Sally sells houses and earns 2% commission. If she sells a $250,000, then she earns 2% of $250,000 or (0.02)($250000) = $5000. Sally's earnings functions could be e = 0.02s where s is her sales. As her sales increase, her earnings also increase. This type of relationship, y = ax, is direct variation. Other types of variations are given in the box below.

Types of Variation

In all cases, a is the constant of variation.

Solve Variation Problems
  1. Identify the input and output.
  2. Identify the type of variation.
  3. Write the general equation of the variation using variables to represent the input and output quantities.
  4. Substitute in a given data point and solve for the constant of variation, a.
  5. Write the equation for the variation by filling in the value of the constant.
  6. Use this equation to solve the problem.

Solve a Direct Variation

y varies directly with the square of x. If y = 32 when x = 5, find the equation relating x and y. Then find y when x is 6.

Solution

Because the problem uses x and y, the input is x2 and the output is y. The problem states that this is direct variation. Write the general equation of direct variation.

y = ax2

Fill in the given value of x and y.

32 = a(52)

Solve for the constant a.

32 = a(25)

$$ a = \frac{32}{25} $$

Now use the constant to write an equation that represents this relationship.

$$ y = \frac{32}{25}x^2 $$

Substitute x = 6 and solve for y.

$$ y = \frac{32}{25}(6^2) $$

$$ y = \frac{1152}{25} $$

y varies directly with the cube of x. If y = 24 when x = 3, find the equation relating x and y. Then find y when x is 5.

Answer

\(y = \frac{8}{9}x^3\); \(\frac{1000}{9}\)

Write a Formula for an Inverse Variation

In electricity, the current, I, of a circuit varies inversely with the resistance, R. In this particular circuit, the current is 0.0015 A when the resistance is 1000 Ω. Write a function relating the current and the resistance of the circuit.

Solution

The input is the resistance, R, and the output is the current, I. This is usually distinguishable because the current came first in the problem sentence. The problem states it is an inverse variation. Write the general equation for inverse variation.

$$ y = \frac{a}{x} $$

Because it is the input, replace the x with the resistance, R. Also, replace the output y with the current, I.

$$ I = \frac{a}{R} $$

Fill in the given values and solve for a.

$$ 0.0015 = \frac{a}{1000} $$

1.5 = a

Substitute a into the model.

$$ I = \frac{1.5}{R} $$

Solve an Inverse Variation Problem

A quantity y varies inversely with the square of x. If y = 25 when x = 4, find the equation relating x and y. Then find y when x is 2.

Solution

The input is x2 and the output is y. Write the general equation for inverse variation.

$$ y = \frac{a}{x^2} $$

Fill in the given values and solve for a.

$$ 25 = \frac{a}{4^2} $$

400 = a

Substitute a into the model.

$$ y = \frac{400}{x^2} $$

Now fill in x = 2 and find y.

$$ y = \frac{400}{2^2} $$

y = 100

A quantity y varies inversely with the cube of x. If y = 4 when x = 3, find the equation relating x and y. Then find y when x is 2.

Answer

\(y = \frac{108}{x^3}\); \(\frac{27}{2}\)

Solve a Problem Involving Joint Variation

A quantity x varies jointly with the square of y cube root of z. If x = 20 when y = 2 and z = 8, find the equation relating the quantities. Then find x when y = 1 and z = 27.

Solution

The output is x because it comes first in the sentence. The inputs are y2 and \(\sqrt[3]{z}\). Write the equation as suggested by the sentence. The word "varies" indicates "= a".

$$ x = ay^2 \sqrt[3]{z} $$

Fill in the given values and solve for a.

$$ 20 = a(2^2)\sqrt[3]{8} $$

$$ 20 = a(8) $$

$$ \frac{5}{2} = a $$

Substitute a into the model.

$$ x = \frac{5}{2}y^2\sqrt[3]{z} $$

Now fill in y = 1 and z = 27 and find x.

$$ x = \frac{5}{2}(1^2)\sqrt[3]{27} $$

$$ x = \frac{15}{2} $$

x varies directly with the square of y and inversely with z. If x = 40 when y = 4 and z = 2, find the equation relating the quantities. Then find x when y = 10 and z = 25.

Answer

\(x = \frac{5y^2}{z}\); 20

Lesson Summary

Scatter Plot
  1. Graph all the points from the data.
  2. If the points seem to form a line, then there is likely a linear relationship.

Estimate a Best-Fitting Line
  1. Draw a scatter plot.
  2. Draw the approximate best-fitting line such that
    • the line passes through the middle of the points,
    • there are the same number of points above and below the line,
    • and the average distance between the points and the line is a minimum.
  3. Pick two points on the line that are far apart (these do not have to be from the data set).
  4. Find the slope between the two lines.
  5. Use the slope and a point to find the equation of the line.

Interpolation and Extrapolation

Methods of making predictions and analyzing data.


Find a Linear Regression on a TI-84
TI-84 Reg
TI-84 Linear Regression
  1. Push and select Edit….
  2. Enter the x-values in List 1 (L1) and the y-values in List 2 (L2).
  3. To see the graph of the points
    1. Push o and clear any equations.
    2. While still in o, go up and highlight Plot1 and press Í.
    3. Press q and select ZoomStat.
  4. Push and move over to the CALC menu.
  5. Select LinReg(ax+b) (Linear Regression).
  6. Make sure the Xlist: is L1,the Ylist: is L1, the FreqList: is blank, and the Store RegEQ: is Y1.
    1. Get Y1 by pressing ½ and select Y-VARS menu.
    2. Select Function….
    3. Select Y1.
  7. Press Calculate

The calculator will display the equation. To see the graph of the points and line, press s.

Note: Older TI graphing calculators do not have the screen in steps 6 and 7. After selecting the LinReg(ax+b), the screen just shows "LinReg(ax+b)". Press Í again to see the result. To see the graph, enter the equation into the o screen and press s.


Find a Linear Regression on a NumWorks Graphing Calculator
NumWorks Reg
NumWorks Linear Regression
  1. On the home screen select Regression.
  2. In the Data tab, enter the points.
  3. Move to the Graph tab.
  4. The default is a linear regression and is displayed at the bottom of the screen. To change the regression type
    1. Press O.
    2. Select Regression.
    3. Select the desired regression type.


Correlation Coefficient

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


Types of Variation

In all cases, a is the constant of variation.


Solve Variation Problems
  1. Identify the input and output.
  2. Identify the type of variation.
  3. Write the general equation of the variation using variables to represent the input and output quantities.
  4. Substitute in a given data point and solve for the constant of variation, a.
  5. Write the equation for the variation by filling in the value of the constant.
  6. Use this equation to solve the problem.

Helpful videos about this lesson.

Practice Exercises

  1. What is extrapolation when using a linear model?
  2. A scientist collected data about the diameter of a tree and the age of the tree. She performed a regression 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 = 0.715
      b = −0.414
      r = 0.965
  3. Draw a scatter plot for the data provided. Does the data appear to be linearly related? If yes, find the equation of the best fitting line.
  4. 123456
    465055586368
  5. 1357911
    19254981121
  6. A spring stretches when a mass is hung from it. The table shows the data from a certain spring. Draw a scatter plot and estimate the equation of the best-fitting line. How far would 2.5 kg stretch this spring?
    Mass (kg)1.01.21.41.61.82.0
    Length (cm)21.425.629.834.538.743.0
  7. The U.S. Census tracks the percentage of persons 25 years or older who are college graduates. That data for women for several years is given in Table 2. Determine whether the trend appears linear. If so, and assuming the trend continues, in what year will the percentage exceed 50%?
    Table 2
    Year19841989199419992004200920142019
    Percent Graduates15.718.119.623.126.129.132.036.6
  8. Use the data set to calculate the regression line using a graphing utility and determine the correlation coefficient to 3 decimal places of accuracy.
    x215263055
    y019364279
  9. The population of Berrien Springs, Michigan decreased from 1980 to 2019. Table 3 shows the population data.
    Table 3
    Year19801990200020102019
    Population20421927186218001727
  10. Use a linear regression to determine a function P, where the population depends on the year, t. Let t = 0 represent 1980. Round to three decimal places of accuracy.
  11. Predict when the population will hit 1500.
  12. Write an equation describing the relationship of the given variables. Then solve for the unknown variable.
  13. y varies directly as x. When x = 4, then y = 16. Find y when x = 8.
  14. y varies directly as the square root of x. When x = 16, then y = 8. Find y when x = 25.
  15. y varies inversely with x. When x = 3, then y = 6. Find y when x = 9.
  16. y varies inversely with the square of x. When x = 2, then y = 1. Find y when x = 3.
  17. y varies jointly as x, z, and w. When x = 4, z = 2, and w = 7, then y = 168. Find y when x = 1, z = 2, and w = 3.
  18. y varies jointly as the square of x and the square root of z. When x = 2 and z = 9, then y = 48. Find y when x = 5 and z = 4.
  19. The current in a circuit varies inversely with its resistance measured in ohms. When the current in a circuit is 2 amperes, the resistance is 100 ohms. Find the current if the resistance is 120 ohms.
  20. The rate of vibration of a string under constant tension varies inversely with the length of the string. If a string is 36 inches long and vibrates 120 times per second, what is the length of a string that vibrates 60 times per second?
  21. Mixed Review
  22. (1-09) Use function composition to verify that f(x) and g(x) are inverse functions. f(x) = 2x3; \(g(x) = \sqrt[3]{\frac{x}{2}}\)
  23. (1-09) Find the inverse function of \(f(x) = \frac{3}{x+2}\)
  24. (1-07) Write a function for the following graph.

Answers

  1. Making predictions based on a model outside of the data range.
  2. about 6.7 years
  3. ; y = 4.343x + 41.467
  4. ; not linear
  5. ; extrapolation; 53.7 cm
  6. ; 2043
  7. y = 1.494x − 3.045; r = 1.000
  8. ; P = −7.73t + 2024.62
  9. 2047
  10. y = 4x; 32
  11. \(y = 2\sqrt{x}\); 10
  12. \(y = \frac{18}{x}\); 2
  13. \(y = \frac{4}{x^2}\); \(\frac{4}{9}\)
  14. y = 3xzw; 18
  15. \(y = 4x^2\sqrt{z}\); 200
  16. 1.67 amperes
  17. 72 inches
  18. f(g(x)) = x
  19. \(f^{-1}(x) = \frac{3}{x} - 2\)
  20. \(f(x) = -\frac{1}{x-2} + 1\)