Chi-square test:
- A chi-square test, also written as χ2 test, is a statistical hypothesis test that is valid to perform when the test statistic is chi-square distributed under the null hypothesis, specifically Pearson's chi-square test and variants thereof.
- Pearson's chi-square test is used to determine whether there is a statistically significant difference between the expected frequencies and the observed frequencies in one or more categories of a contingency table.
- In the standard applications of this test, the observations are classified into mutually exclusive classes.
- If the null hypothesis (that in the population there is no difference between the classes) is true, the test statistic computed from the observations follows a χ2 frequency distribution.
- The purpose of the test is to evaluate how likely the observed frequencies would be assuming the null hypothesis is true.
- Test statistics that follow a χ2 distribution occur when the observations are independent and normally distributed, which assumptions are often justified under the central limit theorem.
- There are also χ2 tests for testing the null hypothesis of independence of a pair of random variables based on observations of the pairs.
- Chi-square tests often refer to tests for which the distribution of the test statistic approaches the χ2 distribution asymptotically, meaning that the sampling distribution (if the null hypothesis is true) of the test statistic approximates a χ2 distribution more and more closely as sample sizes increase
where:
Oi = an observed count for bin i
Ei = an expected count for bin i, asserted by the null hypothesis.
Important Points
Goodness of fit:
- The goodness of fit of a statistical model describes how well it fits a set of observations.
- Measures of goodness of fit typically summarize the discrepancy between observed values and the values expected under the model in question
Use of Chi-square test:
- The chi-squared distribution has many uses in statistics, including:
- Confidence interval estimation for a population standard deviation of a normal distribution from a sample standard deviation.
- Independence of two criteria of classification of qualitative variables.
- Relationships between categorical variables (contingency tables).
- Sample variance study when the underlying distribution is normal.
- Tests of deviations of differences between expected and observed frequencies (one-way tables).
- The chi-square test (goodness of fit test).