Logistic regression is a statistical method that predicts a yes/no (binary) outcome — like pass/fail, sick/healthy, or churned/retained — and reports odds ratios that tell you how much each predictor changes the odds of that outcome happening. If you're staring at a dataset where your outcome column is just 0s and 1s and you can't work out why regular (linear) regression feels wrong, this is why: linear regression predicts numbers on a continuous scale, but your outcome only has two possible values.
Key Takeaways
- Logistic regression predicts a binary outcome (two categories) and estimates the probability of an event, not a continuous number.
- An odds ratio (OR) tells you how the odds of the outcome change for each one-unit increase in a predictor: OR > 1 means the odds go up, OR < 1 means they go down, OR = 1 means no effect.
- You report logistic regression in APA 7 with the odds ratio, its 95% confidence interval, and the p value — for example, OR = 2.14, 95% CI [1.32, 3.47], p = .002.
- Odds are not the same as probability. Odds are the ratio of the chance an event happens to the chance it doesn't (e.g. 3:1), while probability is a value between 0 and 1.
- StatRyx runs logistic regression, converts coefficients into odds ratios, and writes the APA 7 result for you automatically.
When should I use logistic regression?
Use logistic regression whenever your outcome variable is categorical with two levels and you want to know which factors predict which category someone falls into. If you're predicting a number (income, test score, blood pressure), use linear regression instead. If you're predicting a category with more than two levels (which of four brands someone chooses), you'd use multinomial logistic regression.
Typical questions logistic regression answers:
- Does hours of study predict whether a student passes or fails an exam?
- Does age predict whether a patient develops a condition or not?
- Do marketing emails predict whether a customer churns or stays?
The giveaway is the word "whether" — you're modelling the odds of one of two outcomes.
Why can't I just use linear regression?
Linear regression can produce impossible predictions for a binary outcome — like a 130% or a −20% chance of passing — because it draws a straight line that keeps going past 0 and 1. Probabilities can only live between 0 and 1, so logistic regression instead fits an S-shaped (sigmoid) curve that bends to stay inside those bounds. That curve is what lets logistic regression translate any combination of predictors into a sensible probability.
Behind the scenes, logistic regression models the log-odds of the outcome as a linear equation. You don't need to hand-calculate that — the important part is what comes out the other side: odds ratios.
What is an odds ratio, in plain English?
An odds ratio is a single number that tells you how the odds of an outcome multiply for each one-unit increase in a predictor. Read it like this:
- OR = 1 → the predictor makes no difference to the odds.
- OR = 2 → each one-unit increase doubles the odds of the outcome.
- OR = 0.5 → each one-unit increase halves the odds.
- OR = 1.30 → each one-unit increase raises the odds by 30%.
First, a quick distinction that trips up almost everyone: odds and probability are different. If 3 out of 4 students pass, the probability of passing is 0.75, but the odds are 3 to 1 (3 pass for every 1 who fails). An odds ratio compares two sets of odds — for example, the odds of passing with an extra hour of study versus without it.
Reading an odds ratio's confidence interval
If the 95% confidence interval for an odds ratio includes 1, the effect is not statistically significant — because "1" means "no change in odds." An OR of 1.80 with a CI of [1.20, 2.71] is significant (the whole range is above 1). An OR of 1.80 with a CI of [0.85, 3.80] is not significant, because the interval spans 1.
A worked example with real numbers
Imagine we test whether hours of study predict whether 120 students pass (1) or fail (0) a statistics exam. We run a logistic regression in StatRyx and get this output for the predictor hours studied:
- B (coefficient) = 0.76
- Odds ratio (OR) = e^0.76 = 2.14
- 95% CI [1.32, 3.47]
- p = .002
Here's what each number means:
- OR = 2.14 → every additional hour of study more than doubles the odds of passing. A student who studies 5 hours has roughly 2.14 times the odds of passing compared with one who studies 4 hours.
- 95% CI [1.32, 3.47] → we're 95% confident the true odds ratio lies between 1.32 and 3.47. Because this range sits entirely above 1, the effect is real and significant.
- p = .002 → there's a 0.2% chance we'd see an effect this large if study hours actually had no relationship with passing. Since .002 < .05, we reject the idea of "no effect."
Plain-language conclusion: more study hours significantly increased the odds of passing, and the effect was large.
How do I report logistic regression in APA 7?
In APA 7 style, report the odds ratio, its 95% confidence interval, and the exact p value, with test statistics and p italicised and no leading zero on p. Here's how our example reads in a results section:
A logistic regression predicting exam outcome from hours studied was statistically significant. Each additional hour of study increased the odds of passing, OR = 2.14, 95% CI [1.32, 3.47], p = .002.
Note the formatting details APA reviewers check for: OR is italicised, the confidence interval uses square brackets, and p = .002 has no zero before the decimal point.
Logistic vs linear regression: key differences
| Feature | Logistic regression | Linear regression |
|---|---|---|
| Outcome type | Binary / categorical (yes/no) | Continuous number |
| Predicts | Probability of an event | An actual value |
| Shape fitted | S-shaped (sigmoid) curve | Straight line |
| Key output | Odds ratios (OR) | Regression coefficients (B, β) |
| Effect size | Odds ratio, pseudo-R² | R², adjusted R² |
| Example question | Will this patient relapse? | How much will sales rise? |
Which test do I actually need?
Choose logistic regression if your outcome is two categories and you have one or more predictors (numeric or categorical). If your outcome is a number, use linear regression. If you simply want to know whether two categorical variables are related — with no predictors — a chi-square test is the simpler fit. And if you're deciding between comparing two groups on a numeric outcome, our guide on the Mann-Whitney U vs the t-test covers that choice.
A quick reality check on effort: SPSS licences run roughly $99+ per user per month on the standard subscription, and even after paying you still have to manually exponentiate coefficients into odds ratios and format the APA output yourself. That manual step is exactly where mistakes creep into student theses.
This is where StatRyx earns its place: upload your data, tell it your outcome is binary, and StatRyx picks logistic regression, produces the odds ratios and confidence intervals, and writes the APA 7 sentence — no coding in R, no wrestling with SPSS menus.
**Stop calculating this by hand — run it