Skip to main content
Logo image

Section 4.3 Curve Fitting

Earlier, we used linear regression to fit a line to a collection of data points. In this section we’ll see how to fit a quadratic equation to a collection of data points.

Subsection 4.3.1 Finding a Quadratic Equation through Three Points

Every linear equation can be written in the form
\begin{equation*} y=mx+b \end{equation*}
To find a specific line we must find values for the two parameters (constants) \(m\) and \(b\text{.}\) We need two data points in order to find those two parameters. A quadratic equation, however, has three parameters, \(a,~b,\) and \(c\text{:}\)
\begin{equation*} y=ax^2+bx+c \end{equation*}
To find these parameters we need three data points.

Example 4.3.1.

Find values for \(a\text{,}\) \(b\text{,}\) and \(c\) so that the points \((1, 3)\text{,}\) \((3, 5)\text{,}\) and \((4, 9)\) lie on the graph of \(y = ax^2 + bx + c\text{.}\)
Solution.
We substitute the coordinates of each of the three points into the equation of the parabola to obtain three equations:
\begin{align*} \alert{3} =\amp a(\alert{1})^2 + b(\alert{1}) + c \amp\\ \alert{5} =\amp a(\alert{3})^2 + b(\alert{3}) + c \amp\\ \alert{9} =\amp a(\alert{4})^2 + b(\alert{4}) + c \amp \end{align*}
or, equivalently,
\begin{align*} a + b + c \amp = 3 \amp\amp(1)\\ 9a + 3b + c \amp = 5 \amp\amp(2)\\ 16a + 4b + c \amp = 9 \amp\amp(3) \end{align*}
This is a system of three equations in the three unknowns \(a\text{,}\) \(b\text{,}\) and \(c\text{.}\) To solve the system, we use Gaussian reduction. We first eliminate \(c\text{.}\) We subtract Equation (1) from Equation (2) to obtain
\begin{equation*} 8a + 2b = 2 \hphantom{blankblank}(4) \end{equation*}
and then subtract Equation (1) from Equation (3) to get
\begin{equation*} 15a + 3b = 6 \hphantom{blankblank}(5) \end{equation*}
We now have a system of two linear equations in two variables:
\begin{align*} 8a + 2b \amp = 2 \amp\amp(4)\\ 15a +3b \amp = 6 \amp\amp(5) \end{align*}
Next, we eliminate \(b\) from Equations (4) and (5): we add \(-3\) times Equation (4) to \(2\) times Equation (5) to get
\(-24a\) \(-\) \(6b\) \(=\) \(-6\) \(\hphantom{blank}\) \(-3\times(4)\)
\(30a\) \(+\) \(6b\) \(=\) \(12\) \(\) \(2\times(5)\)
\(6a\) \(\) \(\) \(=\) \(6\) \(\) \(\)
or \(a = 1\text{.}\) We substitute \(1\) for \(a\) in Equation (4) to find
\begin{align*} 8(\alert{1}) + 2b \amp= 2 \amp\amp \blert{\text{Solve for }b.}\\ b \amp= -3 \end{align*}
Finally, we substitute \(-3\) for \(b\) and \(1\) for \(a\) in Equation (1) to find
\begin{align*} \alert{1} + (\alert{-3}) + c\amp = 3\amp\amp \blert{\text{Solve for }c.}\\ c \amp = 5 \end{align*}
Thus, the equation of the parabola is
\begin{equation*} y = x^2 - 3x + 5 \end{equation*}
The parabola and the three points are shown below.
parabola through-3 specified points

Checkpoint 4.3.2. QuickCheck 1.

Fill in the blanks. To find the equation for a parabola:
  1. We can use the formula \(~y=a(x-x_v)^2+y_v~\) if we know the
    • Gaussian reduction
    • x-intercepts
    • vertex
    • three
    • one
    and one other point.
  2. We can use the formula \(~y=a(x-r_1)(x-r_2)~\) if we know the
    • Gaussian reduction
    • x-intercepts
    • vertex
    • three
    • one
    and one other point.
  3. Otherwise, we must know at least
    • Gaussian reduction
    • x-intercepts
    • vertex
    • three
    • one
    points on the graph.
  4. In that case, we use
    • Gaussian reduction
    • x-intercepts
    • vertex
    • three
    • one
    to solve for the parameters of the equation.
