Every problem in the chapter beside the book’s answer, a chapter at a time as you scroll.

Chapter 8: Introduction to linear regression

31 problems · 38 figures

Guided Practice 8.3 §8.1 source ↗

If a model underestimates an observation, will the residual be positive or negative? What about if it overestimates the observation?

Answer

If a model underestimates an observation, then the model estimate is below the actual. The residual, which is the actual observation value minus the model estimate, must then be positive. The opposite is true when the model overestimates the observation: the residual is negative.

Guided Practice 8.4 §8.1 source ↗

Compute the residuals for the “⁠+⁠” observation (85.0,98.6) and the “⁠△⁠” observation (95.5,94.0) in the figure using the linear relationship yˆ=41+0.59x⁠.

Answer

(+⁠) First compute the predicted value based on the model:

yˆ+=41+0.59x+=41+0.59×85.0=91.15

Then the residual is given by

e+=y+−yˆ+=98.6−91.15=7.45

This was close to the earlier estimate of 7.

(△⁠) yˆ△=41+0.59x△=97.3⁠. e△=y△−yˆ△=−3.3⁠, close to the estimate of -4.

Guided Practice 8.6 §8.1 source ↗

No straight line is a good fit for the data sets represented in Figure 8.10. Try drawing nonlinear curves on each plot. Once you create a curve for each, describe what is important in your fit.

Figure 8.10 in the book ↗
Sample scatterplots and their correlations. In each case, there is a strong relationship between the variables. However, because the relationship is nonlinear, the correlation is relatively weak.

Answer

We’ll leave it to you to draw the lines. In general, the lines you draw should be close to most points and reflect overall trends in the data.

8.1 §8.1 source ↗

Visualize the residuals. The scatterplots shown below each have a superimposed regression line. If we were to construct a residual plot (residuals versus x⁠) for each, describe what those plots would look like.

A scatterplot is shown, where the data have a steady upward trend throughout. The observations above and below the line appear random and have stable variability moving from left to right.

A scatterplot is shown, where the data have a steady upward trend throughout. The observations above and below the line appear random. If looking at the leftmost region of data, the observations are more broadly scattered around the line, while when moving further right the variability of the points around the line gets notably smaller by a factor of at least 5 (if using standard deviation).

Answer (2 parts)

(a)

The residual plot will show randomly distributed residuals around 0. The variance is also approximately constant.

(b)

The residuals will show a fan shape, with higher variability for smaller x⁠. There will also be many points on the right above the line. There is trouble with the model being fit here.

8.3 §8.1 source ↗

Identify relationships, Part I. For each of the six plots, identify the strength of the relationship (e.g. weak, moderate, or strong) in the data and whether fitting a linear model would be reasonable.

A scatterplot is shown. The observations start in the upper left corner of the plot, trend sharply downwards before tapering off and stabilizing at about the middle of the plot, before steadily and then faster rising again to the upper right corner of the plot. The trend is approximately symmetric from left-to-right.

A scatterplot is shown. The start on the lower left corner, only spanning about 20% of the vertical region of the plot, and have a steady upwards trend to the upper right corner of the plot. The vertical variability of the points around the trend is relatively stable across the plot.

A scatterplot is shown. On the left side of the plot, the points are appear randomly scattered across the full range of the plot, and this property holds across the entire plot. No trend is evident.

A scatterplot is shown. On the left side of the plot, the observations are in concentrated in the bottom half of the plot but rise steadily. The trend peaks near the center of the plot, where nearly all the points in the (horizontal) center region of the scatterplot are concentrated in the upper half of the scatterplot. On the right side of the plot, the points show a trend downwards, with points concentrated in the lower quarter of the scatterplot for the rightmost handful of points.

A scatterplot is shown. The start on the upper left corner, only spanning about 20% of the vertical region of the plot, and have a steady downwards trend to the bottom right corner of the plot. The vertical variability of the points around the trend is relatively stable across the plot.

A scatterplot is shown. On the left side of the plot, the points are appear randomly scattered across the full range of the plot, and this property holds across the entire plot. No trend is evident or at least obvious.

Answer (6 parts)

(a)

Strong relationship, but a straight line would not fit the data.

(b)

Strong relationship, and a linear fit would be reasonable.

(c)

Weak relationship, and trying a linear fit would be reasonable.

(d)

Moderate relationship, but a straight line would not fit the data.

(e)

Strong relationship, and a linear fit would be reasonable.

(f)

Weak relationship, and trying a linear fit would be reasonable.

8.5 §8.1 source ↗

Exams and grades. The two scatterplots below show the relationship between final and mid-semester exam grades recorded during several years for a Statistics course at a university.

(a)

Based on these graphs, which of the two exams has the strongest correlation with the final exam grade? Explain.

(b)

Can you think of a reason why the correlation between the exam you chose in part (a) and the final exam is higher?

A scatter plot with 100 points is shown with an upward trending line fit to the data. Exam 1 scores are on the horizontal axis and range from 40 to 100. Final Exam scores are on the vertical axis and also range from 40 to 100. Only about ten Exam 1 scores are below 60, and these have Final Exam scores between about 55 and 85. Exam 1 scores between 60 and 80 represent about 50% of the points shown and have Final Exam scores mostly between 50 and 85. For the points where Midterm 1 scores are larger than 80, Final Exam scores mostly lie between 65 and 90, where a slightly upward trend is evident.

A scatter plot with 100 points is shown with an upward trending line fit to the data. Exam 2 scores are on the horizontal axis and range from 40 to 100. Final Exam scores are on the vertical axis and also range from 40 to 100. Midterm 2 scores are roughly uniformly distributed across the full range. For Exam 2 scores below 60, these mostly have Final Exam scores between about 45 and 70. Exam 2 scores between 60 and 80 have Final Exam scores mostly between 55 and 80. For the points where Midterm 2 scores are larger than 80, Final Exam scores mostly lie between 70 and 90.

Answer (2 parts)

(a)

Exam 2 since there is less of a scatter in the plot of final exam grade versus exam 2. Notice that the relationship between Exam 1 and the Final Exam appears to be slightly nonlinear.

