Logistic Regression: When Your Outcome Is Binary

Logistic regression predicts a binary outcome: pass or fail, purchased or not, survived or died, disease present or absent. Linear regression can't do this job, because it predicts unbounded numbers while a binary outcome is a probability trapped between 0 and 1. Logistic regression solves that by modeling the outcome on a different scale, the log-odds, and then translating back to probabilities. This guide explains why the switch is necessary, what odds and log-odds are, how to read the coefficients as odds ratios, and how to report the result.

The predictor logic carries straight over from linear models, so if you're comfortable with simple linear regression and multiple regression, you already know most of the structure. What's new is the outcome scale and the interpretation, which is where this guide spends its time.

Quick Answer

When to use it. When your outcome variable is binary (two categories) rather than continuous. For three or more categories, you'd use multinomial or ordinal logistic regression instead.

What it models. The log-odds of the outcome as a linear function of the predictors. A logistic (S-shaped) function then converts that back into a probability between 0 and 1.

How to read the coefficients. Each coefficient is a change in log-odds per one-unit increase in the predictor. Exponentiate it, e raised to the coefficient, to get an odds ratio, which is far easier to interpret.

Odds ratio meaning. An odds ratio above 1 means the predictor increases the odds of the outcome; below 1 means it decreases them; exactly 1 means no effect.

Why Not Just Use Linear Regression?

Suppose you code your outcome as 0 (fail) and 1 (pass) and fit an ordinary regression line. Two problems appear immediately, and neither is fixable within the linear framework.

It predicts impossible values. A straight line extends forever in both directions, so for high or low predictor values it will predict probabilities above 1 or below 0. A predicted 130 percent chance of passing is meaningless.

It assumes the wrong shape. The relationship between a predictor and a probability is rarely a straight line. Near certainty at both ends, the probability barely moves; in the middle, it changes quickly. That's an S-shape, not a line. Forcing a line through it mis-describes the relationship and violates the assumptions that make linear regression's inferences valid.

Logistic regression fixes both by changing what's on the left side of the equation. Instead of modeling the probability directly, it models the log-odds, which has no upper or lower bound and maps naturally onto a linear predictor.

Odds, Log-Odds, and the Logistic Function

Three related quantities do the work. Getting them straight is most of what makes logistic regression click.

Probability

The chance the outcome happens, between 0 and 1. A probability of 0.8 means an 80 percent chance of passing.

Odds

The probability of the outcome divided by the probability of its not happening. A probability of 0.8 is odds of 0.8 / 0.2 = 4, often stated as "4 to 1." Odds run from 0 to infinity, so they remove the upper ceiling that probabilities have, but they're still floored at 0.

Log-odds (the logit)

The natural logarithm of the odds. Taking the log removes the floor at 0 as well, so log-odds run from negative infinity to positive infinity. That unbounded scale is what lets logistic regression put a linear equation on the right-hand side. The whole trick of logistic regression is that the log-odds, unlike the probability, behaves like something a straight line can model.

The logistic function is what runs this in reverse. After the model computes a log-odds value from the predictors, the logistic (or sigmoid) function converts it back into a probability, squashing any value on the unbounded log-odds scale into the 0-to-1 range. That conversion is the source of the characteristic S-shaped curve.

The Logistic Regression Equation

The model looks like a linear regression, but the left side is log-odds rather than the raw outcome.

log-odds(y = 1) = b 0 + b 1x 1 + b 2x 2 + ...

The predictors combine linearly exactly as before, producing a log-odds value. The logistic function then turns that into a predicted probability. Because the coefficients live on the log-odds scale, they aren't directly interpretable as changes in probability, which is why the odds ratio, introduced below, is the quantity most write-ups actually report.

A Worked Example: Passing an Exam

Continuing the study-hours theme from the regression guides, suppose the outcome is now binary: did the student pass the exam (1) or fail (0)? Fitting a logistic regression of pass/fail on study hours for a class of students produces this model.

log-odds(pass) = -3.91 + 0.73(study hours)

Reading the coefficient as log-odds

The slope of 0.73 means each additional hour of study increases the log-odds of passing by 0.73. That's technically correct but almost impossible to feel intuitively, because nobody thinks in log-odds. This is why the coefficient gets exponentiated.

Reading the coefficient as an odds ratio

Exponentiate the slope, e raised to 0.73, and you get an odds ratio of about 2.08. Now it's interpretable: each additional hour of study roughly doubles the odds of passing. An odds ratio of 2.08 means the odds are multiplied by 2.08 for each one-unit increase in the predictor. This multiplicative reading is the standard way logistic coefficients are reported.

  • Odds ratio above 1: the predictor increases the odds of the outcome. 2.08 means the odds roughly double per hour.
  • Odds ratio below 1: the predictor decreases the odds. An odds ratio of 0.5 would halve them.
  • Odds ratio of 1: no effect. This is the value the null hypothesis puts the odds ratio at, which is why a confidence interval that includes 1 signals a nonsignificant predictor.

Turning the model into probabilities

Feed a study-hours value through the equation and the logistic function returns the predicted probability of passing. The S-shape is visible in how the probability accelerates through the middle and flattens at the ends.