Answer 1.
\(\text{vertex}\)
Answer 2.
\(\text{x-intercepts}\)
Answer 3.
\(\text{three}\)
Answer 4.
\(\text{Gaussian reduction}\)
Solution.
  1. vertex
  2. \(x\)-intercepts
  3. three
  4. Gaussian reduction

Checkpoint 4.3.3. Practice 1.

  1. Find the equation of a parabola
    \begin{equation*} y = ax^2 + bx + c \end{equation*}
    that passes through the points \((0, 80)\text{,}\) \((15, 95)\text{,}\) and \((25, 55)\text{.}\)
    \(y=\)
  2. Plot the data points and sketch the parabola.
Answer.
\(\frac{-1}{5}x^{2}+4x+80\)
Solution.
  1. \(\displaystyle y = \frac{-1}{5} x^2 + 4x + 80\)
  2. A graph is below.
parabola

Subsection 4.3.2 Applications

The simplest way to fit a parabola to a set of data points is to pick three of the points and find the equation of the parabola that passes through those three points.

Example 4.3.4.

Major Motors Corporation is testing a new car designed for in-town driving. The data below show the cost of driving the car at different speeds. The speeds, \(v\text{,}\) are given in miles per hour, and the cost, \(C\text{,}\) includes fuel and maintenance for driving the car \(100\) miles at that speed.
\(v\) \(30\) \(40\) \(50\) \(60\) \(70\)
\(C\) \(6.50\) \(6.00\) \(6.20\) \(7.80\) \(10.60\)
Find a possible quadratic model, \(~C=av^2+bv+c,~\) that expresses \(C\) in terms of \(v\text{.}\)
Solution.
When we plot the data, it is clear that the relationship between \(v\) and \(C\) is not linear, but it may be quadratic, as shown at right.
We will use the last three data points, \((50, 6.20)\text{,}\) \((60, 7.80)\text{,}\) and \((70, 10.60)\text{,}\) to fit a parabola to the data. We would like to find the coefficients \(a\text{,}\) \(b\text{,}\) and \(c\) of a parabola \(C = av^2 + bv + c\) that includes the three data points. This gives us a system of equations:
scatterplot points following parabola shape
\begin{align*} 2500a + 50b + c \amp = 6.20 \amp\amp(1)\\ 3600a + 60b + c \amp = 7.8 \amp\amp(2)\\ 4900a + 70b + c \amp = 10.6 \amp\amp(3) \end{align*}
Eliminating \(c\) from Equations (1) and (2) yields Equation (4), and eliminating \(c\) from Equations (2) and (3) yields Equation (5).
\begin{align*} 1100a + 10b \amp = 1.60 \amp\amp(4)\\ 1300a + 10b \amp = 2.8 \amp\amp(5) \end{align*}
Eliminating \(b\) from Equations (4) and (5) gives us
\begin{align*} 200a \amp= 1.20\\ a \amp= 0.006 \end{align*}
We substitute this value into Equation (4) to find \(b = -0.5\text{,}\) then substitute both values into Equation (1) to find \(c = 16.2\text{.}\)
Thus, our quadratic model is
\begin{equation*} C = 0.006v^2 - 0.5v + 16.2 \end{equation*}
The graph of this equation, along with the data points, is shown at right.
parabola fitting nonlinear scatterplot
As was the case with linear regression, the graph of the regression equation may not pass through all of the data points, but it should be close to most of them.

Checkpoint 4.3.5. Practice 2.

