Hosmer-Lemeshow Statistic
The Hosmer-Lemeshow statistic takes an alternative approach to grouping: it groups the predictions of a logistic regression model rather than the model’s predictor variable data, which is the Pearson statistic’s approach. In the implementation found in the Business Analysis Module, model predictions are split into G bins that are filled as evenly as possible, sometimes called “equal mass binning.” Then the statistic is computed as:
where oj is the number of positive observations in group j, πj is the model’s average predicted value in group j, and nj is the size of the group. The Hosmer-Lemeshow statistic follows a chi-squared distribution with G – 2 degrees of freedom. In the Business Analysis Module, the default value for G is 10.