| Fundamentals of Statistics contains material of various lectures and courses of H. Lohninger on statistics, data analysis and chemometrics......click here for more. |

Table of Contents Statistical Tests Comparing Distributions Chi-Square Test |
|||
| See also: survey on statistical tests, Kolmogorov-Smirnov test, tests for normality, distribution calculator | |||
Chi-Square Test
The hypothesis tests we have used so far assumed that the data is normally distributed. But these assumptions are not always true. So we need a method to check whether our assumption about the distribution of the data is correct. The easiest way to compare distributions is to compare them visually.
We overlay a histogram of the data with the theoretical distribution with
which it is to be compared. Of course this approach lacks statistical justification.
A sound method to compare empirical and known (parametric) distribution
is the One practical problem is that the evaluation of parametric distribution functions results in probabilities instead of frequencies. In order to compare the empirical and theoretical distribution we have to to estimate the expected frequencies by multiplying the theoretical probabilities by the number of samples.
The probability that the variable falls into a bin [ai,ai+1] is the difference of the probabilities of x being less than the bin boundaries ai and ai+1, respectively: Prob(ai < x < ai+1) = Prob(x < ai+1) - Prob(x < ai) For each bin, the squared difference between the frequencies of the
empirical and the theoretical distribution are calculated. The squared
differences are divided by the expected frequencies. The sum of these relative
or weighted squared differences is the
|
|||