Skip to main content

Section 26.4 Investigation 5.8: Height and Foot Size

Exercises 26.4.1 The Study

Criminal investigators often need to predict unobserved characteristics of individuals from observed characteristics. For example, if a footprint is left at the scene of a crime, how accurately can we estimate that person’s height based on the length of the footprint? To investigate this possible relationship, data were collected on a sample of students in an introductory statistics class.

1. Identify Variables.

Identify the observational units, explanatory variable, and response variable in this study.
Solution.
The observational units are the students, the explanatory variable is the person’s foot length and the response variable is the person’s height.

Predicting Heights.

Below are the heights (in inches) of 20 students in a statistics class:
74 66 77 67 56 65 64 70 62 67 66 64 69 73 74 70 65 72 71 63
2. Baseline Prediction.
If you were trying to predict the height of a statistics student based on these observations, what value would you report?
Solution.
The mean height of the 20 students: 67.75 inches.
Definition: Residual.
A residual is the difference between the predicted value and the observed value. If we let \(y_i\) represent the \(i\)th observed value and \(\hat{y}_i\) represent the predicted or β€œfitted” value, then
\begin{equation*} \text{residual}_i = y_i - \hat{y}_i \end{equation*}
The table below shows the residuals for each of the above heights if we use the mean height, 67.75 inches, as the predicted value for each person.
Height 74 66 77 67 56 65 64 70 62 67
Residual 6.25 -1.75 9.25 -.75 -11.75 -2.75 -3.75 2.25 -5.75 -.75
Height 66 64 69 73 74 70 65 72 71 63
Residual -1.75 -3.75 1.25 5.25 6.25 2.25 -2.75 4.25 Β  Β 
4. Compute Residuals.
Calculate the last two residuals to complete the table.
Residual for the 71-inch person: Residual for the 63-inch person:
How often did we overestimate? How often did we underestimate?
Solution.
The last two residuals are 3.25 and \(-4.75\text{.}\) We overestimated 11 times and underestimated 9 times.
5. Sign of Residual.
How does the observed value compare to the predicted value when the residual is positive? How about when the residual is negative?
Solution.
The residual is positive if the observation is above the fitted value and negative if the observation is below the fitted value.
6. Overall Error Metric.
How might you combine the residuals to measure the overall prediction error for these 20 students?
Solution.
We could sum all the residuals as a measure of β€œtotal prediction error”.
7. Why Sum of Residuals Fails.
Calculate the sum of the residuals from Question 4.
Explain why taking the sum of residuals is not a useful way to measure overall prediction error.
Solution.
The sum is (will always be) zero.
8. Proof Sum of Residuals from Mean Is Zero.
Show mathematically that the sum of residuals from the sample mean for any dataset equals zero. In other words, show that \(\sum_{i=1}^{n}(y_i - \bar{y}) = 0\text{.}\)
Solution.
\begin{equation*} \sum_{i=1}^{n}(y_i - \bar{y}) = \sum y_i - \sum \bar{y} = \sum y_i - n\bar{y} = \sum y_i - n\left(\frac{\sum y_i}{n}\right) \end{equation*}
\begin{equation*} = \sum y_i - \sum y_i = 0. \end{equation*}
9. Alternative Criteria.
Suggest two ways to get around the problem revealed in Question 7 and Question 8. In other words, suggest something related to but different from summing residuals to use as a useful measure of overall prediction error.
Solution.
Could consider sum of squared residuals or sum of absolute residuals.
10. Calculus Minimization.
Suppose that you want to use a single number (call it \(m\)) for predicting height. Use calculus to determine \(m\text{,}\) as a function of the data \(y_i\)’s, to minimize the sum of squared residuals from that prediction. Interpret your answer for \(m\text{.}\)
Hint.
You are choosing \(m\) to minimize \(S = \sum_{i=1}^{n}(y_i - m)^2\text{.}\) Take the derivative with respect to \(m\text{,}\) set it equal to zero, and solve for \(m\text{.}\)
Solution.
Taking the derivative of \(S(m) = \sum(y_i - m)^2\) and setting equal to zero:
\begin{equation*} \frac{dS}{dm} = (-2)\sum(y_i - m) = 0 \;\Rightarrow\; -2\sum y_i + 2nm = 0 \;\Rightarrow\; 2nm = 2\sum y_i \;\Rightarrow\; m = \frac{\sum y_i}{n}, \end{equation*}
the sample mean. Therefore, using the sample mean as our estimate for the variable will minimize the sum of the squared residuals, giving us the β€œbest” prediction.
The Excel Exploration after this investigation asks you to consider minimizing other criteria, such as the sum of absolute residuals.

