Goodness of fit tests try to see if data fits a certain distribution. The Goodness of fit tests are structured in cells; the observed frequency goes in each cell. The distribution you are trying to match would have a theoretical frequency. The Chi square is summed across all cells.
Use the data values structured into cells and requires a calculated chi-square test statistic. The unknown distribution is tested, the Degrees of Freedoms varies according to the distribution.
GOF Distribution | Degrees of Freedom
Normal | # cells – 3
Poisson | # cells – 2
Binomial | # cells – 2
Uniform | # cells – 1