The classic chi-squared statistic for testing goodness-of-fit has long been a
cornerstone of modern statistical practice. The statistic consists of a sum in
which each summand involves multiplying by the inverse of (i.e., dividing by)
the probability associated with the corresponding bin in the distribution being
tested for goodness-of-fit. This inversion typically precipitates rebinning to
uniformize the probabilities associated with the bins, in order to make the
test reasonably powerful. With the now widespread availability of computers,
there is no longer any need for this. The present paper provides efficient
black-box algorithms for calculating the asymptotic confidence levels of a
variant on the classic chi-squared test which omits the problematic inversion.
In some circumstances, it is also feasible to compute the exact confidence
levels via Monte Carlo.