Interactive demo · Introduction to Mathematical Statistics · Chapter 10

Goodness of fit with estimated parameters

When the model's s parameters are estimated from the data, Theorem 10.4.1 compares Pearson's statistic D1 with χ2 on t − 1 − s degrees of freedom instead of t − 1: the fitted model is pulled towards the data, so the discrepancies shrink. That rule is exact (in the large-sample limit) when the estimate is the maximum likelihood estimate computed from the grouped counts. The estimate usually computed, from the raw data (the sample mean, the sample standard deviation), uses information the grouping throws away, fits the counts a little less closely, and gives a statistic that lies between χ2t−1−s and χ2t−1 (Chernoff and Lehmann, 1954). Here you can see all three versions on data simulated from the fitted model of each case study.

Model and classes

Statistic in the histogram

Sample size n (coarse grouping only)

Simulated data sets

Try these

Data are simulated from the model fitted to the book's data (binomial p = 0.2512; Poisson λ = 2.157; normal μ = 39.83, σ = 2.049; for the coarse grouping the standard normal), with the case study's sample size, then grouped. Grouped MLE: the value of the parameters that maximises Σkj ln pj(θ), found by Fisher scoring. Raw-data MLE: the sample mean (and the standard deviation with divisor n) of the ungrouped values. For the binomial the classes are the values themselves, so the two estimates coincide. The Chernoff–Lehmann weights λj are the fractions of Fisher information lost by grouping; the raw-data statistic tends to χ2t−1−s + ΣλjZj2, with mean t − 1 − s + Σλj. Random numbers are seeded, so a preset always shows the same draws.

In the lecture notes