Predicting Heights from Footlengths.

To see whether we can make better predictions of height by taking foot length into account, consider the following scatterplot of the height (in inches) and foot length (in centimeters) for the sample of 20 statistics students.
described in detail following the image
Scatterplot of height (inches) versus foot length (centimeters) for 20 statistics students, showing a positive, roughly linear association.
11. Describe Scatterplot.
Describe the association between height and foot length exhibited in this scatterplot. Is the association what you would have expected? Explain.
Solution.
There is a fairly strong (\(r = 0.711\)), positive, linear association between height and footlength. As expected, people with larger (above average) feet tend to also be taller (above average height).
Open the Analyzing Two Quantitative Variables applet to see the scatterplot of the 20 students’ height and foot measurements. Check the Show Movable Line box to add a blue line to the scatterplot. The equation for this initial line, \(\hat{height} = 67.75 + 0 \cdot footlength\text{,}\) predicts the same height for all 20 students as you did in Question 4. (Note: the β€œhat” over height indicates that the equation gives values for predicted height.)
If you now place your mouse over the green square on one of the ends of the line and drag, you can change the slope of the line. You can also use the mouse to move the green square in the middle of the line up and down vertically to change the intercept of the line.
  • Move the line until you feel your line β€œbest” summarizes the relationship between height and foot length for these data.
12. Movable Line.
Write down the final equation for your line.
Hint.
Use good statistical notation, which means to use variables names (not generic \(x\) and \(y\)) and to put a β€œhat” over the response variable to indicate prediction.
Solution.
Lines will vary.
14. Best-Line Criterion.
Does your line provide a better fit than your neighbor’s? Suggest a criterion for deciding which line β€œbest” summarizes the relationship.
Solution.
Suggestions will vary.
  • Check the Show Residuals box to visually represent these residuals for your line on the scatterplot. The applet also reports the sum of the absolute residuals (or SAE, the sum of absolute errors).
15. Absolute Error Criterion.
Record this SAE value for your line. What is the best SAE in the class? (Does β€œbest” correspond to the smallest or the largest value of SAE?)
Solution.
The best (smallest) SAE will vary.
A more common criterion for determining the β€œbest” line is to instead look at the sum of the squared residuals (or sum of squared errors, SSError).
  • Check the Show Squared Residuals box to visually represent them and to determine the SSError value for your line.
  • Continue to adjust your line until you think you have minimized the sum of the squared residuals.
17. Improve Line for SSError.
Report your new equation and new SSError value.
Solution.
Equation and resulting SSError values will vary.
  • Now check the Show Regression Line box to determine and display the equation for the line that actually does produce the smallest possible sum of squared residuals.
18. Least Squares Line.
Report its equation and SSError value. Did everyone obtain the same line/equation this time? How does it compare to your line? (You can also display the residuals and the squared residuals for this line.)
Solution.
equation: \(\hat{height} = 38.302 + 1.033 \cdot footsize\)
\(SSError = 235\)
No, everyone should obtain the same regression line, and no one should have been able to obtain a smaller SSError value.
Definition: Least Squares Line.
The line that minimizes the sum of squared residuals is called the least squares line, or simply the regression line, or even the least squares regression line.
19. How to Determine Coefficients.
Suggest a technique for determining (based on the observed data \(x_i\)’s and \(y_i\)’s) the values of the slope and the intercept that minimize the SSError.
Solution.
Taking the derivative (with respect to each coefficient), setting equal to zero, and solving.

Least Squares Regression Line: Derivation of Coefficients.