The data below show Americans’ annual per capita consumption of chicken for several years since 1985.
Year 1986 1987 1988 1989 1990
Pounds of chicken \(51.3\) \(55.5\) \(57.4\) \(60.8\) \(63.6\)
  1. Use the values for 1987 through 1989 to fit a quadratic equation to the data, \(~C=at^2+bt+c,~\) where \(t\) is measured in years since 1985.
    \(C=\)
  2. What does your equation predict for per capita chicken consumption in 1990?
    Answer: lbs
  3. Sketch the graph of your equation and the given data. Does your model provide a good fit for the data?
Answer 1.
\(0.75t^{2}+\left(-1.85\right)t+56.2\)
Answer 2.
\(65.7\)
Solution.
  1. \(\displaystyle C=0.75t^2-1.85t+56.2\)
  2. 65.7 lbs
  3. A graph is below.
scatterplot and parabola fit

Checkpoint 4.3.6. QuickCheck 2.

True or False
  1. We can plot the data points to see what type of curve is appropriate as a model.
    • True
    • False
  2. We write a system of equations in which the \(y\)-coordinates of the data points are the unknown values.
    • True
    • False
  3. A good regression equation will pass through all of the data points.
    • True
    • False
  4. According to the model in the previous Example (involving a quadratic model for the cost of driving at different speeds), higher speeds always result in higher driving costs.
    • True
    • False
Answer 1.
\(\text{True}\)
Answer 2.
\(\text{False}\)
Answer 3.
\(\text{False}\)
Answer 4.
\(\text{False}\)
Solution.
  1. True
  2. False
  3. False
  4. False

Subsection 4.3.3 Using a Calculator for Quadratic Regression

We can use a graphing calculator to find an approximate quadratic fit for a set of data. The procedure is similar to the steps for linear regression.

Example 4.3.7.

  1. Use your calculator to find a quadratic fit for the data in Example 4.
  2. How many of the given data points actually lie on the graph of the quadratic approximation?
Solution.
  1. We press STAT ENTER and enter the data under columns \(L_1\) and \(L_2\text{,}\) as shown below. Next, we calculate the quadratic regression equation and store it in \(Y_1\) by pressing STAT \(5\) VARS \(1\) \(1\) ENTER.
    The regression equation has the form \(y = ax^2 + bx + c\text{,}\) where \(a = 0.0057\text{,}\) \(b = -0.47\text{,}\) and \(c = 15.56\text{.}\) Notice that \(a\text{,}\) \(b\text{,}\) and \(c\) are all close to the values we computed in Example 4.3.4.
    GC lists and GC quadratic regression output
  2. Next, we will graph the data and the regression equation. We press Y= and select Plot1, then press ZOOM \(9\) to see the graph shown below. The parabola seems to pass close to all the data points.
    However, try using either the value feature or a table to find the \(y\)-coordinates of points on the regression curve. By comparing these \(y\)-coordinates with our original data points, we find that none of the given data points lies precisely on the parabola.
    GC plot and GC table quadratic regression output

Checkpoint 4.3.8. Practice 3.

To test the effects of radiation, a researcher irradiated male mice with various dosages and bred them with unexposed female mice. The table below shows the fraction of fertilized eggs that survived, as a function of the radiation dosage. (Source: Strickberger, Monroe W., 1976)
Radiation (rems) \(100\) \(300\) \(500\) \(700\) \(900\) \(1100\) \(1500\)
Relative survival of eggs \(0.94\) \(0.700\) \(0.544\) \(0.424\) \(0.366\) \(0.277\) \(0.195\)
  1. Enter the data into your calculator and create a scatterplot. Does the graph appear to be linear? Does it appear to be quadratic?
    • linear
    • quadratic
  2. Fit a quadratic regression equation to the data and graph the equation on the scatterplot.
    \(y=\)
Answer 1.
\(\text{quadratic}\)
Answer 2.
\(3.65014\times 10^{-7}x^{2}-0.001x+1.02\)
Solution.
  1. The graph appears to be quadratic.
  2. \(\displaystyle y = 3.65\times 10^{-7}x^2 - 0.001x + 1.02\)
Graph for part (a):
parabola fit to points

Subsection 4.3.4 Choosing an Appropriate Model

