Skip to main content

Introductory Statistics

Section 9.1 Introduction to Multiple Regression

Multiple regression extends simple two-variable regression to the case that still has one response but many predictors (denoted \(x_1, x_2, x_3, \ldots\)). The method is motivated by scenarios where many variables may be simultaneously connected to an output.
We will consider data about loans from the peer-to-peer lender, Lending Club, which is a data set we first encountered in Chapters 1 and 2. The loan data includes terms of the loan as well as information about the borrower. The outcome variable we would like to better understand is the interest rate assigned to the loan. For instance, all other characteristics held constant, does it matter how much debt someone already has? Does it matter if their income has been verified? Multiple regression will help us answer these and other questions.
The data set loans includes results from 10,000 loans, and we’ll be looking at a subset of the available variables, some of which will be new from those we saw in earlier chapters. The first six observations in the data set are shown in Figure 9.1.1, and descriptions for each variable are shown in Figure 9.1.2. Notice that the past bankruptcy variable (bankruptcy) is an indicator variable, where it takes the value 1 if the borrower had a past bankruptcy in their record and 0 if not. Using an indicator variable in place of a category name allows for these variables to be directly used in regression. Two of the other variables are categorical (income_ver and issued), each of which can take one of a few different non-numerical values; we’ll discuss how these are handled in the model in Subsection 9.1.1.
interest_rate income_ver debt_to_income credit_util bankruptcy term issued credit_checks
1 14.07 verified 18.01 0.55 0 60 Mar2018 6
2 12.61 not 5.04 0.15 1 36 Feb2018 1
3 17.09 source_only 21.15 0.66 0 36 Feb2018 4
4 6.72 not 10.16 0.20 0 36 Jan2018 0
5 14.07 verified 57.96 0.75 0 36 Mar2018 7
6 6.72 not 6.46 0.09 0 36 Jan2018 6
\(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\)
Figure 9.1.1. First six rows from the loans data set.
variable description
interest_rate Interest rate for the loan.
income_ver Categorical variable describing whether the borrower’s income source and amount have been verified, with levels verified, source_only, and not.
debt_to_income Debt-to-income ratio, which is the percentage of total debt of the borrower divided by their total income.
credit_util Of all the credit available to the borrower, what fraction are they utilizing. For example, the credit utilization on a credit card would be the card’s balance divided by the card’s credit limit.
bankruptcy An indicator variable for whether the borrower has a past bankruptcy in her record. This variable takes a value of 1 if the answer is “yes” and 0 if the answer is “no”.
term The length of the loan, in months.
issued The month and year the loan was issued, which for these loans is always during the first quarter of 2018.
credit_checks Number of credit checks in the last 12 months. For example, when filing an application for a credit card, it is common for the company receiving the application to run a credit check.
Figure 9.1.2. Variables and their descriptions for the loans data set.

Subsection 9.1.1 Indicator and categorical variables as predictors

Let’s start by fitting a linear regression model for interest rate with a single predictor indicating whether or not a person has a bankruptcy in their record:
\begin{equation*} \widehat{\text{rate}} = 12.33 + 0.74 \times \text{bankruptcy} \end{equation*}
Results of this model are shown in Figure 9.1.3.
Estimate Std. Error t value Pr(\(>\)|t|)
(Intercept) 12.3380 0.0533 231.49 \(\lt\)0.0001
bankruptcy 0.7368 0.1529 4.82 \(\lt\)0.0001
\(df=9998\)
Figure 9.1.3. Summary of a linear model for predicting interest rate based on whether the borrower has a bankruptcy in their record.

Example 9.1.4. Interpret the coefficient for the past bankruptcy variable.

