Skip to main content

Logistic regression

Logistic regression models a binary outcome by expressing log-odds as a linear function of predictors, with fitted probabilities constrained to (0, 1) via the logistic function. Parameters are estimated by maximum likelihood.

ByHoang TruongUpdated

See it move

Loading infographic...

Logistic regression models log(p ÷ (1 − p)) = β₀ + β₁X₁ + … + βₖXₖ, the log-odds of a binary outcome, rather than the probability directly, so the fitted p̂ always lies between 0 and 1. A bank might use income, loan-to-value ratio, and credit history to predict loan default, then apply a threshold, often 0.5, to classify each applicant. Exponentiating a coefficient gives the odds ratio for that predictor.

Where it fits
SubjectData Analysis & StatisticsAdvancedTopicMultiple Regression & InterpretationAdvanced

The formula

LaTeX
log(p1p)=β0+β1X1++βkXk\log\left(\frac{p}{1 - p}\right) = \beta_0 + \beta_1 X_1 + \cdots + \beta_k X_k

Variables

probability of the event (outcome = 1) (dimensionless)
odds of the event (dimensionless)
intercept (dimensionless)
coefficient for predictor Xⱼ; exp(βⱼ) gives the odds ratio (per unit of Xⱼ)
j-th predictor variable (varies)

Log-odds (logit) form. Exponentiating any coefficient gives the multiplicative change in odds for a one-unit increase in that predictor.

LaTeX
p^=11+e(β0+β1X1++βkXk)\hat{p} = \frac{1}{1 + e^{-(\beta_0 + \beta_1 X_1 + \cdots + \beta_k X_k)}}

Variables

fitted probability of the event (dimensionless)
intercept (dimensionless)
coefficient for predictor Xⱼ (per unit of Xⱼ)
j-th predictor variable (varies)

Sigmoid (logistic) function form; constrains fitted probabilities to (0, 1) by construction.

Check yourself

PracticeCORE

An analyst fits a logistic regression to predict whether a loan defaults (Y = 1) or not (Y = 0). The estimated coefficient on the borrower's credit score is β̂ = −0.04. Which of the following correctly interprets this coefficient?

Select an answer to check your understanding.
Logistic regression — Edlintics Glossary