The least squares line \(\hat{y} = b_0 + b_1 x\) is determined by finding the values of the coefficients \(b_0\) and \(b_1\) that minimize the sum of the squared residuals, \(SSError = \sum(y_i - \hat{y}_i)^2 = \sum_{i=1}^{n}(y_i - b_0 - b_1 x_i)^2\text{.}\)
20. Derivatives for SSError.
Take the derivative with respect to \(b_0\) of the expression on the right. Then take the derivative of the original expression with respect to \(b_1\text{.}\)
Hint.
Use the chain rule, and remember to treat the data values \(x_i\)’s and \(y_i\)’s as constants.
Solution.
derivative with respect to \(b_0\text{:}\) \(\sum(-2)(y_i - b_0 - b_1 x_i)\)
derivative with respect to \(b_1\text{:}\) \(\sum(-2 x_i)(y_i - b_0 - b_1 x_i)\)
21. Solve Normal Equations.
Set these (partial) derivatives equal to zero and solve simultaneously for the values of \(b_0\) and \(b_1\text{.}\)
Hint.
Solve the first equation for \(b_0\text{.}\) Then solve the second equation for \(b_1\) (substituting in the expression for \(b_0\) using the summation notation).
Solution.
Setting to zero: \(\sum y_i - b_1 \sum x_i = n b_0\text{,}\) so \(b_0 = \dfrac{\sum y_i}{n} - b_1\dfrac{\sum x_i}{n}\text{.}\)
\(\sum x_i y_i - b_1 \sum x_i^2 = b_0 \sum x_i\text{,}\) so \(b_1 = \dfrac{\sum x_i y_i - b_0 \sum x_i}{\sum x_i^2}\text{.}\)
You should have found expressions equivalent to the following:
\begin{equation*} b_0 = \frac{\sum_{i=1}^{n} y_i - b_1 \sum_{i=1}^{n} x_i}{n} \qquad \text{and} \qquad b_1 = \frac{n\sum_{i=1}^{n} x_i y_i - \sum_{i=1}^{n} x_i \sum_{i=1}^{n} y_i}{n\sum_{i=1}^{n} x_i^2 - \left(\sum_{i=1}^{n} x_i\right)^2} \end{equation*}
With a little bit more algebra, you can show that the formulas for the least squares estimates of the intercept coefficient \(b_0\) and slope coefficient \(b_1\) simplify to:
\begin{equation*} b_0 = \bar{y} - b_1 \bar{x} \qquad\qquad b_1 = r\,\frac{s_y}{s_x} \end{equation*}
22. Compute Coefficients from Summaries.
For the sample data on students’ foot lengths (\(x\)) and heights (\(y\)), we can calculate these summary statistics: \(\bar{x} = 28.5\) cm, \(s_x = 3.45\) cm, \(\bar{y} = 67.75\) in and \(s_y = 5.00\) in, with \(r = 0.711\text{.}\) Use these statistics and the formulas above to calculate the coefficients of the least-squares regression line. Confirm that these agree with what the applet reported for the equation of the least squares line.
Solution.
\(b_1 = 0.711(5.00/3.45) = 1.03\)
\(b_0 = 67.75 - 1.03(28.5) = 38.4\)
\(\hat{height} = 38.4 + 1.03 \cdot footlength\)
Note: Will be lots of rounding discrepancies.
23. Predictions and Slope Meaning.
Use this least-squares regression line to predict the height of a person with a 28 cm foot length. Then repeat for a person with a 29-cm foot length. Calculate the difference in these two height predictions. Does this value look familiar? Explain.
Solution.
if footlength = 28 cm, we predict a height of \(38.4 + 1.03(28) = 67.24\) inches.
if footlength = 29 cm, we predict \(38.4 + 1.03(29) = 68.27\) inches.
difference = \(68.27 - 67.24 = 1.03\text{,}\) which is the same as the slope of the regression line.
24. Interpret Slope.
Provide an interpretation of the slope coefficient (\(b_1\)) in this context.
Solution.
The slope is the predicted difference in height for foot lengths that differ by 1 cm.
25. Interpret Intercept.
Provide an interpretation of the intercept coefficient (\(b_0\)) in this context. Is such an interpretation meaningful for these data? Explain.
Solution.
The intercept is the predicted height for an individual whose foot length is zero, though it is not all that reasonable to predict someone’s height if their foot length is zero.
Discussion.
The slope coefficient of 1.03 indicates that the predicted height of a person increases by 1.03 inches for each additional centimeter of foot length. In other words, if one person’s foot length is one cm longer than another’s, we predict this person to be 1.03 inches taller than the other person. Notice we are being careful to talk about the β€œpredicted” change or β€œaverage” change, because these are estimates based on the least squares line, not an exact mathematical relationship between height and foot length. The intercept coefficient can be interpreted as the predicted height for a person whose foot length is zero β€” not a very sensible prediction in this context. In fact, the intercept will often be too far outside the range of \(x\) values for us to seriously consider its interpretation.
26. Extrapolation.
Use the least squares regression line to predict the height of someone whose foot length is 44 cm. Explain why you should not be as comfortable making this prediction as the ones in Question 23.
Solution.
\(\hat{height} = 38.4 + 1.03(44) \approx 83.7\) inches.
The foot length of 44 cm is very far outside the range of the \(x\) values that were in the data set, so we might not be completely convinced the same relationship extends to such extreme values.
Definition: Extrapolation.
Extrapolation refers to making predictions outside the range of the explanatory variable values in the data set used to determine the regression line. It is generally ill-advised.