(b)

Exam 2 and the final are relatively close to each other chronologically, or Exam 2 may be cumulative so has greater similarities in material to the final exam. Answers may vary.

8.7 §8.1 source ↗

Match the correlation, Part I. Match each correlation to the corresponding scatterplot.

(a) R=−0.7

(b) R=0.45

(c) R=0.06

(d) R=0.92

A scatterplot is shown. The observations start in the upper left corner of the plot, trend sharply downwards before tapering off and stabilizing at about the middle of the plot, before steadily and then faster rising again to the upper right corner of the plot. The trend is approximately symmetric from left-to-right.

A scatterplot is shown. The start on the lower left corner, only spanning about 20% of the vertical region of the plot, and have a steady upwards trend to the upper right corner of the plot. The vertical variability of the points around the trend is relatively stable across the plot.

A scatterplot is shown. The points appear randomly scattered across the left, middle, and right portion of the plot. There is a very slight upward trend.

A scatterplot is shown. The points appear randomly scattered across the left, middle, and right portion of the plot. There is a very slight downward trend.

Answer (4 parts)

(a)

r=−0.7 → (4).

(b)

r=0.45 → (3).

(c)

r=0.06 → (1).

(d)

r=0.92 → (2).

8.9 §8.1 source ↗

Speed and height. 1,302 UCLA students were asked to fill out a survey where they were asked about their height, fastest speed they have ever driven, and gender. The scatterplot on the left displays the relationship between height and fastest speed, and the scatterplot on the right displays the breakdown by gender in this relationship.

A scatterplot is shown. The horizontal axis represents ”Height (in inches)” with values ranging from about 50 to 80. The vertical axis represents ”Fastest Speed (in mph)” and has values ranging from 0 to 150. First, it is worth noting that there several points along the bottom of the plot with a fastest speed of 0 mph. The remainder of the description will concentrate on the other points. A small portion of the points are shown with heights below 60 inches, and these have fastest speeds mostly ranging from about 70 to 110 mph. For points shown with heights between 60 and 70, fastest speeds mostly ranged from about 30 to 120 mph. For points shown with heights of 70 or more, fastest speeds mostly ranged from about 50 to 140 mph. There were no points corresponding to heights greater than 75 that had fastest speeds slower than about 75 mph, which left a sort of gap in the lower right portion of the scatterplot.

A scatterplot is shown, where points are colored to differentiate between males and females. The horizontal axis represents ”Height (in inches)” with values ranging from about 50 to 80. The vertical axis represents ”Fastest Speed (in mph)” and has values ranging from 0 to 150. Female heights are largely 70 inches or smaller, while Male heights are largely 65 inches and taller. When focusing exclusively on Females, no upward trend is evident, with about 95% of observations having Fastest Speed between about 30 mph and 120 mph. When focusing exclusively on Males, no upward trend is evident there either, with about 95% of observations having Fastest Speed between about 50 mph and 140 mph. In contrast, if we ignore the male/female differentiation, there is a slight upward trend in the points.

(a)

Describe the relationship between height and fastest speed.

(b)

Why do you think these variables are positively associated?

(c)

What role does gender play in the relationship between height and fastest driving speed?

Answer (3 parts)

(a)

The relationship is positive, weak, and possibly linear. However, there do appear to be some anomalous observations along the left where several students have the same height that is notably far from the cloud of the other points. Additionally, there are many students who appear not to have driven a car, and they are represented by a set of points along the bottom of the scatterplot.

(b)

There is no obvious explanation why simply being tall should lead a person to drive faster. However, one confounding factor is gender. Males tend to be taller than females on average, and personal experiences (anecdotal) may suggest they drive faster. If we were to follow-up on this suspicion, we would find that sociological studies confirm this suspicion.

(c)

Males are taller on average and they drive faster. The gender variable is indeed an important confounding variable.

8.11 §8.1 source ↗

The Coast Starlight, Part I. The Coast Starlight Amtrak train runs from Seattle to Los Angeles. The scatterplot below displays the distance between each stop (in miles) and the amount of time it takes to travel from one stop to another (in minutes).

(a) Describe the relationship between distance and travel time.

(b) How would the relationship change if travel time was instead measured in hours, and distance was instead measured in kilometers?

(c) The correlation between travel time (in miles) and distance (in minutes) is r=0.636⁠. Suppose we had instead measured travel time in hours and measured distance in kilometers (km). What would be the correlation in these different units?

A scatterplot is shown with about 15 points. The horizontal axis represents ”Distance (miles)” with values ranging from just over 0 to about 350. The vertical axis represents ”Travel Time (in minutes)” and has values ranging from about 20 to 380. The point with the smallest distance -- about 10 miles -- shows a travel time of about 40 minutes. Next, there is a cluster of 6 points with distances between 40 and 60 miles and travel times ranging from about 20 to 60 minutes. The remainder of the points are scattered pretty broadly but may show a slightly upward trend. A few points that highlight the widely varying nature of the data are located at the following approximate locations: (190 miles, 60 minutes), (240 miles, 250 minutes), (250 miles, 380 minutes), and (350 miles, 200 minutes).

Answer (3 parts)

(a)

There is a somewhat weak, positive, possibly linear relationship between the distance traveled and travel time. There is clustering near the lower left corner that we should take special note of.

(b)

Changing the units will not change the form, direction or strength of the relationship between the two variables. If longer distances measured in miles are associated with longer travel time measured in minutes, longer distances measured in kilometers will be associated with longer travel time measured in hours.

(c)

Changing units doesn’t affect correlation: r=0.636⁠.

8.13 §8.1 source ↗

Body measurements, Part I. Researchers studying anthropometry collected body girth measurements and skeletal diameter measurements, as well as age, weight, height and gender for 507 physically active individuals. The scatterplot below shows the relationship between height and shoulder girth (over deltoid muscles), both measured in centimeters.

(a) Describe the relationship between shoulder girth and height.

