The chi-square test is used to determine if experimental data fits the results expected from genetic theory. It involves calculating an expected and observed count for each phenotype, then using a chi-square formula to determine how well the observed fits the expected. The result is compared to critical chi-square values from a table based on degrees of freedom and probability to determine if the null hypothesis should be rejected or failed to be rejected.