Skip to main content
Back to Statistics

Statistics · Regression

Logistic Regression for Binary Outcomes

The one idea: Ordinary regression predicts a number; logistic regression predicts a probability of a yes/no outcome, by running the same "weighted sum of predictors" machinery through an S-shaped curve (the sigmoid) that squeezes any input into the 0-to-1 range a probability has to live in.
⚠️ The trap: "Our regression predicts a 140% chance of churn for this customer, so the model must be broken." Fitting an ordinary straight-line regression to a 0/1 outcome is what's actually broken — the straight line has no way to know it should stay between 0 and 1, so it happily predicts 140% or −20% for inputs far from the average. A binary outcome needs a model built to respect the boundaries a probability has to respect — that's the entire reason logistic regression exists instead of just running plain regression on 0s and 1s.

The correlation and simple regression lesson built the least-squares line ŷ = b₀ + b₁x for a continuous outcome — dollars, signups, minutes. This lesson covers what changes when the outcome isn't a number at all, but a category: converted or didn't, defaulted or didn't, churned or didn't.

Why the straight line breaks for a 0/1 outcome

Try fitting an ordinary regression line directly to a binary outcome coded 0 (no) and 1 (yes) — say, predicting loan default (1) or repayment (0) from a borrower's debt-to-income ratio. The least-squares line will happily extend past 0 and past 1 for extreme x values, because nothing in the least-squares math knows "this output has to stay between 0 and 1" — it just minimizes squared distances the same way it…

Keep reading: Logistic Regression for Binary Outcomes

Unlock the full Statistics track — every lesson, the AI tutor, and full mock assessments.

  • Full lesson content
  • AI tutor for this section
  • Practice questions