(b) How would the relationship change if shoulder girth was measured in inches while the units of height remained in centimeters?

A scatter plot with several hundred points is shown. The horizontal axis represents ”Shoulder Girth (cm)” with values ranging from about 85 to 135. The vertical axis represents ”Height (cm)” with values ranging from about 145 to 200. For points where Shoulder Girth is smaller than 100, 95% of points have heights between 152 and 170. For points where Shoulder Girth is between 100 and 110, 95% of points have heights between 155 and 180. For points where Shoulder Girth is between 110 and 120, 95% of points have heights between 162 and 190. For points where Shoulder Girth larger than 120, 95% of points have heights between 170 and 190.

Answer (2 parts)

(a)

There is a moderate, positive, and linear relationship between shoulder girth and height.

(b)

Changing the units, even if just for one of the variables, will not change the form, direction or strength of the relationship between the two variables.

8.15 §8.1 source ↗

Correlation, Part I. What would be the correlation between the ages of husbands and wives if men always married woman who were

(a)

3 years younger than themselves?

(b)

2 years older than themselves?

(c)

half as old as themselves?

Answer (4 parts)

In each part, we can write the husband ages as a linear function of the wife ages.

(a)

ageH=ageW+3⁠.

(b)

ageH=ageW−2⁠.

(c)

ageH=2×ageW⁠.
Since the slopes are positive and these are perfect linear relationships, the correlation will be exactly 1 in all three parts. An alternative way to gain insight into this solution is to create a mock data set, e.g. 5 women aged 26, 27, 28, 29, and 30, then find the husband ages for each wife in each part and create a scatterplot.

Guided Practice 8.7 §8.2 source ↗

Is the correlation positive or negative in Figure 8.11?

Figure 8.11 in the book ↗
Gift aid and family income for a random sample of 50 freshman students from Elmhurst College. Two lines are fit to the data, the solid line being the least squares line.

Answer

Larger family incomes are associated with lower amounts of aid, so the correlation will be negative. Using a computer, the correlation can be computed: -0.499.

Guided Practice 8.8 §8.2 source ↗

Should we have concerns about applying least squares regression to the Elmhurst data in Figure 8.11?

Figure 8.11 in the book ↗
Gift aid and family income for a random sample of 50 freshman students from Elmhurst College. Two lines are fit to the data, the solid line being the least squares line.

Answer

The trend appears to be linear, the data fall around the line with no obvious outliers, the variance is roughly constant. These are also not time series observations. Least squares regression can be applied to these data.

Guided Practice 8.9 §8.2 source ↗

Using the summary statistics in Figure 8.13, compute the slope for the regression line of gift aid against family income.

Figure 8.13 in the book ↗
Family Income (x⁠)Gift Aid (y⁠)
meanx‾=$101,780y‾=$19,940
sdsx=$63,200sy=$5,460
R=−0.499
Summary statistics for family income and gift aid.

Answer

Compute the slope using the summary statistics from Figure 8.13:

b1=sysxR=5,46063,200(−0.499)=−0.0431

Figure 8.13 in the book ↗
Family Income (x⁠)Gift Aid (y⁠)
meanx‾=$101,780y‾=$19,940
sdsx=$63,200sy=$5,460
R=−0.499
Summary statistics for family income and gift aid.

Guided Practice 8.15 §8.2 source ↗

If a linear model has a very strong negative relationship with a correlation of -0.97, how much of the variation in the response is explained by the explanatory variable?

Answer

About R2=(−0.97)2=0.94 or 94% of the variation is explained by the linear model.

8.17 §8.2 source ↗

Units of regression. Consider a regression predicting weight (kg) from height (cm) for a sample of adult males. What are the units of the correlation coefficient, the intercept, and the slope?

Answer

Correlation: no units. Intercept: kg. Slope: kg/cm.

8.19 §8.2 source ↗

Over-under, Part I. Suppose we fit a regression line to predict the shelf life of an apple based on its weight. For a particular apple, we predict the shelf life to be 4.6 days. The apple’s residual is -0.6 days. Did we over or under estimate the shelf-life of the apple? Explain your reasoning.

Answer

Over-estimate. Since the residual is calculated as observed − predicted⁠, a negative residual means that the predicted value is higher than the observed value.

8.21 §8.2 source ↗

Tourism spending. The Association of Turkish Travel Agencies reports the number of foreign tourists visiting Turkey and tourist spending by year. Three plots are provided: scatterplot showing the relationship between these two variables along with the least squares fit, residuals plot, and histogram of residuals.

A scatterplot with a least squares regression line is fit based on about 50 points. The horizontal axis represents ”Number of tourists” and has values ranging from about 0 to about 27 million. The vertical axis represents ”Spending, in US dollars”, with values ranging from about $0 to about $17 billion. There are many points shown with the number of tourists between 0 and 5 million, which has spending between about $0 and $3 billion, where even on this small scale a roughly linear trend is evident. The linear trend continues on across the plot and is quite strong -- where residuals generally do not deviate from the least square line by more than very roughly $1 billion. The data are also more sparse for larger values in the plot. There is one region in the center of the plot where about 10 points in a row lie above the regression line. Also consider the next two plots before answering any questions for this exercise.

A residual plot is shown. The horizontal axis represents ”Number of tourists” and has values ranging from about 0 to about 27 million. Residuals are shown on the vertical axis and have values ranging from about -$1.5 billion to about $1.2 billion. The points on the far left between 0 and 3 million tourists shows a ”v” pattern. There are about 15 points with number of tourists between 3 million and 10 million, which shows an slight upward trend from about -$700 million to $1.2 billion. There about 10 points with number of tourists greater than 10 million up to about 27 million, and these show a slight downward trend from about $1 billion to -$1.5 billion.

A histogram is shown for the residuals, which shows a roughly bell-shaped distribution centered at 0 and a standard deviation of about $500 million.

(a)

Describe the relationship between number of tourists and spending.

(b)

What are the explanatory and response variables?

(c)

Why might we want to fit a regression line to these data?

(d)

