Tutorials › Introduction to Statistics › Making Predictions from a Multiple Regression Equation

Introduction to Multiple Regression · Tutorial 926 of 996

Making Predictions from a Multiple Regression Equation

Use a multiple regression equation to calculate and interpret a fitted response for a specified combination of predictor values.

Intermediate 9 min read

What You'll Learn

  • Substitute specified values for all predictors in a multiple regression equation.
  • Keep track of units as each predictor term is calculated.
  • State what a fitted response estimates in the setting of the problem.
  • Distinguish a fitted conditional mean from an individual observed response.
  • Recognize why predictions beyond the observed predictor values may be unreliable.
  • Separate a model error from a fitted residual.

From a Regression Equation to a Prediction

A multiple regression equation combines information from several predictors to estimate a response. Once the equation has been fitted, a practical question is often: what response does the model predict for a case with these predictor values? The calculation is direct substitution, but a sound answer also identifies what is being predicted, gives its units, and avoids claiming more than the model supports.

The prediction is conditional on the specified values of all predictors in the equation. For example, a model for weekly sales might use both advertising expenditure and store traffic. Substituting an advertising value alone is not enough: the prediction also depends on the traffic value.

The Model and the Fitted Response

For a response \(Y\) and \(k\) quantitative predictors \(X_1,\ldots,X_k\), a multiple linear regression model specifies the conditional mean response as a linear combination of the predictors:

$$ E(Y\mid X_1=x_1,\ldots,X_k=x_k) = \beta_0+\beta_1x_1+\cdots+\beta_kx_k $$

Here \(\beta_0,\ldots,\beta_k\) are population coefficients, and \(x_1,\ldots,x_k\) are particular predictor values. In a fitted model, the unknown population coefficients are replaced by estimated coefficients \(b_0,\ldots,b_k\). For specified values \(x_1,\ldots,x_k\), the fitted response is

$$ \hat{y}=b_0+b_1x_1+\cdots+b_kx_k. $$
Definition: A fitted response (or fitted value at specified predictor values) is the value \(\hat{y}\) obtained by substituting those values into the estimated multiple regression equation. It estimates the model's conditional mean response for cases with that predictor combination. Its units are the units of the response variable.

The equation is a model for a conditional mean, not a rule that every individual with the specified predictor values must have exactly the fitted response. Individual outcomes can vary around that mean. For an observed case, the model error is the observed response minus the population conditional mean, \(y-E(Y\mid x_1,\ldots,x_k)\). The fitted residual is instead the observed response minus the estimated fitted value, \(y-\hat{y}\). These are different quantities because the population conditional mean is generally unknown and is estimated by \(\hat{y}\).

The substitution itself is arithmetic. Interpreting its result as a useful prediction depends on whether the fitted equation is a reasonable representation of the conditional mean for the predictor values in question. In particular, the model assumes the specified linear form for that mean is appropriate. A calculation does not establish that assumption.

A Reliable Substitution Method

For each requested prediction, write down the equation, identify the response units, and match every supplied predictor value to its variable and units. Then substitute all values, preserve signs and parentheses, calculate each term, and add the terms. Finally, describe the result in context as an estimated mean response for cases with that combination of predictors.

1
Identify the response and predictors.
Check which variable is being predicted and which values the equation requires.
2
Substitute every predictor value.
Match values to the correct terms; do not omit a predictor or swap the values.
3
Calculate and check units.
Each coefficient-times-predictor term contributes to the response scale, as does the intercept.
4
Interpret cautiously.
State the estimated response in context and remember that it estimates a conditional mean, not a guaranteed individual outcome.

Worked Example: Predicting Weekly Store Sales

Suppose a hypothetical fitted equation predicts weekly sales \(Y\), measured in hundreds of dollars, from advertising expenditure \(x_1\), also measured in hundreds of dollars, and store traffic \(x_2\), measured in hundreds of visits:

$$ \hat{y}=5.4+0.82x_1+1.6x_2. $$

Find the fitted response for a week with advertising expenditure of \(3\) hundred dollars and traffic of \(12\) hundred visits.

Substitute \(x_1=3\) and \(x_2=12\):

$$ \hat{y}=5.4+0.82(3)+1.6(12) =5.4+2.46+19.2 =27.06. $$

The fitted response is \(27.06\) hundreds of dollars, or \(\$2{,}706\) in weekly sales. In context, this is the model's estimated mean weekly sales for weeks with these predictor values. It is not a promise that a particular week will have exactly \(\$2{,}706\) in sales.

The unit check helps catch mistakes: the equation's response is in hundreds of dollars, so the numerical result \(27.06\) must first be interpreted in that unit. The conversion to dollars multiplies by \(100\).

Predictions With Several Predictors

With more predictors, the same substitution rule applies. It is especially important to label each value before calculating, because predictor values may use different units and scales. Do not treat a coefficient as a standalone prediction: each coefficient must be multiplied by its corresponding predictor value, and the intercept must be included.

Worked Example: Estimating Resting Heart Rate

Consider a hypothetical fitted equation for resting heart rate \(Y\), in beats per minute, using age \(x_1\), in years, and weekly exercise \(x_2\), in hours:

$$ \hat{y}=65+0.15x_1-2.4x_2. $$

Calculate the fitted response for a person aged \(40\) years who exercises \(3\) hours per week.

Substitute both values, retaining the negative sign on the exercise term:

$$ \hat{y}=65+0.15(40)-2.4(3) =65+6-7.2 =63.8. $$

The fitted response is \(63.8\) beats per minute. It estimates the mean resting heart rate for cases with age \(40\) years and weekly exercise of \(3\) hours, according to this fitted model. It does not say that exercise caused a particular person's heart rate, nor does it guarantee an individual's measured rate will equal \(63.8\).

