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: