Science, Tech, Math › Math The Chi-Square Statistic Formula and How to Use It Share Flipboard Email Print Math Statistics Formulas Statistics Tutorials Probability & Games Descriptive Statistics Inferential Statistics Applications Of Statistics Math Tutorials Geometry Arithmetic Pre Algebra & Algebra Exponential Decay Functions Worksheets By Grade Resources View More By Courtney Taylor Professor of Mathematics Ph.D., Mathematics, Purdue University M.S., Mathematics, Purdue University B.A., Mathematics, Physics, and Chemistry, Anderson University Courtney K. Taylor, Ph.D., is a professor of mathematics at Anderson University and the author of "An Introduction to Abstract Algebra." our editorial process Courtney Taylor Updated July 11, 2019 The chi-square statistic measures the difference between actual and expected counts in a statistical experiment. These experiments can vary from two-way tables to multinomial experiments. The actual counts are from observations, the expected counts are typically determined from probabilistic or other mathematical models. The Formula for Chi-Square Statistic C.K.Taylor In the above formula, we are looking at n pairs of expected and observed counts. The symbol ek denotes the expected counts, and fk denotes the observed counts. To calculate the statistic, we do the following steps: Calculate the difference between corresponding actual and expected counts.Square the differences from the previous step, similar to the formula for standard deviation.Divide every one of the squared difference by the corresponding expected count.Add together all of the quotients from step #3 in order to give us our chi-square statistic. The result of this process is a nonnegative real number that tells us how much different the actual and expected counts are. If we compute that χ2 = 0, then this indicates that there are no differences between any of our observed and expected counts. On the other hand, if χ2 is a very large number then there is some disagreement between the actual counts and what was expected. An alternate form of the equation for the chi-square statistic uses summation notation in order to write the equation more compactly. This is seen in the second line of the above equation. Calculating the Chi-Square Statistic Formula C.K.Taylor To see how to compute a chi-square statistic using the formula, suppose that we have the following data from an experiment: Expected: 25 Observed: 23Expected: 15 Observed: 20Expected: 4 Observed: 3Expected: 24 Observed: 24Expected: 13 Observed: 10 Next, compute the differences for each of these. Because we will end up squaring these numbers, the negative signs will square away. Due to this fact, the actual and expected amounts may be subtracted from one another in either of the two possible options. We will stay consistent with our formula, and so we will subtract the observed counts from the expected ones: 25 – 23 = 215 – 20 =-54 – 3 = 124 – 24 = 013 – 10 = 3 Now square all of these differences: and divide by the corresponding expected value: 22/25 = 0 .16(-5)2/15 = 1.666712/4 = 0.2502/24 = 032 /13 = 0.5625 Finish by adding the above numbers together: 0.16 + 1.6667 + 0.25 + 0 + 0.5625 = 2.693 Further work involving hypothesis testing would need to be done to determine what significance there is with this value of χ2.