Convert the problem or experiment into a hypothesis. Consider a situation where you flip a coin 200 times. The hypothesis is that the coin will land an equal number of times, 100 in this case, on heads and the same on tails. This is referred to as the null hypothesis.
Conduct the experiment and gather the data. In this case, flip the coin 200 times and record the number of times it lands on heads and the number of times it lands on tails. For this example, use 108 for the number of times heads appeared and 92 as the number of times tails appeared.
Construct a table, or matrix, to display the data in terms of expected and observed results. Make one column for each data category, in this case heads and tails, and an additional column for the total. Make one row for the expected results, another for the observed results and a final row for the total of the two results combined.
Populate the table with the data. For the expected values, insert the number of predicted instances of each category being the result of the test. Insert 100 for the number of times you expected heads to appear and 100 for the number of times you expected tails to appear. For the observed values, enter the number of times the category was the actual result of the test. Use the example values of 108 for heads and 92 for tails. Add the rows and columns together to fill in the values for totals.
Write down the chi-square equation where chi-squared is equal to the observed value minus the expected value squared divided by the expected value [(observed-expected)^2/expected] of the first category added to the same value of each subsequent category. In this case we have two categories, heads and tails. The equation is therefore (observed-expected)^2/expected of heads + (observed-expected)^2/expected of tails.
Substitute the values into the equations and solve. The chi-squared value in the example problem is equal to (observed-expected)^2/expected of heads + (observed-expected)^2/expected of tails or Chi-squared = (100-108)2/100 + (100-92)2/100 = (-8)2/100 + (8)2/100 = 0.64 + 0.64 = 1.28.
Calculate the degrees of freedom to guide analysis. The degrees of freedom are determined by subtracting one from the total number of categories considered in the chi-square test. In this case you have two categories, heads and tails, which makes the degrees of freedom 1.
Consult a chi-square critical values distribution table to determine the validity of the null hypothesis (see Resources). The resulting chi-squared value of 1.64 in the example problem is equal to roughly 0.27 probability (27 percent) at 1 degree of freedom. Most biological applications of the chi-square test use 0.05 probability as the benchmark for statistically significant results. Applying that standard to the example problem, the 0.27 result is greater than 0.05 and proves that the null hypothesis is true and that the coin is not biased toward one side over the other.