Test of Homogeneity of Population
Hypothesis Testing 1
Assume that the categories in multinomial experiments are obtained from populations, each with categorical data. When the probability that an element in the -th population falls into the -th category is , denote the proportion vector of the -th population as . The following hypothesis testing using the Pearson chi-square test statistic is called the test of independence.
- : The proportions of elements are the same in all populations:
- : There is at least one population where the proportions of elements are not the same.
Test Statistic
The test statistic uses the Pearson chi-square test statistic. Here, the frequency of data belonging to the -th category in the -th population is called the observed frequency. The product of the sample size of the -th population and the sample size of the -th category multiplied by and divided by the sample size is the expected frequency. This test statistic follows a chi-square distribution where the degrees of freedom are the product of the differences of the number of populations and categories minus , giving .
Explanation
Degrees of Freedom
Considering each marginal probability, the constraints imply that knowing probabilities in each population and in each category determines the rest. Hence, the degrees of freedom should be their product, .
X\Y | y1 | y2 |
---|---|---|
x1 | 0000 | 0000 |
x2 | 0000 | 0000 |
x3 | 0000 | 0000 |
For example, the above contingency table shows data from populations and categories, with degrees of freedom .
Homogeneity 2
In fact, the process of testing for homogeneity is exactly the same as testing for independence and can be seen as an extension of it, except the null and alternative hypotheses and their interpretations differ. In testing independence, there are two categories where row sums and column sums are calculated randomly based on their relation. However, in testing homogeneity, the sample size for each population is fixed, and the vector of proportions determines randomly. The consistency of this vector of proportions regardless of indicates no specific difference by population, ultimately corresponding to independence between population choice and category proportions.
For a simple example, if we want to determine if there is a grade difference based on gender in a university course, we can create a contingency table as follows to conduct a homogeneity test.
Gender | A | B | C | D | F | Total |
---|---|---|---|---|---|---|
Male | 29 | 52 | 26 | 17 | 6 | 130 |
Female | 6 | 75 | 98 | 62 | 9 | 250 |
- : Grade ratios are the same regardless of gender.
- : Grade ratios vary regardless of gender.
As seen, because there are five grade bands from A to F, it is difficult to interpret the difference by fitting it merely into a ratio like 13:25. To confirm if the grade ratios of males and females are statistically the same at the significance level , we compare against , with the degrees of freedom from the chi-square distribution. The actual calculation yields , which greatly exceeds , indicating a grade difference by gender at the significance level .
It is important to note that such statistical interpretation should only conclude ’not the same.’ While it is apparent in this hypothetical example that male grades are better, such remarks like ‘Men perform better here’ arise not from the homogeneity test but from the intuition like ‘Maybe A is the best and F is the worst.’ Even if such information is given, the null and alternative hypotheses in the homogeneity test did not mention superiority, which is consistent with the actual mathematical background.