← back to statistics

Multiple and Logistic Regression

OpenIntro Statistics · CC BY-SA 3.0 · Chapter 9

Multiple regression uses several predictors to model a continuous outcome. Logistic regression models a binary outcome using the sigmoid function. Both extend simple regression: one by adding predictors, the other by changing the link function.

x p 1 0.5 0 p(x) = 1/(1+e⁻ˣ)

Multiple predictors

The model y = b0 + b1*x1 + b2*x2 + ... + bp*xp uses p predictors. Each coefficient bi represents the expected change in y for a one-unit increase in xi, holding all other predictors constant. This "holding constant" interpretation is the difference from running p separate simple regressions.

Scheme

Adjusted R-squared

R-squared always increases when you add a predictor, even a useless one. Adjusted R-squared penalizes for the number of predictors: R-adj = 1 - (SSE/(n-p-1)) / (SST/(n-1)). It only increases when the new predictor improves the model more than chance would predict.

Scheme

Multicollinearity

When predictors are correlated with each other, individual coefficients become unstable: large standard errors, sign flips, sensitivity to which observations are included. The variance inflation factor (VIF) quantifies this: VIF = 1 / (1 - R^2_j), where R^2_j is from regressing predictor j on all other predictors. VIF above 5-10 signals trouble.

Scheme

Logistic regression

For a binary outcome (0 or 1), linear regression can predict probabilities outside 0-1. Logistic regression fixes this by modeling the log-odds: log(p/(1-p)) = b0 + b1*x. Solving for p gives the sigmoid: p = 1 / (1 + e^-(b0+b1*x)). The coefficients represent changes in log-odds, not in probability.

Scheme

Odds ratios

The odds of an event is p/(1-p). In logistic regression, e^b1 is the odds ratio: the factor by which the odds multiply for each one-unit increase in x. An odds ratio of 2.23 means the odds more than double per unit increase. This is the natural scale for interpreting logistic coefficients.

Scheme

Notation reference

Symbol Formula Meaning
R²_adj1-(SSE/(n-p-1))/(SST/(n-1))Adjusted R-squared
VIF1/(1-R²_j)Variance inflation factor
logit(p)log(p/(1-p))Log-odds (link function)
σ(z)1/(1+e⁻ᶻ)Sigmoid function
OReᵇ¹Odds ratio
Neighbors

Cross-references

  • Cogsci Ch.4 — neural networks use logistic (sigmoid) activation functions

Foundations (Wikipedia)