We must be careful that our data set gives a complete picture of the situation we want to model. A regression equation may fit a particular collection of data and still be a poor model if the rest of the data diverge from the regression graph.
GC graph showing a poor linear fit for quadratic data
In Example 4.3.4, suppose Major Motors had collected only the first three data points and fit a line through them, as shown at left. This regression line gives poor predictions for the cost of driving at 60 or 70 miles per hour.

Example 4.3.9.

Delbert records the height of the tip of the minute hand on the classroom’s clock at different times. The data are shown in the table, where time is measured in minutes since noon. (A negative time indicates a number of minutes before noon.) Find a quadratic regression equation for the data and use it to predict the height of the minute hand’s tip at 40 minutes past noon. Do you believe this prediction is valid?
Time
(minutes)
\(-25\) \(-20\) \(-15\) \(-10\) \(-5\) \(0\) \(5\) \(10\) \(15\) \(20\) \(25\)
Height
(feet)
\(7.13\) \(7.50\) \(8.00\) \(8.50\) \(8.87\) \(9.00\) \(8.87\) \(8.50\) \(8.80\) \(7.50\) \(7.13\)
Solution.
We enter the time data under \(L_1\) and the height data under \(L_2\text{.}\) Then we calculate and store the quadratic regression equation in \(Y_1\text{,}\) as we did in Example 4.3.7. The regression equation is
\begin{equation*} y = -0.00297x^2 + 0x + 8.834 \end{equation*}
From either the graph of the regression equation or from the table (see figure below), we can see that the fit is not perfect, although the curve certainly fits the data better than any straight line could.
GC screens of graph and tables for quadratic fit
If we scroll down the table, we find that this equation predicts a height of approximately 4.08 feet at time 40 minutes. (See figure (c).) This is a preposterous estimate! The position of the minute hand at 40 minutes after noon should be the same as it was exactly one hour earlier (at 20 minutes before noon), when it was 7.50 feet.

Caution 4.3.10.

Using the wrong type of function to fit the data is a common error in making predictions. In the Example above, we know that the minute hand of a clock repeats its position every 60 minutes. The graph of the height of its tip oscillates up and down, repeating the same pattern over and over. We cannot describe such a graph using either a linear or a quadratic function.
parabola fit on part of a periodic wave
The graph of the height is shown at left, along with the graph of our quadratic regression equation. You can see that the regression equation fits the actual curve only on a small interval.
Even though your calculator can always compute a regression equation,that equation is not necessarily appropriate for your data. Choosing a reasonable type of regression equation for a particular data set requires knowledge of different kinds of models and the physical or natural laws that govern the situation at hand.

Checkpoint 4.3.11. QuickCheck 3.

True or False
  1. Your calculator can choose the correct type of regression equation for a data set.
    • True
    • False
  2. It is only necessary to use the first and last data points to compute a regression equation.
    • True
    • False
  3. A regression equation may fit some of the data but still be a poor model.
    • True
    • False
  4. A good regression equation should fit all the data points exactly.
    • True
    • False
Answer 1.
\(\text{False}\)
Answer 2.
\(\text{False}\)
Answer 3.
\(\text{True}\)
Answer 4.
\(\text{False}\)
Solution.
  1. False
  2. False
  3. True
  4. False

Checkpoint 4.3.12. Practice 4.

A speeding motorist slams on the brakes when she sees an accident directly ahead of her. The distance she has traveled \(t\) seconds after braking is shown in the table.
Time (seconds) \(0\) \(0.5\) \(1.0\) \(1.5\) \(2.0\) \(2.5\)
Distance (feet) \(0\) \(51\) \(95\) \(131\) \(160\) \(181\)
  1. Enter the data into your calculator and create a scatterplot. Fit a quadratic regression equation to the data and graph the equation on the scatterplot.
    Regression equation: \(y=\) Use \(x\) for the time in seconds.
  2. Use your regression equation to find the vertex of the parabola:
    What do the coordinates represent in terms of the problem?
