# What is a chi-square distribution?

I am studying statistics for a political science course (the second semester of statistics under that department) and I have no idea what this formula even means:

$\frac{(n-1)s^2}{\sigma^2}$ and this language being used "If a simple random sample of size n is obtained from a normally distributed population with mean $\mu$ and standard deviation $\sigma$ then: $\chi^2 = \frac{(n-1)s^2}{\sigma^2}$ has a chi-square distribution with $n-1$ degrees of freedom."

What does degrees even mean in this context? My professor said something about how when we have 2 variables we have 1 degree of freedom, but I don't know what he is talking about and this whole chi-square distribution makes no sense to me.

The textbook does not seem very helpful in explaining to me what this distribution is for, where does it come from (?), why we use it and the language is not transparent for a non-statistics/math major.

## 1 Answer

Your professor seems to be referring to the distribution of the sample variance of a normal variable which is defined here:

http://en.wikipedia.org/wiki/Variance#Distribution_of_the_sample_variance

In this case the distribution is used to calculate how likely it is that your population sample of size N from a population with standard deviation $\sigma$ had the sample variance $s^2$.

It's probably more common to encounter Chi-square distributions when you work with categorical data and ask questions about their distributions.

Example: Say every person in a population had one of three preferences A, B and C (political party, favourite color, whatever). Your null hypothesis is that A, B and C have some sort of distribution amongst the population, say you think that 1/6 choose A, 1/3 choose B and 1/2 choose C.

Now you draw a random sample of size N and evaluate how many A's, B's and C's you have. The Chi-square test (using chi-square distribution) will then give you the statistic on how likely it is that your null hypothesis is true. In this case, the Chi-square test would have 2 degrees of freedom. While we are testing 3 distinct ratios in our population, only two of those are "free" since the third is determined by the values of the first two, hence the notion that the Chi-square test has $n-1$ degrees of freedom.