Logistic Regression (Log-Odds) Calculator
Calculates the log-odds of an event occurring based on a linear combination of predictor variables.
Formula first
Overview
Logistic regression is a statistical model used to predict the probability of a binary outcome (e.g., yes/no, pass/fail) based on one or more predictor variables. Unlike linear regression, it models the log-odds (logit) of the outcome, which ensures that the predicted probabilities fall between 0 and 1. This transformation allows for the use of linear models for classification problems, making it a powerful tool in fields like psychology for predicting categorical behaviors or states.
Symbols
Variables
p = Probability of Event, = Intercept, = Coefficient for x1, = Predictor Variable 1, = Coefficient for xk
Apply it well
When To Use
When to use: Apply this formula when you need to model the relationship between a set of independent variables and a dichotomous (binary) dependent variable. It's used to predict the probability of an event occurring, such as predicting whether a student will pass an exam or if a patient will respond to a treatment.
Why it matters: Logistic regression is fundamental for understanding and predicting categorical outcomes in many scientific and practical domains. In psychology, it helps researchers identify factors influencing decisions, diagnoses, or behavioral choices. Its ability to provide probabilities makes it invaluable for risk assessment, intervention planning, and developing predictive models for real-world applications.
Avoid these traps
Common Mistakes
- Interpreting `β` coefficients directly as changes in probability, rather than changes in log-odds.
- Assuming a linear relationship between predictors and the probability itself, instead of the log-odds.
- Not checking for multicollinearity among predictor variables, which can inflate standard errors of coefficients.
One free problem
Practice Problem
A logistic regression model predicts the likelihood of a student passing an exam. The intercept (β₀) is -2.5. For every hour of study (x₁), the coefficient (β₁) is 0.8. If a student studies for 4 hours, what is the log-odds of them passing the exam?
Solve for:
Hint: Calculate the linear predictor (right side of the equation).
The full worked solution stays in the interactive walkthrough.
References
Sources
- Wikipedia: Logistic regression
- Applied Logistic Regression by David W. Hosmer Jr., Stanley Lemeshow, and Rodney X. Sturdivant
- An Introduction to Statistical Learning by Gareth James, Daniela Witten, Trevor Hastie, Robert Tibshirani
- Applied Logistic Regression (Hosmer, Lemeshow, & Sturdivant)
- Statistical Methods for Psychology (Howell)
- Discovering Statistics Using IBM SPSS Statistics (Field)
- James, G., Witten, D., Hastie, T., & Tibshirani, R. (2013). An Introduction to Statistical Learning with Applications in R. Springer.
- Hosmer, D. W., Lemeshow, S., & Sturdivant, R. X. (2013). Applied Logistic Regression (3rd ed.). Wiley.