Interpret the coefficient for the past bankruptcy variable in the model. Is this coefficient significantly different from 0?
Solution.
The bankruptcy variable takes one of two values: 1 when the borrower has a bankruptcy in their history and 0 otherwise. A slope of 0.74 means that the model predicts a 0.74% higher interest rate for those borrowers with a bankruptcy in their record. (See Section 7.2 for a review of the interpretation for two-level categorical predictor variables.) Examining the regression output in Figure 9.1.3, we can see that the p-value for bankruptcy is very close to zero, indicating there is strong evidence the coefficient is different from zero when using this simple one-predictor model.
Suppose we had fit a model using a 3-level categorical variable, such as income_ver. The output from software is shown in Figure 9.1.5. This regression output provides multiple rows for the income_ver variable. Each row represents the relative difference for each level of income_ver. However, we are missing one of the levels: not (for not verified). The missing level is called the reference level, and it represents the default level that other levels are measured against.
Estimate Std. Error t value Pr(\(>\)|t|)
(Intercept) 11.0995 0.0809 137.18 \(\lt\)0.0001
income_ver (source_only) 1.4160 0.1107 12.79 \(\lt\)0.0001
income_ver (verified) 3.2543 0.1297 25.09 \(\lt\)0.0001
\(df=9998\)
Figure 9.1.5. Summary of a linear model for predicting interest rate based on whether the borrower’s income source and amount has been verified. This predictor has three levels, which results in 2 rows in the regression output.

Example 9.1.6. Write an equation for this regression model.

How would we write an equation for this regression model?
Solution.
The equation for the regression model may be written as a model with two predictors:
\begin{equation*} \widehat{\text{rate}} = 11.10 + 1.42 \times \mathbb{1}_{\text{income\_ver = source\_only}} + 3.25 \times \mathbb{1}_{\text{income\_ver = verified}} \end{equation*}
We use the notation \(\mathbb{1}_{\text{condition}}\) to represent indicator variables for when the categorical variable takes a particular value. For example, \(\mathbb{1}_{\text{income\_ver = source\_only}}\) would take a value of 1 if income_ver was source_only for a loan, and it would take a value of 0 otherwise. Likewise, \(\mathbb{1}_{\text{income\_ver = verified}}\) would take a value of 1 if income_ver took a value of verified and 0 if it took any other value.
The notation used in Example 9.1.6 may feel a bit confusing. Let’s figure out how to use the equation for each level of the income_ver variable.

Example 9.1.7. Compute the average interest rate for borrowers with unverified income.

Using the model from Example 9.1.6, compute the average interest rate for borrowers whose income source and amount are both unverified.
Solution.
When income_ver takes a value of not, then both indicator functions in the equation from Example 9.1.6 are set to zero:
\begin{align*} \widehat{\text{rate}} \amp = 11.10 + 1.42 \times 0 + 3.25 \times 0\\ \amp = 11.10 \end{align*}
The average interest rate for these borrowers is 11.1%. Because the not level does not have its own coefficient and it is the reference value, the indicators for the other levels for this variable all drop out.

Example 9.1.8. Compute the average interest rate for borrowers with source-only verification.

Using the model from Example 9.1.6, compute the average interest rate for borrowers whose income source is verified but the amount is not.
Solution.
When income_ver takes a value of source_only, then the corresponding variable takes a value of 1 while the other (\(\mathbb{1}_{\text{income\_ver = verified}}\)) is 0:
\begin{align*} \widehat{\text{rate}} \amp = 11.10 + 1.42 \times 1 + 3.25 \times 0\\ \amp = 12.52 \end{align*}
The average interest rate for these borrowers is 12.52%.

Checkpoint 9.1.9.

Compute the average interest rate for borrowers whose income source and amount are both verified.
Hint.
When income_ver takes a value of verified, which indicator variable is 1?
Solution.
When income_ver takes a value of verified, then the corresponding variable takes a value of 1 while the other (\(\mathbb{1}_{\text{income\_ver = source\_only}}\)) is 0:
\begin{align*} \widehat{\text{rate}} \amp = 11.10 + 1.42 \times 0 + 3.25 \times 1\\ \amp = 14.35 \end{align*}
The average interest rate for these borrowers is 14.35%.

