• The chi-square goodness-of-fit test is used to compare the sample distribution of a categorical variable from a population with a hypothesized distribution. The data for n observations with k possible outcomes are summarized as observed counts, n1, n2,…, nk, in k cells. The null hypothesis specifies probabilities p1, p2,…, pk for the possible outcomes.