In this Chapter, two tests are considered for SP estimation, both based on contingency tables. Here, Gm,λm is a χ2 distribution with C degrees of freedom and noncentrality parameter λm, that is Gm,λm = χ2C–1,λm.
First, the test for comparing the outcomes of a categorical variable in two populations is studied. Then, the problem of comparing two proportions over a certain number of strata is considered, and the so-called Mantel-Haenszel test is adopted.
Let’s now focus on categorical data with C different categories. Consider the m1 sized sample from the first population (i.e. X1j, j = 1,…, m1) and the m2 sized one from the second population (i.e. X2j, j = 1,…, m2) falling into C different categories. For each group there is a specific probability to fall into the generic category h: P(Xij = h) = πi,h for each j, with h - 1,…, C, i = 1, 2. These probabilities are collected in two vectors πi = (πi,1,…, πi,C), i = 1, 2, whose sums are equal to 1 in each group, i.e. . In other words, the random variables Xij have multinomial distribution tFi = πi, j = 1,…, mi, i = 1, 2.
The null hypothesis is that there is no difference between tF1 and tF2, that is, between the two vectors of probabilities: H0 : π1 = π2, whereas the alternative is that there are some differences: ...