Predictors with several categories.

When fitting a regression model with a categorical variable that has \(k\) levels where \(k > 2\text{,}\) software will provide a coefficient for \(k - 1\) of those levels. For the last level that does not receive a coefficient, this is the reference level, and the coefficients listed for the other levels are all considered relative to this reference level.

Checkpoint 9.1.10.

Interpret the coefficients in the income_ver model.
Solution.
Each of the coefficients gives the incremental interest rate for the corresponding level relative to the not level, which is the reference level. For example, for a borrower whose income source and amount have been verified, the model predicts that they will have a 3.25% higher interest rate than a borrower who has not had their income source or amount verified.
The higher interest rate for borrowers who have verified their income source or amount is surprising. Intuitively, we’d think that a loan would look less risky if the borrower’s income has been verified. However, note that the situation may be more complex, and there may be confounding variables that we didn’t account for. For example, perhaps lenders require borrowers with poor credit to verify their income. That is, verifying income in our data set might be a signal of some concerns about the borrower rather than a reassurance that the borrower will pay back the loan. For this reason, the borrower could be deemed higher risk, resulting in a higher interest rate. (What other confounding variables might explain this counter-intuitive relationship suggested by the model?)

Checkpoint 9.1.11.

How much larger of an interest rate would we expect for a borrower who has verified their income source and amount vs a borrower whose income source has only been verified?
Solution.
Relative to the not category, the verified category has an interest rate of 3.25% higher, while the source_only category is only 1.42% higher. Thus, verified borrowers will tend to get an interest rate about \(3.25\% - 1.42\% = 1.83\%\) higher than source_only borrowers.

Subsection 9.1.2 Including and assessing many variables in a model

The world is complex, and it can be helpful to consider many factors at once in statistical modeling. For example, we might like to use the full context of borrower to predict the interest rate they receive rather than using a single variable. This is the strategy used in multiple regression. While we remain cautious about making any causal interpretations using multiple regression on observational data, such models are a common first step in gaining insights or providing some evidence of a causal connection.
We want to construct a model that accounts not only for any past bankruptcy or whether the borrower had their income source or amount verified, but simultaneously accounts for all the variables in the data set: income_ver, debt_to_income, credit_util, bankruptcy, term, issued, and credit_checks.
\begin{align*} \widehat{\text{rate}} \amp = \beta_0 + \beta_1 \times \mathbb{1}_{\text{income\_ver = source\_only}} + \beta_2 \times \mathbb{1}_{\text{income\_ver = verified}} + \beta_3 \times \text{debt\_to\_income}\\ \amp \qquad + \beta_4 \times \text{credit\_util} + \beta_5 \times \text{bankruptcy} + \beta_6 \times \text{term}\\ \amp \qquad + \beta_7 \times \mathbb{1}_{\text{issued = Jan2018}} + \beta_8 \times \mathbb{1}_{\text{issued = Mar2018}} + \beta_9 \times \text{credit\_checks} \end{align*}
This equation represents a holistic approach for modeling all of the variables simultaneously. Notice that there are two coefficients for income_ver and also two coefficients for issued, since both are 3-level categorical variables.
We estimate the parameters \(\beta_0, \beta_1, \beta_2, \ldots, \beta_9\) in the same way as we did in the case of a single predictor. We select \(b_0, b_1, b_2, \ldots, b_9\) that minimize the sum of the squared residuals:
\begin{equation} SSE = e_1^2 + e_2^2 + \cdots + e_{10000}^2 = \sum_{i=1}^{10000} e_i^2 = \sum_{i=1}^{10000} \left(y_i - \hat{y}_i\right)^2\tag{9.1.1} \end{equation}
where \(y_i\) and \(\hat{y}_i\) represent the observed interest rates and their estimated values according to the model, respectively. 10,000 residuals are calculated, one for each observation. We typically use a computer to minimize the sum of squares and compute point estimates, as shown in the sample output in Figure 9.1.12. Using this output, we identify the point estimates \(b_i\) of each \(\beta_i\text{,}\) just as we did in the one-predictor case.
Estimate Std. Error t value Pr(\(>\)|t|)
(Intercept) 1.9251 0.2102 9.16 \(\lt\)0.0001
income_ver (source_only) 0.9750 0.0991 9.83 \(\lt\)0.0001
income_ver (verified) 2.5374 0.1172 21.65 \(\lt\)0.0001
debt_to_income 0.0211 0.0029 7.18 \(\lt\)0.0001
credit_util 4.8959 0.1619 30.24 \(\lt\)0.0001
bankruptcy 0.3864 0.1324 2.92 0.0035
term 0.1537 0.0039 38.96 \(\lt\)0.0001
issued (Jan2018) 0.0276 0.1081 0.26 0.7981
issued (Mar2018) -0.0397 0.1065 -0.37 0.7093
credit_checks 0.2282 0.0182 12.51 \(\lt\)0.0001
\(df=9990\)
Figure 9.1.12. Output for the regression model, where interest_rate is the outcome and the variables listed are the predictors.

