From a Fitted Equation to a Fitted Response
A fitted multiple-regression equation can be used to calculate the response predicted by the model for a particular combination of predictor values. The calculation is direct, but accuracy depends on reading the equation correctly: use the stated units, substitute each predictor into its own term, and include the intercept if the model has one.
For example, suppose an estimated model relates a response \(Y\) to predictors \(X_1\) and \(X_2\). At predictor values \(x_1\) and \(x_2\), the fitted response is the value obtained by evaluating the estimated equation at those values. It is not necessarily the eventual observed response for an individual with those predictors; that observation may differ from the fitted value.
This rule applies to the equation as written. It assumes that the supplied values correspond to the predictors in that equation and use the same units. For the simple additive equation above, there are no interaction or other additional terms to evaluate. If a fitted equation has a different stated form, evaluate that form rather than silently changing it.
Why Substitution Gives the Fitted Value
The interpretation of the calculation follows from the linear regression model. Suppose that, conditional on the predictors, the response has the form \(Y=\beta_0+\beta_1X_1+\cdots+\beta_pX_p+\varepsilon\), with \(E[\varepsilon\mid X_1,\ldots,X_p]=0\). This zero conditional mean assumption implies that the conditional mean response is the linear part of the model. Replacing the unknown coefficients in that mean by their estimates gives the fitted mean.
Under the stated zero conditional mean assumption, \(E[Y\mid X_1=x_1,\ldots,X_p=x_p]=\beta_0+\beta_1x_1+\cdots+\beta_px_p\).
The fitted equation replaces each unknown \(\beta_j\) with its estimate \(\widehat{\beta}_j\).
Substituting \(x_1,\ldots,x_p\) into the estimated equation gives \(\widehat{y}(x_1,\ldots,x_p)\), the fitted response at that predictor combination.
The calculation itself is an evaluation of the fitted equation; it does not, by itself, require a claim that the model assumptions hold. The conditional-mean interpretation does rely on the model being appropriate. Nor does the fitted value guarantee that a future observed response will equal it: an observed response can also include a nonzero error term.
Worked Example: Comparing Two Predictor Combinations
A hypothetical insurer fits an additive model for a service account’s annual administrative cost, measured in dollars. Let \(X_1\) be the account’s years of tenure and \(X_2\) its number of service calls during the year. The estimated equation is \(\widehat{Y}=125+16X_1+7.5X_2\). Calculate the fitted cost for an account with 4 years of tenure and 3 calls, then for one with 7 years of tenure and 1 call. Find the difference between the two fitted costs.
Method. Substitute each account’s values into the equation, keeping the intercept and matching each value to its predictor.
For the first account, \(X_1=4\) and \(X_2=3\):
The fitted annual cost is \(\$211.50\).
For the second account, \(X_1=7\) and \(X_2=1\):
The fitted annual cost is \(\$244.50\), so the second fitted cost exceeds the first by \(244.5-211.5=\$33.00\).
Check. Tenure increases by 3 years, contributing \(16(3)=\$48\). The call count decreases by 2, contributing \(7.5(-2)=-\$15\). The net change is \(48-15=\$33\), which agrees with the difference in fitted values. The intercept is included in each fitted value but cancels in their difference.
Common mistake avoided. Omitting the intercept from either calculation would give values that are each \(\$125\) too small. The difference would still be \(\$33\), because the same intercept cancels, but the two fitted costs would be wrong.
Units and the Meaning of a Predictor Value
A coefficient is tied to the units used to define its predictor. Suppose a model uses mileage measured in thousands of miles. A value of \(8\) then represents 8,000 miles, not 8 miles. The coefficient’s numerical value is interpreted per one thousand miles. Substituting 8,000 instead of 8 changes the calculation drastically, even though it may seem that both numbers describe the same mileage.
Before calculating, label each supplied value with its unit and check that it matches the predictor’s unit in the fitted equation. If a value is given in a different unit, convert it before substitution. Do not alter a coefficient while using an unconverted predictor unless you have deliberately rewritten the model in the new units.
Worked Example: Keeping Mileage in the Model’s Units
A hypothetical vehicle-maintenance model predicts annual repair cost \(Y\) in dollars. It uses \(X_1\), annual mileage in thousands of miles, and \(X_2\), vehicle age in years: \(\widehat{Y}=180+60X_1+35X_2\). Calculate the fitted cost for a vehicle driven 8,000 miles during the year and aged 5 years.
Method. Convert the mileage to the model’s unit first. Since \(X_1\) is measured in thousands of miles, 8,000 miles gives \(X_1=8\). The age predictor is \(X_2=5\).
The fitted annual repair cost is \(\$835.00\). As a unit check, the mileage contribution is \(60\) dollars per thousand miles times 8 thousand miles, or \(\$480\); the age contribution is \(35\) dollars per year times 5 years, or \(\$175\). Together with the \(\$180\) intercept, these total \(\$835\).
Common mistake and correction. Substituting \(8{,}000\) directly gives \(180+60(8{,}000)+35(5)=480{,}355\). That is incorrect because \(8{,}000\) is miles, while the equation requires thousands of miles. Convert first, so the correct predictor value is \(8\).
When the Equation Has No Intercept
Not every fitted equation contains an intercept. A model may explicitly constrain the fitted response to be zero when all predictors are zero. In that case, the fitted equation has no intercept term, and the fitted response is calculated using only the terms shown. Do not add an intercept that was not estimated. Conversely, do not omit an intercept merely because the predictor values happen to be zero.
Worked Example: Evaluating a Model Constrained Through the Origin
A hypothetical equipment model predicts daily energy cost \(Y\), in dollars, from operating time \(X_1\), in hours, and the number of start-ups \(X_2\). The specified fitted model is constrained to have no intercept: \(\widehat{Y}=2.5X_1+4X_2\). Calculate the fitted cost for 6.4 operating hours and 3 start-ups.
Method. Use the equation as specified. Substitute \(X_1=6.4\) and \(X_2=3\), without adding a constant.
The fitted daily energy cost is \(\$28.00\). The arithmetic uses the two displayed terms, and the result checks because their contributions, \(\$16\) and \(\$12\), sum to \(\$28\). Adding an intercept such as 1 would change the specified model and produce an unsupported value.
Interpreting and Checking a Fitted Response
A reliable calculation can be organized into a few checks. First, identify the response unit and the predictor units. Next, copy the fitted equation exactly, including its intercept. Then substitute each specified predictor value into the corresponding term, evaluate the products, and add all the terms. Finally, verify that the magnitude and units are plausible for the scenario.
For two predictor combinations evaluated with the same additive equation, subtracting the fitted values can provide a useful independent check. The intercept cancels, and each predictor’s contribution to the difference is its coefficient multiplied by the change in that predictor:
This identity follows by writing out both fitted responses, subtracting the first from the second, and canceling their equal intercepts. It is a check on the difference, not a replacement for calculating each fitted response when the question asks for the individual values.
Keep the result’s interpretation precise: it is the model’s fitted response at the specified predictor values. It is not a guarantee about an individual observation, and the arithmetic alone does not establish that the model is suitable for those values. In particular, a calculated value can be mathematically correct even if a supplied predictor combination is outside the range represented by the data used to fit the model.
Check Your Understanding
For each problem, evaluate the stated equation as written and check the predictor units before substituting.
- A hypothetical model predicts monthly inspection cost \(Y\), in dollars, from inspection hours \(X_1\) and the number of sites \(X_2\): \(\widehat{Y}=40+6X_1-2X_2\). Find the fitted cost at \(X_1=5\) hours and \(X_2=4\) sites. (Answer: \(\$62.00\))
- A model for annual claim-handling expense, in dollars, is \(\widehat{Y}=250+18X_1+45X_2\), where \(X_1\) is years of coverage and \(X_2\) is the number of claims. Find the fitted expense for 3.5 years of coverage and 2 claims. (Answer: \(\$403.00\))
- A fitted model predicts a response in thousands of dollars using \(\widehat{Y}=1.8+0.12X_1-0.25X_2\). If \(X_1=10\) and \(X_2=4\), calculate the fitted response in thousands of dollars and then in dollars. (Answer: \(2.0\) thousand dollars, or \(\$2{,}000.00\))
- A hypothetical production model is specified without an intercept: \(\widehat{Y}=7X_1+3X_2\). Calculate the fitted response at \(X_1=2.5\) and \(X_2=4\), and state why no constant is added. (Answer: \(29.5\); the stated model has no intercept)
- For \(\widehat{Y}=90+12X_1-5X_2\), calculate fitted responses at \((X_1,X_2)=(4,6)\) and \((7,2)\), then find their difference. (Answer: \(108\) and \(164\); the second fitted response is \(56\) units greater)