Do the data meet the conditions required for fitting a least squares line? In addition to the scatterplot, use the residual plot and histogram to answer this question.

Answer (4 parts)

(a)

There is a positive, very strong, linear association between the number of tourists and spending.

(b)

Explanatory: number of tourists (in thousands). Response: spending (in millions of US dollars).

(c)

We can predict spending for a given number of tourists using a regression line. This may be useful information for determining how much the country may want to spend in advertising abroad, or to forecast expected revenues from tourism.

(d)

Even though the relationship appears linear in the scatterplot, the residual plot actually shows a nonlinear relationship. This is not a contradiction: residual plots can show divergences from linearity that can be difficult to see in a scatterplot. A simple linear model is inadequate for modeling these data. It is also important to consider that these data are observed sequentially, which means there may be a hidden structure not evident in the current plots but that is important to consider.

8.23 §8.2 source ↗

The Coast Starlight, Part II. Exercise 8.11 introduces data on the Coast Starlight Amtrak train that runs from Seattle to Los Angeles. The mean travel time from one stop to the next on the Coast Starlight is 129 mins, with a standard deviation of 113 minutes. The mean distance traveled from one stop to the next is 108 miles with a standard deviation of 99 miles. The correlation between travel time and distance is 0.636.

(a)

Write the equation of the regression line for predicting travel time.

(b)

Interpret the slope and the intercept in this context.

(c)

Calculate R2 of the regression line for predicting travel time from distance traveled for the Coast Starlight, and interpret R2 in the context of the application.

(d)

The distance between Santa Barbara and Los Angeles is 103 miles. Use the model to estimate the time it takes for the Starlight to travel between these two cities.

(e)

It actually takes the Coast Starlight about 168 mins to travel from Santa Barbara to Los Angeles. Calculate the residual and explain the meaning of this residual value.

(f)

Suppose Amtrak is considering adding a stop to the Coast Starlight 500 miles away from Los Angeles. Would it be appropriate to use this linear model to predict the travel time from Los Angeles to this point?

Exercise 8.11 in the book ↗

The Coast Starlight, Part I. The Coast Starlight Amtrak train runs from Seattle to Los Angeles. The scatterplot below displays the distance between each stop (in miles) and the amount of time it takes to travel from one stop to another (in minutes).

(a) Describe the relationship between distance and travel time.

(b) How would the relationship change if travel time was instead measured in hours, and distance was instead measured in kilometers?

(c) The correlation between travel time (in miles) and distance (in minutes) is r=0.636⁠. Suppose we had instead measured travel time in hours and measured distance in kilometers (km). What would be the correlation in these different units?

A scatterplot is shown with about 15 points. The horizontal axis represents ”Distance (miles)” with values ranging from just over 0 to about 350. The vertical axis represents ”Travel Time (in minutes)” and has values ranging from about 20 to 380. The point with the smallest distance -- about 10 miles -- shows a travel time of about 40 minutes. Next, there is a cluster of 6 points with distances between 40 and 60 miles and travel times ranging from about 20 to 60 minutes. The remainder of the points are scattered pretty broadly but may show a slightly upward trend. A few points that highlight the widely varying nature of the data are located at the following approximate locations: (190 miles, 60 minutes), (240 miles, 250 minutes), (250 miles, 380 minutes), and (350 miles, 200 minutes).

Answer. (a) There is a somewhat weak, positive, possibly linear relationship between the distance traveled and travel time. There is clustering near the lower left corner that we should take special note of. (b) Changing the units will not change the form, direction or strength of the relationship between the two variables. If longer distances measured in miles are associated with longer travel time measured in minutes, longer distances measured in kilometers will be associated with longer travel time measured in hours. (c) Changing units doesn’t affect correlation: r=0.636⁠.

Answer (6 parts)

(a)

First calculate the slope: b1= R×sy/sx= 0.636×113/99= 0.726⁠. Next, make use of the fact that the regression line passes through the point (x‾,y‾)⁠: y‾=b0+b1×x‾⁠. Plug in x‾⁠, y‾⁠, and b1⁠, and solve for b0⁠: 51. Solution: travel timeˆ= 51+ 0.726×distance⁠.

(b)

b1⁠: For each additional mile in distance, the model predicts an additional 0.726 minutes in travel time. b0⁠: When the distance traveled is 0 miles, the travel time is expected to be 51 minutes. It does not make sense to have a travel distance of 0 miles in this context. Here, the y⁠-intercept serves only to adjust the height of the line and is meaningless by itself.

(c)

R2=0.6362=0.40⁠. About 40% of the variability in travel time is accounted for by the model, i.e. explained by the distance traveled.

(d)

travel timeˆ= 51+ 0.726×distance= 51+ 0.726×103≈ 126 minutes. (Note: we should be cautious in our predictions with this model since we have not yet evaluated whether it is a well-fit model.)

(e)

ei=yi−yˆi=168−126=42 minutes. A positive residual means that the model underestimates the travel time.

(f)

No, this calculation would require extrapolation.

8.25 §8.2 source ↗

Murders and poverty, Part I. The following regression output is for predicting annual murders per million from percentage living in poverty in a random sample of 20 metropolitan areas.

EstimateStd. Errort valuePr(>|⁠t⁠|⁠)
(Intercept)-29.9017.789-3.8390.001
poverty%2.5590.3906.5620.000

s= 5.512R2= 70.52%Radj2= 68.89%

(a) Write out the linear model.

(b) Interpret the intercept.

(c) Interpret the slope.

(d) Interpret R2⁠.

(e) Calculate the correlation coefficient.

A scatterplot is shown with 20 points. The horizontal axis is ”Percent in Poverty” and has values ranging from 14% to 26%. The vertical axis is ”Annual Murders per Million” with values ranging from about 5 to 40. There are 6 points with poverty below 18%, and the Murder Rate for these values ranges from 5 to 13, with one exception of a point at about 17% with a murder rate of about 25. There are 9 points with a poverty rate of 18% to 22%, and the murder rate for these points largely range from 14 to 25, with one exception of a point at about 21% poverty and a murder rate of 35. There are 5 points where poverty is larger than 22%, and these have murder rates ranging from 25 to 40.