Multiple regression model.

A multiple regression model is a linear model with many predictors. In general, we write the model as
\begin{equation*} \hat{y} = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \cdots + \beta_k x_k \end{equation*}
when there are \(k\) predictors. We always estimate the \(\beta_i\) parameters using statistical software.

Example 9.1.13. Write out the regression model using point estimates.

Write out the regression model using the point estimates from Figure 9.1.12. How many predictors are there in this model?
Solution.
The fitted model for the interest rate is given by:
\begin{align*} \widehat{\text{rate}} \amp = 1.925 + 0.975 \times \mathbb{1}_{\text{income\_ver = source\_only}} + 2.537 \times \mathbb{1}_{\text{income\_ver = verified}} + 0.021 \times \text{debt\_to\_income}\\ \amp \qquad + 4.896 \times \text{credit\_util} + 0.386 \times \text{bankruptcy} + 0.154 \times \text{term}\\ \amp \qquad + 0.028 \times \mathbb{1}_{\text{issued = Jan2018}} - 0.040 \times \mathbb{1}_{\text{issued = Mar2018}} + 0.228 \times \text{credit\_checks} \end{align*}
If we count up the number of predictor coefficients, we get the effective number of predictors in the model: \(k = 9\text{.}\) Notice that the issued categorical predictor counts as two, once for the two levels shown in the model. In general, a categorical predictor with \(p\) different levels will be represented by \(p - 1\) terms in a multiple regression model.

Checkpoint 9.1.14.

What does \(\beta_4\text{,}\) the coefficient of variable credit_util, represent? What is the point estimate of \(\beta_4\text{?}\)
Solution.
\(\beta_4\) represents the change in interest rate we would expect if someone’s credit utilization was 0 and went to 1, all other factors held even. The point estimate is \(b_4 = 4.90\%\text{.}\)

Example 9.1.15. Compute the residual of the first observation.

Compute the residual of the first observation in Figure 9.1.1 using the equation identified in Example 9.1.13.
Solution.
To compute the residual, we first need the predicted value, which we compute by plugging values into the equation from Example 9.1.13. For example, \(\mathbb{1}_{\text{income\_ver = source\_only}}\) takes a value of 0, \(\mathbb{1}_{\text{income\_ver = verified}}\) takes a value of 1 (since the borrower’s income source and amount were verified), debt_to_income was 18.01, and so on. This leads to a prediction of \(\widehat{\text{rate}}_1 = 18.09\text{.}\) The observed interest rate was 14.07%, which leads to a residual of \(e_1 = 14.07 - 18.09 = -4.02\text{.}\)

