Chi-square goodness-of-fit
The chi-square goodness-of-fit test compares the count of occurrences of multiple factor levels for a single variable (factor) to determine whether the levels are statistically equal. For example, a vendor offers three models of phones – three levels (brands) of the single factor (phone) – to customers, who purchase in total an average of 90 phones per week. We can say the expected frequency is 1/3 – so, 30 phones of each model are sold per week, on average. Pearson’s chi-square test statistic, which is calculated by measuring the observed frequencies against expected frequencies, is the test statistic used for the chi-square goodness-of-fit test. The linear equation for this test statistic is as follows:
χ 2 = ∑ (O i − E i) 2 _ E i , degrees of freedom = k-1
Where O i is the observed frequency, E i, is the expected frequency, and k is the number of factor...