Answer 1.
\(-15x^{2}+109.957x-0.0714286\)
Answer 2.
\(\left(3.66524,201.438\right)\)
Solution.
  1. A graph is below.
    \(y = -15x^2 + 110x - 0.07\)
  2. \((3.67, 201)\text{:}\) The car came to a stop in 3.67 seconds, after sliding 201 feet.
Graph for part (a):
parabola fit to points

Exercises 4.3.5 Problem Set 4.3

Warm Up

Exercise Group.
For Problems 1 and 2, state the vertex, the \(y\)-intercept, and the \(x\)-intercepts of the parabola.
1.
\(y=-2(x-4)^2+10\)
Answer.
\((4,10),~(0,-22),~(4 \pm \sqrt{5},0)\)
2.
\(y=\dfrac{1}{3}(x+1)^2-4\)
3.
You are in charge of selling tickets to a one-woman show at a local art gallery. Tickets to the opening night were priced at $25, and you sold 30 tickets.
  1. Every night after the opening, you reduce the ticket price by $2. What is the ticket price after \(x\) nights?
  2. Every night after the opening, you sell 4 more tickets than the previous night. How many tickets did you sell \(x\) nights after the opening?
Answer.
  1. \(\displaystyle 25-2x\)
  2. \(\displaystyle 30+4x\)
4.
The point \((-3,8)\) lies on the graph of \(y=ax^2+bx+c\text{.}\) Write an equation involving \(a,~b,\) and \(c\text{.}\)
Exercise Group.
For Problems 5–8, find an equation for the parabola. Use the vertex form or the factored form of the equation, whichever is more appropriate.
5.
graph
Answer.
\(y=-x^2-2x+8\)
6.
graph
7.
graph
Answer.
\(y=-x^2\)
8.
graph

Skills Practice

Exercise Group.
For Problems 9–12, solve the system by elimination. Begin by eliminating \(c\text{.}\)
9.
\begin{align*} a+b+c \amp = -3\\ a-b+c \amp = -9\\ 4a+2b+c \amp = -6 \end{align*}
Answer.
\((-2,3,-4)\)
10.
\begin{align*} a+b+c \amp = 10\\ 4a+2b+c \amp = 19\\ 9a+3b+c \amp = 38 \end{align*}
11.
\begin{align*} a-b+c \amp = 12\\ 4a-2b+c \amp = 19\\ 9a+3b+c \amp = 4 \end{align*}
Answer.
\((1,-4,7)\)
12.
\begin{align*} 4a+2b+c \amp = 14\\ 9a-3b+c \amp = -41\\ 16a-4b+c \amp = -70 \end{align*}
13.
Find values for \(a,~b,\) and \(c\) so that the graph of \(y = ax^2+bx+c\) includes the points \((-1,0), ~(2,12),\) and \((-2,8)\text{.}\)
Answer.
\(a=3,~b=1,~c=-2\)
14.
Find values for \(a,~b,\) and \(c\) so that the graph of \(y = ax^2+bx+c\) includes the points \((-1,2), ~(1,6),\) and \((2,11)\text{.}\)

Applications

15.
The data show the number of people of certain ages who were the victims of homicide in a large city last year.
Age \(10\) \(20\) \(30\) \(40\)
Number of victims \(12\) \(62\) \(72\) \(40\)
  1. Use the first three data points to fit a quadratic equation to the data, \(~N=ax^2+bx+c\text{,}\) where \(x\) represents age.
  2. What does your equation predict for the number of 40-year-olds who were the victims of homicide?
  3. Sketch the graph of your quadratic equation and the given data on the same axes.
Answer.
  1. \(\displaystyle y=a(x-5)^2-10=-0.2x^2+11x-78\)
  2. \(\displaystyle 42\)
16.
Sara plans to start a side business selling eggs. She finds that the total number of eggs produced each day depends on the number of hens confined in the henhouse, as shown in the table.
Number of hens, \(n\) \(15\) \(20\) \(25\) \(30\) \(36\) \(39\)
Number of eggs, \(E\) \(15\) \(18\) \(20\) \(21\) \(21\) \(20\)
  1. Use the first three data points to find a quadratic model, \(~E=an^2+bn+c\text{.}\)
  2. Plot the data and sketch the model on the same axes.
  3. What does the model predict for the number of eggs produced when 39 hens are confined in the henhouse?