Example 9.1.16. Why does the bankruptcy coefficient differ between models?

We estimated a coefficient for bankruptcy in Subsection 9.1.1 of \(b_1 = 0.74\) with a standard error of \(SE_{b_1} = 0.15\) when using simple linear regression. Why is there a difference between that estimate and the estimated coefficient of 0.39 in the multiple regression setting?
Solution.
If we examined the data carefully, we would see that some predictors are correlated. For instance, when we estimated the connection of the outcome interest_rate and predictor bankruptcy using simple linear regression, we were unable to control for other variables like whether the borrower had their income verified, the borrower’s debt-to-income ratio, and other variables. That original model was constructed in a vacuum and did not consider the full context. When we include all of the variables, underlying and unintentional bias that was missed by these other variables is reduced or eliminated. Of course, bias can still exist from other confounding variables.
Example 9.1.16 describes a common issue in multiple regression: correlation among predictor variables. We say the two predictor variables are collinear (pronounced as co-linear) when they are correlated, and this collinearity complicates model estimation. While it is impossible to prevent collinearity from arising in observational data, experiments are usually designed to prevent predictors from being collinear.

Checkpoint 9.1.17.

The estimated value of the intercept is 1.925, and one might be tempted to make some interpretation of this coefficient, such as, it is the model’s predicted price when each of the variables take value zero: income source is not verified, the borrower has no debt (debt-to-income and credit utilization are zero), and so on. Is this reasonable? Is there any value gained by making this interpretation?
Solution.
Many of the variables do take a value 0 for at least one data point, and for those variables, it is reasonable. However, one variable never takes a value of zero: term, which describes the length of the loan, in months. If term is set to zero, then the loan must be paid back immediately; the borrower must give the money back as soon as they receive it, which means it is not a real loan. Ultimately, the interpretation of the intercept in this setting is not insightful.

Subsection 9.1.3 Adjusted \(R^2\) as a better tool for multiple regression

We first used \(R^2\) in Section 7.2 to determine the amount of variability in the response that was explained by the model:
\begin{equation*} R^2 = 1 - \frac{\text{variability in residuals}}{\text{variability in the outcome}} = 1 - \frac{Var(e_i)}{Var(y_i)} \end{equation*}
where \(e_i\) represents the residuals of the model and \(y_i\) the outcomes. This equation remains valid in the multiple regression framework, but a small enhancement can make it even more informative when comparing models.

Checkpoint 9.1.18.

The variance of the residuals for the model given in Example 9.1.13 is 18.53, and the variance of the total interest rate in all the loans is 25.01. Calculate \(R^2\) for this model.
Solution.
\(R^2 = 1 - \frac{18.53}{25.01} = 0.2591\text{.}\)
This strategy for estimating \(R^2\) is acceptable when there is just a single variable. However, it becomes less helpful when there are many variables. The regular \(R^2\) is a biased estimate of the amount of variability explained by the model when applied to a new sample of data. To get a better estimate, we use the adjusted \(R^2\text{.}\)

Adjusted \(R^2\) as a tool for model assessment.

The adjusted \(R^2\) is computed as
\begin{equation*} R_{adj}^{2} = 1 - \frac{s_{\text{residuals}}^2 / (n-k-1)}{s_{\text{outcome}}^2 / (n-1)} = 1 - \frac{s_{\text{residuals}}^2}{s_{\text{outcome}}^2} \times \frac{n-1}{n-k-1} \end{equation*}
where \(n\) is the number of cases used to fit the model and \(k\) is the number of predictor variables in the model. Remember that a categorical predictor with \(p\) levels will contribute \(p - 1\) to the number of variables in the model.
Because \(k\) is never negative, the adjusted \(R^2\) will be smaller—oftentimes just a little smaller—than the unadjusted \(R^2\text{.}\) The reasoning behind the adjusted \(R^2\) lies in the degrees of freedom associated with each variance, which is equal to \(n - k - 1\) for the multiple regression context. If we were to make predictions for new data using our current model, we would find that the unadjusted \(R^2\) would tend to be slightly overly optimistic, while the adjusted \(R^2\) formula helps correct this bias.

