PQStat PQStat User Guide Polski pqstat.pl

The Chi-square test corrections for small tables

When to use these variants:

When the expected frequencies in a \(2\times 2\) table are small (Cochran's condition is not satisfied), the basic \(\chi^2\) test may give an overly optimistic result. In such a situation it is better to base the conclusion on one of the variants below, more suitable for small frequencies. All of them are calculated automatically together with the basic test.

Assumptions

How to set up the analysis

Statistics \(\to\) NonParametric tests \(\to\) Chi-square, Fisher, OR/RR (or via the Wizard) – all variants appear in one report together with the basic test.

The Chi-square test with the Yates correction for continuity

The \(\chi^2\) test with the Yates correction (ang. Chi-square test with Yates correction), Frank Yates (1934)[179], is more conservative than the \(\chi^2\) test – it rejects the null hypothesis more rarely than the \(\chi^2\) test. The correction for continuity guarantees that the test statistic can take all real-number values, in line with the \(\chi^2\) distribution assumption.

The Fisher test for \(2\times 2\) tables

The Fisher test for \(2\times 2\) tables, also called the Fisher exact test (ang. Fisher exact test), R. A. Fisher (1934[58], 1935[59]), determines the exact probability of the occurrence of a particular distribution of numbers in the table, given a known \(n\) and fixed marginal sums.

The mid-p test

The mid-p test is a correction of the Fisher exact test, recommended by many statisticians (Lancaster 1961[100], Anscombe 1981[9], Pratt and Gibbons 1981[138], Plackett 1984[137], Miettinen 1985[123], Barnard 1989[15], Rothman 2008[143]) as a way of reducing the conservatism of the Fisher exact test – with the mid-p test we reject the null hypothesis sooner than with the exact Fisher test. For large samples, the \(p\) value of the \(\chi^2\) test with the Yates correction and of the Fisher test are similar, while the \(p\) value of the uncorrected \(\chi^2\) test corresponds to the mid-p value.

FOR THOSE INTERESTED

The Chi-square test with the Yates correction – the test statistic is defined by:

\[ \chi^2=\sum_{i=1}^2\sum_{j=1}^2\frac{(|O_{ij}-E_{ij}|-0.5)^2}{E_{ij}}. \]

The Fisher test – given known marginal sums, for various configurations of observed frequencies we calculate the probabilities \(P\):

\[ P=\frac{{O_{11}+O_{21} \choose O_{11}}{O_{12}+O_{22} \choose O_{12}}}{{O_{11}+O_{12}+O_{21}+O_{22} \choose O_{11}+O_{12}}}. \]

The exact significance level \(p\) is the sum of those probabilities that are less than or equal to the analysed probability.

The mid-p test – the one-sided \(p\) value is calculated by transforming the probability value of the Fisher exact test:

\[ p_{I(mid-p)}=p_{I(Fisher)}-0.5\cdot P_{punktu(tabeli\quad zadanej)}, \]

where \(p_{I(mid-p)}\) – one-sided \(p\) value of the mid-p test, \(p_{I(Fisher)}\) – one-sided \(p\) value of the Fisher exact test. The two-sided \(p\) value is defined as twice the smaller of the one-sided probabilities:

\[ p_{II(mid-p)}=2p_{I(mid-p)}. \]