Answer (5 parts)

(a)

murderˆ= − 29.901+ 2.559×poverty%⁠.

(b)

Expected murder rate in metropolitan areas with no poverty is -29. 901 per million. This is obviously not a meaningful value, it just serves to adjust the height of the regression line.

(c)

For each additional percentage increase in poverty, we expect murders per million to be higher on average by 2.559.

(d)

Poverty level explains 70.52% of the variability in murder rates in metropolitan areas.

(e)

0.7052=0.8398⁠.

8.27 §8.3 source ↗

Outliers, Part I. Identify the outliers in the scatterplots shown below, and determine what type of outliers they are. Explain your reasoning.

Most of the data is shown in the left third of the plot with a clear downward, linear trend extending from from the upper-left corner of the plot and to the bottom of the plot only a third of the way from the left side of the plot. A single point is shown on the bottom-right of the plot. A regression line is fit to the data, but it does not fit the bulk of the data well: On the furthest left portion, the line is below the points, crosses over the trend of the bulk of the data, then lies above the remainder of the bulk of the data. If it were shown fully, it would extend well below the single point on the bottom-right.

A clear downward trend is evident in the points on the left third of the plot with a regression line overlaying these points and extending to a single point on the far bottom right of the plot that is also almost exactly on the regression line.

A downward trend is evident in the bulk of the points with an overlaid regression line. A single point is shown far above the regression line at the center-top of the plot.

Answer (3 parts)

(a)

There is an outlier in the bottom right. Since it is far from the center of the data, it is a point with high leverage. It is also an influential point since, without that observation, the regression line would have a very different slope.

(b)

There is an outlier in the bottom right. Since it is far from the center of the data, it is a point with high leverage. However, it does not appear to be affecting the line much, so it is not an influential point.

(c)

The observation is in the center of the data (in the x-axis direction), so this point does not have high leverage. This means the point won’t have much effect on the slope of the line and so is not an influential point.

8.29 §8.3 source ↗

Urban homeowners, Part I. The scatterplot below shows the percent of families who own their home vs. the percent of the population living in urban areas. There are 52 observations, each corresponding to a state in the US. Puerto Rico and District of Columbia are also included.

(a) Describe the relationship between the percent of families who own their home and the percent of the population living in urban areas.

(b) The outlier at the bottom right corner is District of Columbia, where 100% of the population is considered urban. What type of an outlier is this observation?

A scatterplot is shown with about 50 points. The horizontal axis is for ”Percent Urban Population” and has values ranging from 40% to 100%. The vertical axis is for ”Percent Own Their Home” with values ranging from about 40% to about 75%. About 10 points have Urban Population with values smaller than 60%, and these have Homeownership rates between 65% and 75%, with most of those points above 70%. About 20 points have Urban Population with values between 60% and 70%, and these have Homeownership rates between 62% and 75%. About 20 points have Urban Population with values greater than 70%, and these have Homeownership rates between 55% and 73%, with one exception of a point with 100% urban population that has a homeownership rate of about 43%.

Answer (2 parts)

(a)

There is a negative, moderate-to-strong, somewhat linear relationship between percent of families who own their home and the percent of the population living in urban areas in 2010. There is one outlier: a state where 100% of the population is urban. The variability in the percent of homeownership also increases as we move from left to right in the plot.

(b)

The outlier is located in the bottom right corner, horizontally far from the center of the other points, so it is a point with high leverage. It is an influential point since excluding this point from the analysis would greatly affect the slope of the regression line.

Guided Practice 8.18 §8.4 source ↗

The data for the Great Depression (1934 and 1938) were removed because the unemployment rate was 21% and 18%, respectively. Do you agree that they should be removed for this investigation? Why or why not?

Answer

We will provide two considerations. Each of these points would have very high leverage on any least-squares regression line, and years with such high unemployment may not help us understand what would happen in other years where the unemployment is only modestly high. On the other hand, these are exceptional cases, and we would be discarding important information if we exclude them from a final analysis.

Guided Practice 8.22 §8.4 source ↗

Figure 8.21 shows statistical software output from fitting the least squares regression line shown in Figure 8.15. Use this output to formally evaluate the following hypotheses.

H0⁠: The true coefficient for family income is zero.

HA⁠: The true coefficient for family income is not zero.

Figure 8.21 in the book ↗
EstimateStd. Errort valuePr(>|⁠t⁠|⁠)
(Intercept)24319.31291.518.83<⁠0.0001
family_income-0.04310.0108-3.980.0002
df=48
Summary of least squares fit for the Elmhurst College data, where we are predicting the gift aid by the university based on the family income of students.
Figure 8.15 in the book ↗
Gift aid and family income for a random sample of 50 freshman students from Elmhurst College, shown with the least squares regression line.

Answer

We look in the second row corresponding to the family income variable. We see the point estimate of the slope of the line is -0.0431, the standard error of this estimate is 0.0108, and the t⁠-test statistic is T=−3.98⁠. The p-value corresponds exactly to the two-sided test we are interested in: 0.0002. The p-value is so small that we reject the null hypothesis and conclude that family income and financial aid at Elmhurst College for freshman entering in the year 2011 are negatively correlated and the true slope parameter is indeed less than 0, just as we believed in Example 8.21.

Example 8.21 in the book ↗

Examine Figure 8.15, which relates the Elmhurst College aid and student family income. How sure are you that the slope is statistically significantly different from zero? That is, do you think a formal hypothesis test would reject the claim that the true slope of the line should be zero?

Answer. While the relationship between the variables is not perfect, there is an evident decreasing trend in the data. This suggests the hypothesis test will reject the null claim that the slope is zero.

8.31 §8.4 source ↗

Body measurements, Part IV. The scatterplot and least squares summary below show the relationship between weight measured in kilograms and height measured in centimeters of 507 physically active individuals.

