The chi-square goodness of fit test is used in situations where a researcher wants to know whether the observed frequency of an experiment is similar or different from the expected frequencies (Gravetter et al., 2021). For example, if it is expected that a child would prefer all colors equally, then observing a significant preference for one particular color would be a significant difference. This would yield a high chi-square statistic and could be used to measure effect size. All observations used for a chi-square test must be independent observations, meaning that there must be only one observation per participant.
The chi-square test for independence would be used in situations where a researcher wants to know the relationship between two variables, using the frequency of the observations rather than numerical data (Gravetter et al., 2021). For example, a researcher may want to see whether the variable of age group and preference of color are correlated. The expectation would be that age would have no impact on color preference, but the observed frequency of color selection might show a difference in relation to age group. This would be the difference in proportion between the expected frequency and observed frequencies. Both chi-square tests compare the difference between observed frequencies and expected frequencies, and the proportion of that difference and the expected frequency (Gravetter et al., 2021). Each cell in a variable matrix must be computed, and the sum of all of the proportions are added together to compute the chi-square statistic (Gravetter et al., 2021).