Study hours Log-odds Predicted probability of passing
2 -2.44 0.08 (8%)
5 -0.24 0.44 (44%)
8 1.97 0.88 (88%)
11 4.17 0.98 (98%)

The model crosses a 50 percent predicted probability of passing at about 5.4 study hours. Below that, a fail is more likely than a pass; above it, the reverse. Notice how the probability jumps from 8 percent to 44 percent over the first three-hour step but only from 88 percent to 98 percent over the last, which is the S-curve flattening as it approaches certainty.

Logistic Results in Your Manuscript?

Odds ratios are easy to state and easy to state wrongly. Editor World's editors hold advanced degrees and read quantitative results sections every day, so they catch the misread odds ratio before your reviewer does. Start with a free sample edit of your first 300 words and choose an editor in your field.

Choose Your Editor

Multiple Predictors and Adjusted Odds Ratios

Logistic regression extends to several predictors the same way linear regression does, and the "holding other variables constant" logic from multiple regression applies unchanged. With more than one predictor, each odds ratio is an adjusted odds ratio: the effect of that predictor on the odds of the outcome, holding the others constant.

A clinical model might predict disease presence from age, body mass index, and smoking status at once. The odds ratio for smoking would then be the multiplicative effect of smoking on the odds of disease, adjusting for age and BMI. Categorical predictors enter through the same dummy coding used in linear models, and each dummy's odds ratio compares that category to the reference group. Because adjusted odds ratios account for the other variables, they can differ substantially from the unadjusted odds ratio you'd get from a single predictor alone, for the same reason a linear coefficient shifts when you add predictors.

Assumptions

Logistic regression relaxes some linear-regression assumptions and adds others. It does not require the outcome to be normally distributed, nor the residuals, nor equal variances. What it does require:

  • Independence of observations. Each observation is independent of the others, the same design requirement as in linear regression. Clustered or repeated-measures data needs a different model.
  • Linearity of the logit. The relationship between any continuous predictor and the log-odds of the outcome is linear. Note this is linearity on the log-odds scale, not the probability scale. It can be checked and, if violated, addressed by transforming the predictor.
  • No severe multicollinearity. As in multiple regression, strongly correlated predictors destabilize the coefficients. Check with the variance inflation factor.
  • Adequate sample size, counted in events. What matters is not the total sample but the number of cases in the smaller outcome category. A common guideline is at least 10 events per predictor. A study with 500 participants but only 20 who had the outcome can responsibly support only about two predictors.

Assessing Model Fit

Logistic regression has no R squared in the linear-regression sense, because there are no continuous residuals to partition. Several alternatives fill the role, and reviewers expect at least one.

  • Pseudo R squared. Measures such as McFadden's or Nagelkerke's imitate R squared on a 0-to-1-ish scale. They aren't proportions of variance explained and their values run lower than linear R squared, so interpret them by comparison rather than as a percentage.
  • Classification accuracy. Using a probability cutoff (often 0.5), how often does the model predict the right category? A classification table (confusion matrix) shows the hits and misses, though accuracy alone can mislead when the outcome categories are very unequal in size.
  • The ROC curve and AUC. The area under the ROC curve summarizes how well the model separates the two outcomes across all cutoffs. An AUC of 0.5 is chance; closer to 1 is better discrimination.
  • The Hosmer-Lemeshow test. A goodness-of-fit test where, unusually, a nonsignificant result is the good outcome, indicating the predicted probabilities match the observed frequencies.

Reporting Logistic Regression in APA Format

Report odds ratios with their confidence intervals rather than raw log-odds coefficients, since the odds ratio is the interpretable quantity. A complete sentence for the exam example reads:

A logistic regression predicted exam passing from study hours. Each additional hour was associated with significantly higher odds of passing, OR = 2.08, 95% CI [1.24, 3.49], p = .006. The model correctly classified 81% of cases.

The conventions worth holding to: lead with the odds ratio, give its 95 percent confidence interval, and check whether that interval includes 1, since an interval spanning 1 means the predictor isn't significant regardless of the point estimate. Report a fit measure (a pseudo R squared, classification accuracy, or AUC). And interpret the odds ratio in plain language, "each additional hour roughly doubled the odds of passing," so a reader understands the finding without converting from odds themselves.

Common Mistakes

  • Interpreting the raw coefficient as a probability change. The coefficient is a change in log-odds. Only after exponentiating is it an odds ratio, and even that is a change in odds, not in probability.
  • Confusing odds with probability. Odds and probability are different scales: odds of 4 correspond to a probability of 0.8, while odds of 2 correspond to a probability of about 0.67, not 0.5. The odds ratio describes a change in odds, not in probability.
  • Reading an odds ratio as a risk ratio. Odds ratios and relative risks coincide only when the outcome is rare. For common outcomes an odds ratio overstates the relative risk, so don't paraphrase "odds ratio of 2" as "twice as likely."
  • Using linear regression on a binary outcome. It predicts impossible probabilities and mis-describes the S-shaped relationship. Use logistic regression for binary outcomes.
  • Counting total sample size instead of events. The constraint is the number of cases in the smaller outcome category, not the overall n. Too few events per predictor produces unstable, overfit coefficients.
  • Ignoring an odds ratio confidence interval that includes 1. A point estimate of 1.8 looks like an effect, but if the interval runs from 0.7 to 4.5, the predictor is not significant.
  • Claiming causation. As with any regression, adjusting for other variables strengthens an argument but does not by itself establish cause. Keep the language associational unless the design supports more.