Checkpoint 9.1.19.

There were \(n=10000\) loans in the loans data set and \(k=9\) predictor variables in the model. Use \(n\text{,}\) \(k\text{,}\) and the variances from Checkpoint 9.1.18 to calculate \(R_{adj}^2\) for the interest rate model.
Solution.
\(R_{adj}^2 = 1 - \frac{18.53}{25.01}\times \frac{10000-1}{10000-9-1} = 0.2584\text{.}\) While the difference is very small, it will be important when we fine tune the model in the next section.

Checkpoint 9.1.20.

Suppose you added another predictor to the model, but the variance of the errors \(Var(e_i)\) didn’t go down. What would happen to the \(R^2\text{?}\) What would happen to the adjusted \(R^2\text{?}\)
Solution.
The unadjusted \(R^2\) would stay the same and the adjusted \(R^2\) would go down.
Adjusted \(R^2\) could have been used in Chapter 7. However, when there is only \(k = 1\) predictor, adjusted \(R^2\) is very close to regular \(R^2\text{,}\) so this nuance isn’t typically important when the model has only one predictor.

Exercises 9.1.4 Exercises

1. Baby weights, Part I.

The Child Health and Development Studies investigate a range of topics. One study considered all pregnancies between 1960 and 1967 among women in the Kaiser Foundation Health Plan in the San Francisco East Bay area. Here, we study the relationship between smoking and weight of the baby. The variable smoke is coded 1 if the mother is a smoker, and 0 if not. The summary table below shows the results of a linear regression model for predicting the average birth weight of babies, measured in ounces, based on the smoking status of the mother.
Estimate Std. Error t value Pr(\(>\)|t|)
(Intercept) 123.05 0.65 189.60 0.0000
smoke -8.94 1.03 -8.65 0.0000
The variability within the smokers and non-smokers are about equal and the distributions are symmetric. With these conditions satisfied, it is reasonable to apply the model. (Note that we don’t need to check linearity since the predictor has only two levels.)
  1. Write the equation of the regression model.
  2. Interpret the slope in this context, and calculate the predicted birth weight of babies born to smoker and non-smoker mothers.
  3. Is there a statistically significant relationship between the average birth weight and smoking?

2. Baby weights, Part II.

Exercise 9.1.4.1 introduces a data set on birth weight of babies. Another variable we consider is parity, which is 1 if the child is the first-born, and 0 otherwise. The summary table below shows the results of a linear regression model for predicting the average birth weight of babies, measured in ounces, from parity.
Estimate Std. Error t value Pr(\(>\)|t|)
(Intercept) 120.07 0.60 199.94 0.0000
parity -1.93 1.19 -1.62 0.1052
  1. Write the equation of the regression model.
  2. Interpret the slope in this context, and calculate the predicted birth weight of first-borns and others.
  3. Is there a statistically significant relationship between the average birth weight and parity?

3. Baby weights, Part III.

