# Goodness of Fit

A Goodness of Fit Test simply examines whether a data set conforms to an expected distribution. We often need to test whether a set of numerical data come from a certain theoretical and continuous distribution, such as those described as Normal, Binomial, Poisson or Circular. For example, a Normal Distribution has most values grouped around a mean, with progressively fewer values as you move away from the mean in either direction. Such a distribution could be expected to reflect the pattern of body weights in a given area with a few really light or really heavy people but most people being of average weight.

statistiXL’s module for goodness of fit testing provides a number of options for testing Binomial, Circular, Normal, Poisson, Uniform, and User-Defined theoretical distributions. Further options with uniform distribution analysis are for nominal categories (categories without any particular order e.g. hair colour), ordinal groups (categories with an inherent order e.g. moisture level categories ordered from moist to dry), and ordinal data on a continuous scale (e.g. frequencies of moths at various heights on a tree). The distribution test for ordinal groups also includes the Kolmogorov-Smirnov goodness of fit test for discrete data, which uses the cumulative frequencies (possible because the categories are ordered and can be meaningfully cumulated to determine differences between expected and observed frequencies) and is more powerful than the traditionally used Chi² test, especially if the sample size is small or expected frequencies are small. The distribution test for ordinal data on a ratio scale also includes the Kolmorogov-Smirnov goodness of fit test.

Results are presented in tabular form, starting with the basic frequency table if this option was selected. Then, the statistical results for the Chi² and log-likelihood test of fit are given, along with the degrees of freedom and P value. For normal distribution tests, the Kolmogorov-Smirnov test statistic, df and P are presented along with measurements of skewness and kurtotis (and P values for sufficiently large data sets).

The help file included with statistiXL provides an introduction to distribution testing, and has a comprehensive set of examples, including Binomial, Circular, Normal and Poisson Distribution tests, three Uniform Distribution tests (for nominal, ordinal groups, and ordinal on a ratio scale data), and a User-Specified Distribution test.