Where to Go Next

Logistic regression handles a binary outcome. For an outcome with three or more unordered categories, multinomial logistic regression applies the same log-odds logic across categories; for ordered categories, ordinal logistic regression does. When the outcome is a count rather than a category, Poisson or negative binomial regression is the usual choice.

For the foundations underneath this article, see the guides to simple linear regression and multiple regression, and for the predictor terminology and dummy coding, the guide to the dependent and independent variables. The significance tests on each coefficient use the same hypothesis-testing logic as the rest of the cluster.

When your analysis is written up, the results section is where a subject-matter editor earns their place, because a reviewer who spots an odds ratio read as a probability or a risk ratio will question the rest. Editor World's academic editing, dissertation editing, and journal article editing services include review of statistical reporting, and you choose your own editor by field so the person reading your logistic output knows your discipline's conventions.


Frequently Asked Questions

When should I use logistic regression instead of linear regression?

Use logistic regression when the outcome is binary, meaning two categories like pass or fail, purchased or not, disease present or absent. Linear regression is wrong for a binary outcome because it predicts unbounded values that can fall below 0 or above 1 and therefore can't be valid probabilities, and because it assumes a straight line when the relationship between a predictor and a probability is actually S-shaped. Logistic regression models the log-odds, which is unbounded and suits a linear predictor, then converts back to a probability between 0 and 1. For three or more categories, multinomial or ordinal logistic regression is used instead.


What is an odds ratio in logistic regression?

An odds ratio is the exponentiated form of a logistic coefficient, e raised to the coefficient. It describes the multiplicative change in the odds of the outcome per one-unit increase in the predictor. Above 1 means the predictor increases the odds, below 1 means it decreases them, and exactly 1 means no effect. For example, an odds ratio of 2.08 means each one-unit increase roughly doubles the odds of the outcome. The odds ratio is reported instead of the raw coefficient because a change in odds is far easier to interpret than a change in log-odds.


What is the difference between odds and probability?

Probability is the chance an outcome happens, between 0 and 1. Odds are the probability of the outcome divided by the probability of it not happening. A probability of 0.8 is odds of 4 (0.8 divided by 0.2). The two aren't interchangeable: odds of 2 correspond to a probability of about 0.67, not 0.5. Logistic regression works in odds and log-odds rather than probability because those scales are unbounded and suit a linear model, but predicted probabilities are recovered at the end through the logistic function.


How do you interpret a logistic regression coefficient?

A raw coefficient is the change in the log-odds of the outcome per one-unit increase in the predictor, holding other predictors constant. Because log-odds are hard to read directly, exponentiate the coefficient to get an odds ratio, the multiplicative change in the odds. For example, a coefficient of 0.73 exponentiates to an odds ratio of about 2.08, so each one-unit increase roughly doubles the odds. With multiple predictors, each odds ratio is adjusted, describing that predictor's effect while holding the others constant.


How is model fit assessed in logistic regression?

Logistic regression has no R² in the linear sense, since there are no continuous residuals to partition. Pseudo R² measures like McFadden's or Nagelkerke's imitate R² but aren't proportions of variance explained and run lower. Classification accuracy reports how often the model predicts the right category at a chosen cutoff, usually shown in a classification table. The area under the ROC curve summarizes how well the model separates the two outcomes across all cutoffs, with 0.5 being chance. The Hosmer-Lemeshow test checks goodness of fit, where a nonsignificant result is the good outcome.


How many observations does logistic regression need?

The relevant count is not the total sample but the number of cases in the smaller outcome category, often called events. A common guideline is at least 10 events per predictor. A study with 500 participants but only 20 who had the outcome can responsibly support only about two predictors, because the effective sample for estimating coefficients is limited by the rarer category. Too few events per predictor produces unstable coefficients that overfit the sample, so check the events-per-variable ratio before deciding how many predictors to include.


Page last reviewed: July 2026. Content reviewed by Editor World editorial staff. Editor World, founded in 2010 by Patti Fisher, PhD, graduate of The Ohio State University, provides professional editing and proofreading services for academic researchers, doctoral candidates, faculty, business professionals, and authors worldwide. 100% human editing, no AI at any stage. BBB A+ accredited since 2010 with 5.0/5 Google Reviews and 5.0/5 Facebook Reviews. More than 100 million words edited for over 8,000 clients in 65+ countries. Multiple Gold and Bronze Stevie Award winner. Native English editors from the United States, the United Kingdom, and Canada. Less than 5% of applicants are accepted to the editor panel. Recommended by the Boston University Economics Department, University of San Diego, University of Michigan, UCLA, University of Missouri, and more.