Evaluating the Model.

One way to assess the usefulness of this least-squares line is to measure the improvement in our predictions by using the least-squares line instead of the \(\bar{y}\) line that assumes no knowledge about the explanatory variable.
  • In the applet, uncheck and recheck the Show Movable Line box. Check the Show Squared Residuals box to determine the SSE if we were to use \(\bar{y}\) as our predicted value for every \(x\) (foot size).
28. Coefficient of Determination.
Recall the SSError value for the regression line. Determine the percentage change in the SSError between the \(\bar{y}\) line and the regression line:
\begin{equation*} 100\%\left[\frac{SSError(\bar{y}) - SSError(\text{least-squares})}{SSError(\bar{y})}\right] = \end{equation*}
Solution.
\(100\% \times (475.75 - 235)/475.75 = 50.6\%\)
Definition: Coefficient of Determination.
The preceding expression indicates the reduction in the prediction errors from using the least squares line instead of the \(\bar{y}\) line. This is referred to as the coefficient of determination, interpreted as the percentage of the variability in the response variable that is explained by the least-squares regression line with the explanatory variable. This provides us with a measure of how accurate our predictions will be and is most useful for comparing different models (e.g., different choices of explanatory variable). The coefficient of determination is equal to the square of the correlation coefficient and so is denoted by \(r^2\) or \(R^2\) (and is often pronounced β€œr-squared”).
Another measure of the quality of the fit is \(s\text{,}\) the standard deviation of the residuals. This is a measure of the unexplained variability about the regression line and gives us an idea of how accurate our predictions should be (the actual response should be within \(2s\) of the predicted response). If \(s\) is much smaller than the variability in the response variable (\(s_y\)) then we have explained a good amount of variability in \(y\text{.}\) Most statistical packages report \(s\text{,}\) or it can be found from \(\sqrt{SSError/(n-2)}\text{.}\)
29. Residual Standard Deviation.
Determine and interpret the value of \(s\) for these data. [What are the units?]
Solution.
\(\sqrt{235/18} \approx 3.61\) inches.
The observations tend to fall about 3.61 inches from the regression line. This is a typical prediction error. About 95% of the time we will be able to use this model to predict someone’s height within 7.2 inches. We have reduced the typical prediction error from about 5 inches to 3.61 inches.

Study Conclusions.

There is a fairly strong positive linear association between the foot length of statistics students and their heights (\(r = 0.711\)). To predict heights from foot lengths, the least-squares regression line is \(\hat{height} = 38.3 + 1.03 \cdot foot\text{.}\) This indicates that if one person’s foot length measurement is one centimeter longer than another, we will predict that person’s height to be 1.03 inches taller. This regression line has a coefficient of determination of 50.6%, indicating that 50.6% of the variability in heights is explained by this least squares regression line with foot length. The other 49.4% of the variability in heights is explained by other factors (perhaps including gender) and also by natural variation. So although the foot lengths are informative, they will not allow us to perfectly predict the heights of the students in this sample. The value of \(s\) is 3.61 inches, meaning we should be able to predict a person’s height within 3.61 inches based only on the size of his or her foot.

Technology Detour: Determining Least Squares Regression Lines.

30. Regression Line Instructions.
Use technology to determine the least squares regression line.
Hint 1. R Instructions
To calculate intercept and slope: lm(response~explanatory)
To then superimpose regression line on scatterplot: abline(lm(response~explanatory))
Hint 2. JMP Instructions
  • Create the scatterplot (Analyze > Fit Y by X).
  • From the Bivariate hot spot, click Fit Line.
  • From the hot spot beside Linear Fit select Save Residuals. (A column of the residual values will appear in your data table.)
  • To store the predicted values, select Save Predicteds. Note that this column is created and saved in your table using a Formula (view the equation for the regression line in the Formula box).
  • Add Rows to your table and enter with new X values to find predictions for new data.

Subsection 26.4.2 Practice Problem 5.8

For the Cat Jumping data set from Investigation 5.6:

Checkpoint 26.4.30. Correlation Coefficient.

Calculate and interpret the correlation coefficient between velocity and body mass.

Checkpoint 26.4.31. Coefficient of Determination.

Square the correlation coefficient to obtain \(r^2\text{.}\) Interpret the coefficient of determination in context.

Checkpoint 26.4.32. Slope.

Determine and interpret the slope of the least squares regression line.

Checkpoint 26.4.33. Intercept.

Determine and interpret the intercept of the least squares regression line. Explain what this value might signify in this context.

Checkpoint 26.4.34. Residual Standard Deviation.

You have attempted of activities on this page.