17.
Find a quadratic model for the number of diagonals that can be drawn in a polygon of \(n\) sides. Some data are provided.
Sides \(4\) \(5\) \(6\) \(7\)
Diagonals \(2\) \(5\) \(9\) \(14\)
Answer.
\(D=\dfrac{1}{2}n^2 - \dfrac{3}{2}n\)
18.
You are driving at a speed of 60 miles per hour when you step on the brakes. Find a quadratic model for the distance in feet that your car travels in \(t\) seconds after braking. Some data are provided.
Seconds \(1\) \(2\) \(3\) \(4\)
Feet \(81\) \(148\) \(210\) \(267\)
19.
In the 1990’s, an outbreak of mad cow disease (Creutzfeldt-Jakob disease) alarmed health officials in England. The table shows the number of deaths each year from the disease.
Year \(94\) \(95\) \(96\) \(97\) \(98\) \(99\) \(00\) \(01\) \(02\) \(03\) \(04\)
Deaths \(0\) \(3\) \(10\) \(10\) \(18\) \(15\) \(28\) \(20\) \(17\) \(19\) \(9\)
(Source: www.cjd.ed.ac.uk/vcjdqsep05)
  1. The Health Protection Agency determined that a quadratic model was the best-fitting model for the data. Find a quadratic regression equation for the data.
  2. Use your model to estimate when the peak of the epidemic occurred, and how many deaths from mad cow disease were expected in 2005.
Answer.
  1. \(\displaystyle N=-0.59t^2+7.33t-2.54\)
  2. \(\displaystyle 2000;~7\)
20.
The table shows the height in kilometers of a star-flare at various times after it exploded from the surface of a star.
Time (seconds) \(0.2\) \(0.4\) \(0.6\) \(0.8\) \(1.0\) \(1.2\)
Height (kilometers) \(6.8\) \(12.5\) \(17.1\) \(20.5\) \(22.8\) \(23.9\)
  1. Find the equation of the least-squares regression line for the height of the flare in terms of time.
  2. Use the regression line to predict the height of the flare 1.4 seconds after it exploded.
  3. Make a scatterplot of the data and draw the regression line on the same axes.
  4. Find the quadratic regression equation for the height in terms of time.
  5. Use the quadratic regression equation to predict the height of the flare 1.4 seconds after it exploded.
  6. Draw the quadratic regression curve on the graph from part (c).
  7. Which model is more appropriate for the height of the star-flare, linear or quadratic? Why?
21.
Some comets move about the sun in parabolic orbits. In 1973 the comet Kohoutek passed within 0.14 AU (astronomical units), or 21 million kilometers of the sun. Imagine a coordinate system superimposed on a diagram of the comet’s orbit, with the sun at the origin, as shown below. The units on each axis are measured in AU.
graph
  1. The comet’s closest approach to the sun (called perihelion) occurred at the vertex of the parabola. What were the comet’s coordinates at perihelion?
  2. When the comet was first discovered, its coordinates were \((1.68,-4.9)\text{.}\) Find an equation for comet Kohoutek’s orbit in vertex form.
Answer.
  1. \(\displaystyle (0,0.14)\)
  2. \(\displaystyle y=-1.786x^2+0.14\)
22.
The Akashi Kaikyo bridge in Japan is the longest suspension bridge in the world, with a main span of 1991 meters. Its main towers are 297 meters tall. The roadbed of the bridge is 14 meters thick and clears the water below by 65 meters. The cables on a suspension bridge hang in the shape of parabolas. Imagine a coordinate system superimposed on the diagram of the bridge, as shown in the figure.
graph
  1. Find the coordinates of the vertex and one other point on the cable.
  2. Use the points from part (a) to find an equation for the shape of the cable in vertex form.
You have attempted of activities on this page.