Logistic Regression

Logistic regression predicts the probability of a binary outcome (e.g., yes/no, pass/fail) by applying the logistic (sigmoid) function to a linear combination of predictors, mapping any real number to a value between 0 and 1.

What is logistic regression?

Unlike linear regression, which predicts an unbounded numeric value, logistic regression is built specifically for classification: it squashes its output through the sigmoid function so the result always lands between 0 and 1 and can be read directly as a probability.

Basic formula

P(y=1 x) = 1 / (1 + e^−(β₀ + β₁x)), and the model is fit by maximizing the likelihood of the observed data rather than minimizing squared error.

Example

Predicting whether a customer will churn based on their usage patterns — the model outputs a probability, which is then thresholded (commonly at 0.5) to make a yes/no prediction.

Common mistakes

Interpreting coefficients as if they were linear-regression coefficients (they represent log-odds, not the outcome directly); using accuracy alone to evaluate imbalanced classification problems.

  • Linear Regression

Questions about logistic regression

Per-concept question filtering isn’t wired up yet — browse all worked Statistics problems in the meantime.