Solving Problems Given Functions Fitted to Data

Download Report

Transcript Solving Problems Given Functions Fitted to Data

Introduction
Data surrounds us in the real world. Every day, people
are presented with numbers and are expected to make
predictions about future events based upon that given
data. A regression equation is an equation that best
represents a set of data, and it can be used to predict
missing data or future data. Different types of equations
are suited to different types of data. Regression is the
mathematical process for determining an equation from
a set of given data. Regression is used to make
predictions for values of an independent variable. Some
data is best represented by linear or exponential
equations, as you have seen previously.
5.9.1: Solving Problems Given Functions Fitted to Data
1
Introduction, continued
Quadratic regression is the process of finding the
equation of a parabola that fits a given set of data. In this
lesson, you will work with data sets that are best
represented by quadratic equations, and you will learn
how to write a quadratic regression equation, a
regression equation that fits a parabola to data.
2
5.9.1: Solving Problems Given Functions Fitted to Data
Key Concepts
• A linear equation describes a situation where there is
a near-constant rate of change.
• An exponential equation describes a situation where
the data changes by a constant multiple.
• A quadratic equation describes data that increases
then decreases, or vice versa.
• If you are given a set of data and you are not sure
whether the data is best modeled by a linear
regression or a quadratic regression, you can look at
the first and second differences.
3
5.9.1: Solving Problems Given Functions Fitted to Data
Key Concepts, continued
• In a linear model, the y-value changes by a constant
when the x-value increases by 1. The change in y
when x increases by 1 is called a first difference. If
your first differences are all about the same, then a
linear model is appropriate.
• In a quadratic model, the first differences are not the
same, but the change in the first differences is
constant. The change in successive first differences is
called a second difference.
• A quadratic regression equation fits a parabola to the
data.
4
5.9.1: Solving Problems Given Functions Fitted to Data
Key Concepts, continued
• The regression equation closely models the data but
is not necessarily an exact fit. Actual data values and
regression values might differ.
• Regression equations can be used to make
predictions about the dependent variable for given
values of the independent variable.
• Interpolation is when a regression equation is used
to make predictions about a dependent variable that is
within the range of the given data.
• Think of interpolation as finding “missing” data points
within the given data.
5
5.9.1: Solving Problems Given Functions Fitted to Data
Key Concepts, continued
• To interpolate, substitute the x-value into the given
regression equation and solve for the y-value.
• Extrapolation is when a regression equation is used
to make predictions about a dependent variable that is
outside the range of the given data.
• Think of extrapolation as predicting data values based
on the model outside of the given data.
• To extrapolate, substitute the x-value into the
regression equation and solve for the y-value.
6
5.9.1: Solving Problems Given Functions Fitted to Data
Key Concepts, continued
• The farther away you move from the given data to
make predictions, the less accurate your predictions
become.
• Be careful when extrapolating data and always make
sure the predictions are reasonable.
• To write a regression model for a set of data without a
calculator, first plot the given points. If the data has a
basic parabolic shape (the values rise and then fall, or
vice versa), you can write a quadratic equation to
model the data.
7
5.9.1: Solving Problems Given Functions Fitted to Data
Key Concepts, continued
• To write a quadratic regression equation, determine
where the vertex would be for a parabola that models
your data. Then, use either the two x-intercepts or the
y-intercept to write the equation.
• Graph your regression equation to make sure that it
approximates the data.
8
5.9.1: Solving Problems Given Functions Fitted to Data
Common Errors/Misconceptions
• confusing which type of function best describes the
data
• forgetting to consider whether extrapolations are
reasonable
• confusing the independent and dependent variables
• choosing the incorrect regression model for the given
data
9
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice
Example 1
The following data table shows a car’s speed in miles
per hour and the car’s fuel efficiency in miles per gallon
for each speed.
Speed (mph)
18.6 24.9 31.1 37.3 43.5 49.7 55.9 62.1
Fuel efficiency
26.1 29.4 31.4 33.1 33.1 31.4 29.4 26.1
(mpg)
A quadratic regression equation that models this data is
given by m(x) = –0.0146x2 + 1.1802x + 9.1356, where x
is speed in mph and m(x) is fuel efficiency in mpg.
5.9.1: Solving Problems Given Functions Fitted to Data
10
Guided Practice: Example 1, continued
A scatter plot of the
data with the graph
of this model is
shown to the right.
11
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
Use the given regression model to find the car’s fuel
efficiency in miles per gallon when this car is traveling
31.1 mph. Compare your answer to the data in the table.
Do these values match? Then use the graph to estimate
the speed(s) that will result in fuel efficiencies of about
25 mpg and 40 mpg. Use the model to check your
estimates.
12
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
1. Use the regression model to find the fuel
efficiency in miles per gallon when this
car is traveling 31.1 mph.
Substitute 31.1 for x in the given equation.
13
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
m ( x ) = -0.0146x 2 + 1.1802x + 9.1356
( )
(
)
(
Quadratic
regression
equation
)
Substitute 31.1
m x = -0.0146 31.1 + 1.1802 31.1 + 9.1356 for x.
2
m ( x ) » 31.7186
Solve.
According to the regression model, a car traveling
31.1 mph would get approximately 31.7186 miles per
gallon.
14
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
2. Compare your answer to the data in the
table.
The data in the table indicates that a car traveling
31.1 mph gets 31.4 mpg.
These values do not match exactly, but they are very
close. A regression model does not necessarily pass
through every data point, so individual values may be
slightly different when the model and the actual data
are compared. However, it is still a good model for
representing the data.
15
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
3. Use the graph to estimate the speed(s)
that will result in fuel efficiency of about
25 mpg. Use the model to check your
estimates.
Graph a horizontal line at y = 25.
The horizontal line indicates where the mpg is equal
to 25. This line crosses the parabola twice. Those xvalues appear to be about 17 mph and 64 mph.
The graph is shown on the next slide.
16
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
17
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
4. Use the model equation to check your
estimate.
Since 25 is the y-value, set the given equation equal
to 25.
–0.0146x2 + 1.1802x + 9.1356 = 25
Next, subtract 25 from both sides to set the equation
equal to 0.
–0.0146x2 + 1.1802x – 15.8644 = 0
18
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
Now that the quadratic equation is set up in the form
ax2 + bx + c = 0, determine the values of a, b, and c.
a = –0.0146, b = 1.1802, and c = –15.8644
Substitute these values into the quadratic formula,
x=
-b ± b2 - 4ac
for x.
2a
, and solve the resulting equation
19
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
Substitute values for a, b, and c:
x=
- (1.1802) ±
(1.1802) - 4 ( -0.0146) ( -15.8644)
2
2 ( -0.0146 )
Simplify, then solve.
x=
-1.1802 ± 0.46639108
-0.0292
x » 17.0 or x » 63.8
20
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
The quadratic formula yields x-values of
approximately 17.0 mph and 63.8 mph. These
values are a good match for the values estimated
using the graph.
At speeds of about 17.0 mph and 63.8 mph, we can
expect to attain a fuel efficiency of about 25 mpg.
21
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
5. Use the graph to estimate the speed(s)
that will result in a fuel efficiency of about
40 mpg.
Graph a horizontal line at y = 40 (see the next slide).
The horizontal line on the graph at y = 40 indicates at
which speeds the car gets 40 miles per gallon. The
maximum of the parabola is below this line.
Therefore, this vehicle cannot achieve a fuel
efficiency of 40 mpg at any speed.
22
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
23
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
6. Use the model equation to check your
result.
Since 40 is the y-value, set the given equation equal
to 40.
–0.0146x2 + 1.1802x + 9.1356 = 40
Subtract 40 from both sides to set the equation equal
to 0.
–0.0146x2 + 1.1802x – 30.8644 = 0
Find the discriminant to see if a solution exists.
24
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
The formula for the discriminant is d = b2 – 4ac.
a = –0.0146, b = 1.1802, and c = –30.8644
d = (1.1802)2 – 4(–0.0146)(–30.8644)
d = 1.39287204 – 1.80248096
Substitute
values for a,
b, and c.
Simplify,
then solve.
d ≈ –0.41
25
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
The discriminant is negative. This means that,
according to the model, it is not possible for this
particular car to get 40 mpg at any speed.
✔
26
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 1, continued
27
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice
Example 2
Use the regression model and graph from Example 1 to
find the x- and y-intercepts of the graph. Interpret their
meanings. Then, use the equation to predict the car’s
fuel efficiency at the speeds of 20 mph, 65 mph, 75
mph, and 90 mph. Determine whether each of these
predictions is an interpolation or an extrapolation, and
whether any of the predictions seem unreasonable
within the context of the problem.
28
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 2, continued
The following data table from Example 1 shows a car’s
speed in miles per hour and the car’s fuel efficiency in
miles per gallon for each speed.
Speed (mph)
18.6 24.9 31.1 37.3 43.5 49.7 55.9 62.1
Fuel efficiency
26.1 29.4 31.4 33.1 33.1 31.4 29.4 26.1
(mpg)
A quadratic regression equation that models this data is
given by m(x) = –0.0146x2 + 1.1802x + 9.1356, where x
is speed in mph and m(x) is fuel efficiency in mpg. A
scatter plot of the data with the graph of this model is
shown on the next slide.
5.9.1: Solving Problems Given Functions Fitted to Data
29
Guided Practice: Example 2, continued
30
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 2, continued
1. Find the x-intercepts of the graph.
The equation is –0.0146x2 + 1.1802x + 9.1356.
Solve this equation for x using the quadratic formula,
x=
-b ± b 2 - 4ac
2a
.
a = -0.0146, b = 1.1802, c = 9.1356
31
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 2, continued
Substitute values for a, b, and c.
x=
- (1.1802) ±
(1.1802) - 4 ( -0.0146) ( 9.1356)
2 ( -0.0146 )
2
Simplify, then solve.
x=
-1.1802 ± 1.92639108
-0.0292
x » -7.11 or x » 87.95
The quadratic formula yields x-values of approximately
–7.11 and 87.95 mph.
5.9.1: Solving Problems Given Functions Fitted to Data
32
Guided Practice: Example 2, continued
2. Interpret the meaning of the x-intercepts.
The x-intercepts are x ≈ –7.11 and x ≈ 87.95.
According to the model, these are the speeds that
have a fuel efficiency of 0 mpg. A car cannot achieve
negative miles per hour; therefore, –7.11 does not
make sense in the context of the problem. At 87.95
mph, a car is still moving, so it would still be using
gas; therefore, a fuel efficiency of 0 mpg does not
make sense within the context of the problem. The
model appears to be valid only for data points near
the values given in the data table.
33
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 2, continued
3. Find the y-intercept.
Substitute 0 for x to find the y-intercept.
m ( x ) = -0.0146x + 1.1802x + 9.1356
2
Quadratic
regression equation
m ( 0 ) = -0.0146 ( 0 ) + 1.1802 ( 0 ) + 9.1356 Substitute 0 for x.
2
m ( 0 ) = 9.1356
The y-intercept is 9.1356.
5.9.1: Solving Problems Given Functions Fitted to Data
Solve.
34
Guided Practice: Example 2, continued
4. Interpret the meaning of the y-intercept.
The y-intercept is 9.1356. This means that the car
gets about 9.1 mpg when it is not moving. The only
way for this to make sense is if the car is idling.
35
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 2, continued
5. Use the equation to predict the fuel
efficiency at the speeds of 20 mph, 65
mph, 75 mph, and 90 mph. Determine
whether each of these predictions is an
interpolation or an extrapolation, and if
any of the predictions seem unreasonable
within the context of the problem.
36
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 2, continued
Predict the fuel efficiency at 20 mph and determine if
the prediction seems to be reasonable. Substitute 20
into the equation and solve.
m(20) = –0.0146(20)2 + 1.1802(20) + 9.1356
m(20) ≈ 26.9
A fuel efficiency of 26.9 mpg at 20 mph is reasonable.
This is an interpolation because it falls within the
range of the given data. The given data goes from
18.6 to 62.1 mph and 20 falls within that range.
37
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 2, continued
Predict the fuel efficiency at 65 mph and determine if
the prediction seems to be reasonable.
Substitute 65 into the equation and solve.
m(65) = –0.0146(65)2 + 1.1802(65) + 9.1356
m(65) ≈ 24.2
A fuel efficiency of 24.2 mpg at 65 mph is reasonable.
This is an extrapolation because it falls outside of the
range of the given data. The given data goes from
18.6 to 62.1 mph and 65 falls outside of that range.
However, it is close to the range of the given data, so
the prediction is likely to be close.
5.9.1: Solving Problems Given Functions Fitted to Data
38
Guided Practice: Example 2, continued
Predict the fuel efficiency at 75 mph and determine if
the prediction seems to be reasonable.
Substitute 75 into the equation and solve.
m(75) = –0.0146(75)2 + 1.1802(75) + 9.1356
m(75) ≈ 15.5
A fuel efficiency of 15.5 mpg at 75 mph might not be
reasonable. This is an extrapolation because it falls
outside of the range of the given data. Points from
outside of the data set may be more unreliable than
those from within the data or close to the endpoints.
39
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 2, continued
Predict the fuel efficiency at 90 mph and determine if
the prediction seems to be reasonable.
Substitute 90 into the equation and solve.
m(90) = –0.0146(90)2 + 1.1802(90) + 9.1356
m(90) ≈ –2.9
A negative fuel efficiency is not only unreasonable,
but also impossible. This is an extrapolation because
it falls outside of the range of the given
data. We must take care when
extrapolating data to not use predictions
that are unreasonable or impossible.
✔
40
5.9.1: Solving Problems Given Functions Fitted to Data
Guided Practice: Example 2, continued
41
5.9.1: Solving Problems Given Functions Fitted to Data