The chi-square value is calculated using the following formula: Using this formula, the difference between the observed and expected frequencies is calculated for each experimental outcome category.