Testing Continuous Uniform Models Using Chi-Square Goodness-of-Fit
Apply the chi-square goodness-of-fit test to assess whether a continuous sample is consistent with a fully specified Uniform(a,b) distribution by binning the data into equal-width subintervals, computing expected counts, and comparing the test statistic to a critical value with k-1 degrees of freedom.
Tutorial
Discretizing a Continuous Uniform Distribution
The chi-square goodness-of-fit test compares observed counts to expected counts in categories. To apply it to a continuous distribution, we first need to discretize the data by partitioning the sample space into bins.
To test whether a sample comes from partition the interval into equal-width subintervals
and let denote the number of observations falling into the -th bin.
Under every equal-width subinterval has the same probability:
Therefore the expected count in each bin is
For instance, with observations partitioned into equal-width bins on the expected count in each bin is