We considered the variables smoke and parity, one at a time, in modeling birth weights of babies in Exercise 9.1.4.1 and Exercise 9.1.4.2. A more realistic approach to modeling infant weights is to consider all possibly related variables at once. Other variables of interest include length of pregnancy in days (gestation), mother’s age in years (age), mother’s height in inches (height), and mother’s pregnancy weight in pounds (weight). Below are three observations from this data set.
bwt gestation parity age height weight smoke
1 120 284 0 27 62 100 0
2 113 282 0 33 64 135 0
\(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\)
1236 117 297 0 38 65 129 0
The summary table below shows the results of a regression model for predicting the average birth weight of babies based on all of the variables included in the data set.
Estimate Std. Error t value Pr(\(>\)|t|)
(Intercept) -80.41 14.35 -5.60 0.0000
gestation 0.44 0.03 15.26 0.0000
parity -3.33 1.13 -2.95 0.0033
age -0.01 0.09 -0.10 0.9170
height 1.15 0.21 5.63 0.0000
weight 0.05 0.03 1.99 0.0471
smoke -8.40 0.95 -8.81 0.0000
  1. Write the equation of the regression model that includes all of the variables.
  2. Interpret the slopes of gestation and age in this context.
  3. The coefficient for parity is different than in the linear model shown in Exercise 9.1.4.2. Why might there be a difference?
  4. Calculate the residual for the first observation in the data set.
  5. The variance of the residuals is 249.28, and the variance of the birth weights of all babies in the data set is 332.57. Calculate the \(R^2\) and the adjusted \(R^2\text{.}\) Note that there are 1,236 observations in the data set.

4. Absenteeism, Part I.

Researchers interested in the relationship between absenteeism from school and certain demographic characteristics of children collected data from 146 randomly sampled students in rural New South Wales, Australia, in a particular school year. Below are three observations from this data set.
eth sex lrn days
1 0 1 1 2
2 0 1 1 11
\(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\)
146 1 0 0 37
The summary table below shows the results of a linear regression model for predicting the average number of days absent based on ethnic background (eth: 0 - aboriginal, 1 - not aboriginal), sex (sex: 0 - female, 1 - male), and learner status (lrn: 0 - average learner, 1 - slow learner).
Estimate Std. Error t value Pr(\(>\)|t|)
(Intercept) 18.93 2.57 7.37 0.0000
eth -9.11 2.60 -3.51 0.0000
sex 3.10 2.64 1.18 0.2411
lrn 2.15 2.65 0.81 0.4177
  1. Write the equation of the regression model.
  2. Interpret each one of the slopes in this context.
  3. Calculate the residual for the first observation in the data set: a student who is aboriginal, male, a slow learner, and missed 2 days of school.
  4. The variance of the residuals is 240.57, and the variance of the number of absent days for all students in the data set is 264.17. Calculate the \(R^2\) and the adjusted \(R^2\text{.}\) Note that there are 146 observations in the data set.

5. GPA.

A survey of 55 Duke University students asked about their GPA, number of hours they study at night, number of nights they go out, and their gender. Summary output of the regression model is shown below. Note that male is coded as 1.
Estimate Std. Error t value Pr(\(>\)|t|)
(Intercept) 3.45 0.35 9.85 0.00
studyweek 0.00 0.00 0.27 0.79
sleepnight 0.01 0.05 0.11 0.91
outnight 0.05 0.05 1.01 0.32
gender -0.08 0.12 -0.68 0.50
  1. Calculate a 95% confidence interval for the coefficient of gender in the model, and interpret it in the context of the data.
  2. Would you expect a 95% confidence interval for the slope of the remaining variables to include 0? Explain.

6. Cherry trees.

Timber yield is approximately equal to the volume of a tree, however, this value is difficult to measure without first cutting the tree down. Instead, other variables, such as height and diameter, may be used to predict a tree’s volume and yield. Researchers wanting to understand the relationship between these variables for black cherry trees collected data from 31 such trees in the Allegheny National Forest, Pennsylvania. Height is measured in feet, diameter in inches (at 54 inches above ground), and volume in cubic feet.
Estimate Std. Error t value Pr(\(>\)|t|)
(Intercept) -57.99 8.64 -6.71 0.00
height 0.34 0.13 2.61 0.01
diameter 4.71 0.26 17.82 0.00
  1. Calculate a 95% confidence interval for the coefficient of height, and interpret it in the context of the data.
  2. One tree in this sample is 79 feet tall, has a diameter of 11.3 inches, and is 24.2 cubic feet in volume. Determine if the model overestimates or underestimates the volume of this tree, and by how much.