The chi-square (χ2) test is a nonparametric statistical method primarily used to evaluate frequency data for categorical variables, by examining the differences between observed and expected frequencies for each category. A one-way chi-square test is used to determine whether differences in frequencies across levels of a nominal variable are due to chance (the null hypothesis) or represent a true difference (the alternative hypothesis). The chi-square is calculated by dividing the squared difference between the observed and expected frequency by the expected frequency in each category and summing the results (χ2 = Σ((O − E)2/E)). When two variables are involved, a contingency table is constructed, depicting the observed frequency and the expected frequency in each cell. The chi-square is calculated again by, within each cell, squaring the difference between the observed and expected frequency and dividing by the expected frequency, and then summing each result.