A scatterplot is shown with around 500 points. The horizontal axis is for ”Height, in centimeters” and takes values between about 150 to 200 centimeters. The vertical axis is for ”Weight, in kilograms” and takes values between about 40 to 120 centimeters. For heights smaller than about 160 centimeters, weights mostly range between 45 and 70 kilograms. For heights between 160 and 175 centimeters, weights mostly range between 55 and 80 kilograms. For heights between 175 and 185 centimeters, weights mostly range between 65 and 90 kilograms. For heights between 185 and 195 centimeters, where there are fewer points, weights mostly range between 80 and 95 kilograms. There are two points with heights at about than 196cm, and these have weights of about 85 and 95 kilograms.

EstimateStd. Errort valuePr(>|⁠t⁠|⁠)
(Intercept)-105.01137.5394-13.930.0000
height1.01760.044023.130.0000
(a)

Describe the relationship between height and weight.

(b)

Write the equation of the regression line. Interpret the slope and intercept in context.

(c)

Do the data provide strong evidence that an increase in height is associated with an increase in weight? State the null and alternative hypotheses, report the p-value, and state your conclusion.

(d)

The correlation coefficient for height and weight is 0.72. Calculate R2 and interpret it in context.

Answer (4 parts)

(a)

The relationship is positive, moderate-to-strong, and linear. There are a few outliers but no points that appear to be influential.

(b)

weightˆ= − 105.0113+ 1.0176×height⁠.
Slope: For each additional centimeter in height, the model predicts the average weight to be 1.0176 additional kilograms (about 2.2 pounds).
Intercept: People who are 0 centimeters tall are expected to weigh - 105.0113 kilograms. This is obviously not possible. Here, the y⁠- intercept serves only to adjust the height of the line and is meaningless by itself.

(c)

H0⁠: The true slope coefficient of height is zero (β1=0⁠).
HA⁠: The true slope coefficient of height is different than zero (β1≠0⁠).
The p-value for the two-sided alternative hypothesis (β1≠0⁠) is incredibly small, so we reject H0⁠. The data provide convincing evidence that height and weight are positively correlated. The true slope parameter is indeed greater than 0.

(d)

R2=0.722=0.52⁠. Approximately 52% of the variability in weight can be explained by the height of individuals.

8.33 §8.4 source ↗

Husbands and wives, Part II. The scatterplot below summarizes husbands’ and wives’ heights in a random sample of 170 married couples in Britain, where both partners’ ages are below 65 years. Summary output of the least squares fit for predicting wife’s height from husband’s height is also provided in the table.

A scatterplot is shown with around 200 points. The horizontal axis is for ”Husband's height, in inches” and takes values between 60 and 75 inches. The vertical axis is for ”Wife's height, in inches” and takes values between 55 and 70 inches. For the approximately fifteen husband heights smaller than 65 inches, wife heights are mostly between 59 and 65 inches. For the approximately 100 husband heights between 65 and 70 inches, wife heights are mostly between 59 and 66 inches. For the approximately 30 husband heights taller than 70 inches, wife heights are mostly between 62 and 67 inches.

EstimateStd. Errort valuePr(>|⁠t⁠|⁠)
(Intercept)43.57554.68429.300.0000
height_ husband0.28630.06864.170.0000
(a)

Is there strong evidence that taller men marry taller women? State the hypotheses and include any information used to conduct the test.

(b)

Write the equation of the regression line for predicting wife’s height from husband’s height.

(c)

Interpret the slope and intercept in the context of the application.

(d)

Given that R2=0.09⁠, what is the correlation of heights in this data set?

(e)

You meet a married man from Britain who is 5’9" (69 inches). What would you predict his wife’s height to be? How reliable is this prediction?

(f)

You meet another married man from Britain who is 6’7" (79 inches). Would it be wise to use the same linear model to predict his wife’s height? Why or why not?

Answer (6 parts)

(a)

H0⁠: β1=0⁠. HA⁠: β1≠0⁠. The p-value, as reported in the table, is incredibly small and is smaller than 0.05, so we reject H0⁠. The data provide convincing evidence that wives’ and husbands’ heights are positively correlated.

(b)

heightˆW= 43.5755+ 0.2863×heightH⁠.

(c)

Slope: For each additional inch in husband’s height, the average wife’s height is expected to be an additional 0.2863 inches on average. Intercept: Men who are 0 inches tall are expected to have wives who are, on average, 43.5755 inches tall. The intercept here is meaningless, and it serves only to adjust the height of the line.

(d)

The slope is positive, so r must also be positive. r=0.09=0.30⁠.

(e)

63.33. Since R2 is low, the prediction based on this regression model is not very reliable.

(f)

No, we should avoid extrapolating.

8.35 §8.4 source ↗

Murders and poverty, Part II. Exercise 8.25 presents regression output from a model for predicting annual murders per million from percentage living in poverty based on a random sample of 20 metropolitan areas. The model output is also provided below.

EstimateStd. Errort valuePr(>|⁠t⁠|⁠)
(Intercept)-29.9017.789-3.8390.001
poverty%2.5590.3906.5620.000

s=5.512R2=70.52%Radj2=68.89%

(a)

What are the hypotheses for evaluating whether poverty percentage is a significant predictor of murder rate?

(b)

State the conclusion of the hypothesis test from part (a) in context of the data.

(c)

Calculate a 95% confidence interval for the slope of poverty percentage, and interpret it in context of the data.

(d)

Do your results from the hypothesis test and the confidence interval agree? Explain.

Exercise 8.25 in the book ↗

Murders and poverty, Part I. The following regression output is for predicting annual murders per million from percentage living in poverty in a random sample of 20 metropolitan areas.

EstimateStd. Errort valuePr(>|⁠t⁠|⁠)
(Intercept)-29.9017.789-3.8390.001
poverty%2.5590.3906.5620.000

s= 5.512R2= 70.52%Radj2= 68.89%

(a) Write out the linear model.

(b) Interpret the intercept.

(c) Interpret the slope.

(d) Interpret R2⁠.

(e) Calculate the correlation coefficient.