A useful check is to calculate each contribution separately: \(0.15(40)=6\) beats per minute and \(-2.4(3)=-7.2\) beats per minute. Both contributions and the intercept are on the response scale, so they can be added.

Mean Response Is Not the Same as an Individual Outcome

A fitted value is an estimate of the conditional mean response. If an actual case has the stated predictor values, its observed response may be above or below that mean. The earlier material on prediction intervals distinguishes uncertainty about a mean response from the additional case-to-case variation involved in predicting an individual response. The fitted value alone is not an interval and does not quantify either kind of uncertainty.

The distinction between a model error and a fitted residual matters here. In the model, an individual response can be written as its population conditional mean plus a model error. After fitting, the residual for an observed case is calculated using the estimated fitted response instead. Since estimation makes \(\hat{y}\) an approximation to the population conditional mean, the model error and residual should not be used as interchangeable names for the same difference.

Key distinction: The fitted response \(\hat{y}\) is a model-based estimate of a conditional mean. For an observed case, the residual is \(y-\hat{y}\), while the model error is \(y-E(Y\mid x_1,\ldots,x_k)\). A fitted response is not the observed response and is not an individual prediction interval.

Why the Conditional Mean Is the Natural Prediction

The conditional mean is the prediction that minimizes expected squared prediction error when the predictor values are fixed. This short argument explains why a regression equation for \(E(Y\mid x_1,\ldots,x_k)\) provides a natural fitted response.

Write \(m=E(Y\mid x_1,\ldots,x_k)\), and consider any fixed proposed prediction \(a\) at these predictor values. Add and subtract \(m\), then expand the square:

$$ \begin{aligned} E[(Y-a)^2\mid x_1,\ldots,x_k] &=E[((Y-m)+(m-a))^2\mid x_1,\ldots,x_k]\\ &=E[(Y-m)^2\mid x_1,\ldots,x_k] +2(m-a)E[Y-m\mid x_1,\ldots,x_k] +(m-a)^2. \end{aligned} $$

By the definition of \(m\), \(E[Y-m\mid x_1,\ldots,x_k]=0\). Therefore,

$$ E[(Y-a)^2\mid x_1,\ldots,x_k] = E[(Y-m)^2\mid x_1,\ldots,x_k]+(m-a)^2. $$

The first term does not depend on \(a\), and the second term is nonnegative, reaching its minimum of zero when \(a=m\). Thus the conditional mean minimizes conditional expected squared error. In a fitted regression equation, \(\hat{y}\) estimates that mean; it does not remove the remaining variation among individual responses.

Worked Example: Predicting Laboratory Turnaround Time

A hypothetical fitted model estimates laboratory turnaround time \(Y\), in hours, from the number of staff members \(x_1\) and the number of samples processed that day \(x_2\):

$$ \hat{y}=9.5-0.35x_1+0.012x_2. $$

For a day with \(8\) staff members and \(240\) samples, the fitted response is

$$ \hat{y}=9.5-0.35(8)+0.012(240) =9.5-2.8+2.88 =9.58. $$

The model estimates a mean turnaround time of \(9.58\) hours for days with these staffing and sample-count values. Notice that the negative staffing contribution and positive sample-count contribution partly offset each other. The result is in hours because that is the response unit.

This interpretation is most defensible if these predictor values are represented in the data used to fit the model and the model's conditional mean form is reasonable there. If, for example, the observed data never included staffing above \(20\) people, using the equation for \(100\) staff members would be extrapolation. The arithmetic would still produce a number, but the data would provide little support for treating it as a reliable prediction.

Common Mistakes and Practical Checks

  • Leaving out a predictor. In a model with two or more predictors, the fitted response depends on the complete specified combination. Substitute a value for every predictor term.
  • Pairing values with the wrong coefficients. Label the predictor values before substitution. A correct calculation with an age value placed in the exercise term is still the wrong prediction.
  • Dropping a minus sign or the intercept. Write the substituted equation before doing mental arithmetic, then calculate each term explicitly.
  • Reporting the wrong units. The fitted response has the response variable's units, not the units of a predictor. Convert units only after obtaining the fitted value if the requested reporting scale differs.
  • Calling the fitted response an actual outcome. A fitted response estimates a conditional mean; an individual outcome can differ from it.
  • Treating any calculated value as reliable. A number can be computed even outside the predictor values represented in the data. Such extrapolation may be unreliable, and a poor conditional mean model can also undermine predictions within the observed range.

When checking a result, ask whether every predictor was included, whether each value was assigned to the right term, whether the arithmetic and signs are correct, and whether the final sentence names the response, units, and predictor conditions. These checks make the calculation both reproducible and interpretable.

Key takeaway: Substitute the full predictor combination into the fitted multiple regression equation, calculate \(\hat{y}\), and report it in the response's units as an estimated conditional mean. Keep that fitted mean distinct from an individual observed response.

Check Your Understanding

Answer each question using the definitions and method in this tutorial.

  1. A fitted equation is \(\hat{y}=4+2x_1-0.5x_2\). Calculate the fitted response when \(x_1=3\) and \(x_2=8\), showing the substitution.
  2. If the response is measured in minutes and a fitted value is \(12.4\), what units should you report? What does that fitted value estimate?
  3. Explain why an observed response need not equal the fitted response for a case with the specified predictor values.
  4. State the distinction between the model error and the fitted residual for an observed case.
  5. Why might a prediction calculated for predictor values far outside those represented in the data be unreliable, even if the substitution arithmetic is correct?