Chi Square distribution is a family of curves based on the degrees of freedom. The Greek alphabet $\chi$ (read as chi) is used to denote a Chi Square variable whose values are found using the formula $\chi^{2}$ = $(n-1)$$\frac{s^{2}}{\sigma ^{2}}$ by taking random samples of size $n$ from a normally distributed population with variance σ2.
The shape of the curve is determined by the value of $n-1$ which is known as the degrees of freedom for the distribution.Chi Square Test
The Chi Square distribution has the following properties:

  1. It is a continuous distribution.
  2. It is not symmetrical but skewed to the right.
  3. The shape of the distribution depends on the degrees of freedom df = n -1 where n is the sample size.
  4. The value of $\chi^{2}$ random variable is always positive.
  5. There are infinitely many distributions, each being uniquely defined by its degrees of freedom. As the value of $n$ increases the shape of the distribution becomes more and more symmetrical, meaning the distribution approaches normalcy.

Let us see how Chi Square distributions are used in Hypothesis testing.

The fact the $\chi^{2}$ random variables are related to the sample and population variances ($\chi^{2}$ = $(n-1)$$\frac{s^{2}}{\sigma ^{2}}$) makes it possible to test the claims on a single variance using χ2 distributions. The assumptions made for Chi Square Test on single variance are,
  1. The sample is randomly selected from the population.
  2. The population for the variable under study is normally distributed.
  3. The observations are independent of one another.

For the above test, the test statistic is calculated using the formula, $\chi^{2}$ = $(n-1)$$\frac{s^{2}}{\sigma ^{2}}$. The critical values are suitable found from $\chi^{2}$ tables, using the degrees of freedom and the type of the test left, right tailed or two-tailed.

Chi square test is also used for tests related to frequency distributions or data displayed in a contingency table. The three common types of tests are

  1. Test for Goodness of fit:
  2. Test for independence
  3. Test for homogeneity of Proportions.

Test for Goodness of fit:
This test is conducted to test whether a frequency distribution follows a specific pattern or not. The null hypothesis is made with the existence of a specific pattern. The null hypothesis and hence the goodness of fit of the data are rejected when the calculated test value is greater than the critical value found from the $\chi^{2}$ table, that is the value $\chi _{\alpha ,n-1}^{2}$. The test statistic is calculated using the formula
$\chi^{2}$ = $(n-1)$$\frac{s^{2}}{\sigma ^{2}}$, where obs and exp represent the observed and expected frequencies.

The assumptions made for Chi Square Goodness of fit test are

  1. The data are obtained from a random sample.
  2. The expected frequency of each category must be 5 or more.

Test for Independence:
The Chi Square test for independence is used to test the independence of two variables. The null hypothesis for this test assumes independence of the two variables. The null hypothesis is rejected when the calculated test statistic is greater than the $\chi^{2}$ critical value found from the table against the degrees of freedom and significance level α. The test statistic is calculated using the same formula given under the Goodness of fit test.

Test for Homogeneity of Proportions:
This Chi Square test also makes use of a contingency table. The situation here is that the samples are selected from different populations and it is to be determined whether the common characteristics among the different populations defined as a proportion are same for all populations under study. While the null hypothesis assumes the equality of proportions, the alternate hypothesis states that at least one proportion is different from others. The null hypothesis is rejected when the calculated test statistic is greater than the critical value $\chi _{\alpha ,n-1}^{2}$ found from the table. The test statistic is calculated in a manner similar to the method used to find the test statistic for Chi Square test for independence.

In addition to the above tests, Chi Square distributions are also used to test the normality of a variable.