A scatterplot is shown with 20 points. The horizontal axis is ”Percent in Poverty” and has values ranging from 14% to 26%. The vertical axis is ”Annual Murders per Million” with values ranging from about 5 to 40. There are 6 points with poverty below 18%, and the Murder Rate for these values ranges from 5 to 13, with one exception of a point at about 17% with a murder rate of about 25. There are 9 points with a poverty rate of 18% to 22%, and the murder rate for these points largely range from 14 to 25, with one exception of a point at about 21% poverty and a murder rate of 35. There are 5 points where poverty is larger than 22%, and these have murder rates ranging from 25 to 40.

Answer. (a) murderˆ= − 29.901+ 2.559×poverty%⁠. (b) Expected murder rate in metropolitan areas with no poverty is -29. 901 per million. This is obviously not a meaningful value, it just serves to adjust the height of the regression line. (c) For each additional percentage increase in poverty, we expect murders per million to be higher on average by 2.559. (d) Poverty level explains 70.52% of the variability in murder rates in metropolitan areas. (e) 0.7052=0.8398⁠.

Answer (4 parts)

(a)

H0:β1=0;HA:β1≠0

(b)

The p-value for this test is approximately 0, therefore we reject H0⁠. The data provide convincing evidence that poverty percentage is a significant predictor of murder rate.

(c)

n=20,df=18,T18∗=2.10⁠; 2.559±2.10×0.390= (1.74,3.378)⁠; For each percentage point poverty is higher, murder rate is expected to be higher on average by 1.74 to 3.378 per million.

(d)

Yes, we rejected H0 and the confidence interval does not include 0.

8.37 §8.R source ↗

True / False. Determine if the following statements are true or false. If false, explain why.

(a)

A correlation coefficient of -0.90 indicates a stronger linear relationship than a correlation of 0.5.

(b)

Correlation is a measure of the association between any two variables.

Answer (2 parts)

(a)

True.

(b)

False, correlation is a measure of the linear association between any two numerical variables.

8.39 §8.R source ↗

Husbands and wives, Part III. Exercise 8.33 presents a scatterplot displaying the relationship between husbands’ and wives’ ages in a random sample of 170 married couples in Britain, where both partners’ ages are below 65 years. Given below is summary output of the least squares fit for predicting wife’s age from husband’s age.

A scatterplot is shown with about 150 points. The horizontal axis is for ”Hus, in inches” and takes values between 8 and 22 inches. The vertical axis is for ”Volume, in cubic feet” and takes values between 8 and 80 cubic feet. About 15 points with circumferences smaller than 12 inches, volumes range from about 8 to 25 cubic feet. For the approximately ten points with circumferences between 12 and 16 feet, volumes range from 22 to 35 cubic feet. For the 6 points with circumferences larger than 16 inches, volumes range from 40 to 60 cubic feet, with one outlier with a circumference of 22 inches and a volume of about 80 cubic feet.

EstimateStd. Errort valuePr(>|⁠t⁠|⁠)
(Intercept)1.57401.15011.370.1730
age_ husband0.91120.025935.250.0000
df=168
(a)

We might wonder, is the age difference between husbands and wives consistent across ages? If this were the case, then the slope parameter would be β1=1⁠. Use the information above to evaluate if there is strong evidence that the difference in husband and wife ages differs for different ages.

(b)

Write the equation of the regression line for predicting wife’s age from husband’s age.

(c)

Interpret the slope and intercept in context.

(d)

Given that R2=0.88⁠, what is the correlation of ages in this data set?

(e)

You meet a married man from Britain who is 55 years old. What would you predict his wife’s age to be? How reliable is this prediction?

(f)

You meet another married man from Britain who is 85 years old. Would it be wise to use the same linear model to predict his wife’s age? Explain.

Exercise 8.33 in the book ↗

Husbands and wives, Part II. The scatterplot below summarizes husbands’ and wives’ heights in a random sample of 170 married couples in Britain, where both partners’ ages are below 65 years. Summary output of the least squares fit for predicting wife’s height from husband’s height is also provided in the table.

A scatterplot is shown with around 200 points. The horizontal axis is for ”Husband's height, in inches” and takes values between 60 and 75 inches. The vertical axis is for ”Wife's height, in inches” and takes values between 55 and 70 inches. For the approximately fifteen husband heights smaller than 65 inches, wife heights are mostly between 59 and 65 inches. For the approximately 100 husband heights between 65 and 70 inches, wife heights are mostly between 59 and 66 inches. For the approximately 30 husband heights taller than 70 inches, wife heights are mostly between 62 and 67 inches.

EstimateStd. Errort valuePr(>|⁠t⁠|⁠)
(Intercept)43.57554.68429.300.0000
height_ husband0.28630.06864.170.0000

(a) Is there strong evidence that taller men marry taller women? State the hypotheses and include any information used to conduct the test.

(b) Write the equation of the regression line for predicting wife’s height from husband’s height.

(c) Interpret the slope and intercept in the context of the application.

(d) Given that R2=0.09⁠, what is the correlation of heights in this data set?

(e) You meet a married man from Britain who is 5’9" (69 inches). What would you predict his wife’s height to be? How reliable is this prediction?

(f) You meet another married man from Britain who is 6’7" (79 inches). Would it be wise to use the same linear model to predict his wife’s height? Why or why not?

Answer. (a) H0⁠: β1=0⁠. HA⁠: β1≠0⁠. The p-value, as reported in the table, is incredibly small and is smaller than 0.05, so we reject H0⁠. The data provide convincing evidence that wives’ and husbands’ heights are positively correlated.
(b) heightˆW= 43.5755+ 0.2863×heightH⁠.
(c) Slope: For each additional inch in husband’s height, the average wife’s height is expected to be an additional 0.2863 inches on average. Intercept: Men who are 0 inches tall are expected to have wives who are, on average, 43.5755 inches tall. The intercept here is meaningless, and it serves only to adjust the height of the line.
(d) The slope is positive, so r must also be positive. r=0.09=0.30⁠.
(e) 63.33. Since R2 is low, the prediction based on this regression model is not very reliable.
(f) No, we should avoid extrapolating.

