Hosmer-Lemeshow Test
Tests the goodness of fit of a logistic regression model using groups of predicted probabilities.
Description
The Hosmer-Lemeshow test divides observations into G groups based on predicted probabilities and compares observed versus expected events and non-events per group using a χ² statistic. Under the null hypothesis of adequate model fit, the test statistic follows a χ² distribution with G − 2 degrees of freedom. A small p-value indicates poor model fit.
Formulas
Assumptions
- Binary response variable (0/1)
- Probabilities are estimated from a fitted logistic model
- Sufficient observations per group (recommended ≥ 5 expected per cell)
- Groups are based on predicted probability quantiles
Limitations
- Sensitive to number of groups G — results can vary significantly
- Low power for small sample sizes
- Groups with few observations may invalidate χ² approximation
- Does not indicate direction of misfit — only whether fit is inadequate
- Not applicable for continuous outcomes
References
- Hosmer, D.W., Lemeshow, S., A Goodness-of-Fit Test for the Multiple Logistic Regression Model, Communications in Statistics, 1980
- Hosmer, D.W., Lemeshow, S., Sturdivant, R.X., Applied Logistic Regression, 3rd Ed., Wiley, Ch. 5.2