When a least-squares line is used to calculate a predicted value, the prediction error can be measured by:On the graph, the residuals are the vertical distances of the points from the least-squares line.
The residuals give us an idea how close a prediction might be when the least-squares line is used to make a prediction for a value that is not included in the data set.
residual = actual-value – predicted-value
Example 1: Calculating Prediction Errors
The gestation time for an animal is the typical duration between conception and birth. The longevity of an animal is the typical lifespan for that animal. The gestation times (in days) and longevities (in years) for 13 types of animals are shown in the table below.
1. Using a graphing calculator, verify that the equation of the least-squares line is: y = 6.642 + 0.0397x , where x represents the gestation time (in days) and y represents longevity in years.
2. Suppose a particular type of animal has a gestation time of 200 days. Approximately what value does the line predict for the longevity of that type of animal?
3. Would the value you predicted in question (2) necessarily be the exact value for the longevity of that type of animal? Could the actual longevity of that type of animal be longer than predicted? Could it be shorter?
You can investigate further by looking at the types of animal included in the original data set. Take the lion, for example.Its gestation time is 100 days. You also know that its longevity is 15 years, but what does the least-squares line predict for the lion’s longevity?
Substituting x = 100 days into the equation. The least-squares line predicts the lion’s longevity to be approximately 10.6 years.4. How close is this to being correct? More precisely, how much do you have to add to 10.6 to get the lion’s true longevity of 15?
1. Meerkats have a gestation time of 70 days.
a. Use the equation of the least-squares line from today’s class, or , to predict the longevity of the meerkat. Remember equals the gestation time in days and y equals the longevity in years.
b. Approximately how close might your prediction to be to the actual longevity of the meerkat? What was it (from class) that told you roughly how close a prediction might be to the true value?
c. According to your answers to (a) and (b), what is a reasonable range of possible values for the longevity of the meerkat?
d. The longevity of the meerkat is actually 10 years. Use this value and the predicted value that you calculated in (a) to find the residual for the meerkat.
Rotate to landscape screen format on a mobile phone or small tablet to use the Mathway widget, a free math problem solver that answers your questions with step-by-step explanations.
We welcome your feedback, comments and questions about this site or page. Please submit your feedback or enquiries via our Feedback page.