Answer (6 parts)

(a)

The point estimate and standard error are b1=0.9112 and SE=0.0259⁠. We can compute a T-score: T= (0.9112−1)/0.0259= − 3.43⁠. Using df=168⁠, the p-value is about 0.001, which is less than α=0.05⁠. That is, the data provide strong evidence that the average difference between husbands’ and wives’ ages has actually changed over time.

(b)

ageˆW= 1.5740+ 0.9112×ageH⁠.

(c)

Slope: For each additional year in husband’s age, the model predicts an additional 0.9112 years in wife’s age. This means that wives’ ages tend to be lower for later ages, suggesting the average gap of husband and wife age is larger for older people. Intercept: Men who are 0 years old are expected to have wives who are on average 1.5740 years old. The intercept here is meaningless and serves only to adjust the height of the line.

(d)

R=0.88=0.94⁠. The regression of wives’ ages on husbands’ ages has a positive slope, so the correlation coefficient will be positive.

(e)

ageˆW= 1.5740+ 0.9112×55= 51.69⁠. Since R2 is pretty high, the prediction based on this regression model is reliable.

(f)

No, we shouldn’t use the same model to predict an 85 year old man’s wife’s age. This would require extrapolation. The scatterplot from an earlier exercise shows that husbands in this data set are approximately 20 to 65 years old. The regression model may not be reasonable outside of this range.

8.41 §8.R source ↗

Nutrition at Starbucks, Part II. Exercise 8.22 introduced a data set on nutrition information on Starbucks food menu items. Based on the scatterplot and the residual plot provided, describe the relationship between the protein content and calories of these menu items, and determine if a simple linear model is appropriate to predict amount of protein from the number of calories.

A scatterplot is shown with about 75 points and an overlaid regression line that trends upward along with a residual plot. The horizontal axis represents ”Calories” and has values ranging from about 100 to 500. The vertical axis represents ”Protein, in grams” and has values ranging from 0 to about 30. Scatterplot: About 15 points are shown with fewer than 200 calories, and these have between about 0 and 5 grams of protein. About 30 points are shown with 200 to 400 calories, and these mostly have between 5 and 30 grams of protein. About 20 points are shown with more than 400 calories, and these mostly have between 5 and 30 grams of carbs. Residual plot: About 15 points are shown with fewer than 200 calories, and these have residuals roughly between -5 and positive 2. About 30 points are shown with 200 to 400 calories, and these residuals largely range from about -10 to positive 20. About 20 points are shown with more than 400 calories, and the residuals for these points mostly range between -10 and positive 8.

Exercise 8.22 in the book ↗

Nutrition at Starbucks, Part I. The scatterplot below shows the relationship between the number of calories and amount of carbohydrates (in grams) Starbucks food menu items contain. Since Starbucks only lists the number of calories on the display items, we are interested in predicting the amount of carbs a menu item has based on its calorie content.

A scatterplot is shown with about 75 points and an overlaid regression line that trends upward. The horizontal axis represents ”Calories” and has values ranging from about 100 to 500. The vertical axis represents ”Carbs, in grams” and has values ranging from about 20 to 80. About 15 points are shown with fewer than 200 calories, and these have between about 18 and 25 grams of carbs. About 30 points are shown with 200 to 400 calories, and these mostly have between 30 and 60 grams of carbs. About 20 points are shown with more than 400 calories, and these mostly have between 35 and 80 grams of carbs.

A residual plot is shown with about 75 points. The horizontal axis represents ”Calories” and has values ranging from about 100 to 500. The vertical axis represents ”Residuals” and has values ranging from about -30 to 30. About 15 points are shown with fewer than 200 calories, and these have residuals roughly between -7 and positive 2. About 30 points are shown with 200 to 400 calories, and these residuals largely range from about -15 to positive 15. About 20 points are shown with more than 400 calories, and the residuals for these points mostly range between -20 and positive 20.

A histogram is shown for the residuals, which shows a roughly bell-shaped distribution centered at 0 and a standard deviation of about 10.

(a) Describe the relationship between number of calories and amount of carbohydrates (in grams) that Starbucks food menu items contain.

(b) In this scenario, what are the explanatory and response variables?

(c) Why might we want to fit a regression line to these data?

(d) Do these data meet the conditions required for fitting a least squares line?

Answer

There is an upwards trend. However, the variability is higher for higher calorie counts, and it looks like there might be two clusters of observations above and below the line on the right, so we should be cautious about fitting a linear model to these data.

8.43 §8.R source ↗

Match the correlation, Part III. Match each correlation to the corresponding scatterplot.

(a) r=−0.72

(b) r=0.07

(c) r=0.86

(d) r=0.99

A scatterplot is shown. The left third of the data has values that range in the bottom half of the range in the vertical direction. The middle third of the data has values that mostly range in the middle 50% of the vertical direction. The right third of the data has values that range in the upper half of the range in the vertical direction.

A scatterplot is shown. The pattern resembles an arch, where the left third of the arch has been cut off. The peak of this ”arch” of data is about a third of the way into the horizontal range.

A scatterplot is shown, with what appears to be a stable upward trend in the data. If we were to imagine a line drawn against the data, the residuals would generally have a standard deviation equal to only about 5% of the vertical range of the data. That is, the data would be very ”tightly packed” around the regression line.

A scatterplot is shown. There is no clear pattern in the data when looking from left to right.

Answer (4 parts)

(a)

r=−0.72→(2)

(b)

r=0.07→(4)

(c)

r=0.86→(1)

(d)

r=0.99→(3)

Loading chapter 9…

Exercises and answers are adapted from OpenIntro Statistics by David Diez, Mine Çetinkaya-Rundel and Christopher D Barr, which is free to read and download, and are used under the CC BY-SA 3.0 licence. They are taken from the book’s LaTeX source and set for the web, so they may differ slightly from the printed page. This adaptation is released under the same licence and is neither affiliated with nor endorsed by Diez, Çetinkaya-Rundel and Barr or OpenIntro.