10.3 Linear regression

Linear regression models a numeric response as a function of one or more explanatory variables. A simple model has the form

\[ Y=\beta_0+\beta_1X+\varepsilon. \]

Multiple regression includes several features and may include transformations or interactions. The coefficients describe expected changes under the model, holding other included variables constant. They do not automatically establish causal effects.

Important checks include linearity where assumed, residual patterns, influential observations, changing variance, collinearity, and performance on appropriate evaluation data. A low p-value does not establish useful predictive accuracy, and a high coefficient of determination does not guarantee that the model will generalize.

Worked Example: Predicting Program Attendance

NVRW models the number of attendees for a scheduled program using capacity, registration count, wait-list count, program category, location, day, start time, season, and lead time before the program begins.

The model is useful only if features are available at the planning date. Final registration count cannot be used for a forecast made four weeks earlier. The team therefore creates features measured at a common four-week cutoff and compares the model with a baseline that uses the historical average for the same program category and season.