Understanding Regression Models
An introduction to regression’s variables and equations, how fitted values and residuals describe data, and how to interpret coefficients and prediction limits.
Regression Questions and Model Setup
Start with the question
Regression describes how a response tends to change in relation to one or more predictors. It can summarize an observed relationship or predict a response for specified predictor values. The roles depend on the question: if the goal is to predict a house’s sale price from its floor area, sale price is the response and floor area is a predictor.
A model with one predictor is ; a model with multiple predictors is multiple regression. Choosing a predictor does not show that it causes the response. Regression alone describes or predicts a relationship; it is not proof of causation.
Set up the model
For observation , a simple linear regression model with one quantitative predictor is
Here, is the response, is the predictor value, and and describe the population relationship. The term represents variation not captured by the line. The model describes a linear relationship in the mean response; individual observations can differ from that mean.
With several predictors, the model includes a coefficient for each:
To set up either model, first identify what you want to describe or predict. Then select predictors that fit the question and the available data. Predictors can be quantitative, such as floor area, or categorical, such as building type; categorical predictors are represented using suitable indicator variables.
Fitting and Interpreting the Model
How the fitted line is chosen
The population coefficients in a regression model are unknown, so data are used to estimate them. In ordinary least-squares regression, the estimated line minimizes the sum of squared vertical differences between observed responses and fitted responses.
Once the coefficients are estimated, the gives a predicted response, , for specified predictor values. For a simple linear model,
where and are estimates of the population coefficients. The fitted value summarizes the model’s predicted pattern; it need not equal the response actually observed for a particular case.
A records that difference:
For example, using the supplied house-price model, , suppose an illustrative house has area (that is, 250 square feet, since area is measured in hundreds of square feet). Substitution gives
The fitted price is 135 thousand dollars, or $135,000. If this illustrative house’s observed price were $145,000, its would be thousand dollars: the observation is $10,000 above the fitted value. This hypothetical calculation illustrates how to use a fitted value and ; it is not an additional observation from the source.
Interpret coefficients in context
In the supplied equation, price is in thousands of dollars and area is in hundreds of square feet. Thus the slope of 18 means the fitted price increases by 18 thousand dollars, or $18,000, for each additional 100 square feet of area. This is a modeled change, not a guarantee for every house.
With multiple predictors, a slope describes the modeled change in response for a one-unit increase in that predictor while the other included predictors are held fixed. The intercept is the model’s predicted response when all predictors equal zero. It may have little practical meaning if zero is outside the relevant data range. Interpret coefficients using the model’s units and context, rather than treating them as context-free numbers.
Using Predictions with Care
Check the prediction’s range and context
A fitted relationship is most useful for describing or predicting cases within the range and context represented by the data. Using it beyond that range is extrapolation. Such predictions may be unreliable because they apply the fitted relationship where the data do not represent the case being predicted.
Before relying on a prediction, consider whether the case resembles the context represented by the data and whether its predictor values lie within the data’s range. A fitted line by itself does not convey all uncertainty or establish that the model’s assumptions are appropriate; those require further evaluation. Even a plausible fitted relationship or prediction does not establish that predictors cause changes in the response.
: The quantity a regression model describes or predicts.
: Quantities used to describe or predict the response.