User:IssaRice/Chi-squared distribution

From Machinelearning

start at "Consider a binomial random variable Y" on http://www.stat.yale.edu/Courses/1997-98/101/chigf.htm -- I really like the derivation for the binomial case. you can clearly see how dividing by the variance and then doing some manipulations does two things: (1) you get two terms at the end, even though you started with one, which shows that even though there are k terms, the degrees of freedom are k-1; (2) the denominators change to the expected counts, and the variance disappears.