A simple goodness-of-fit test is proposed for checking distributional assumptions in a model involving independent but not identically distributed random variables. The asymptotic distribution of the test statistic, which is similar to Pearson's χ 2 , is derived. The method is applied to generalized linear model diagnostics, in which case the asymptotic distribution depends on eigenvalues of a nonnegative definite matrix, which often has a closed-form expression. A simulation is carried out to investigate the finite-sample performance of the test. The method is applied to a real problem involving data from an entomological experiment.