2
$\begingroup$

For an $r \times c$ contingency table, the cells containing observed frequencies, the null hypothesis "the row and column variables are independent" is typically tested by using a $\chi^2$ chisquare test. The quantity

$$X^2 = \sum{\dfrac{(O-E)^2}{E}}$$

is used, with $O$ denoting the observed frequency in a cell and $E$ the expected frequency in a cell under independence; the summation is over all cells in the table. Under the null hypothesis of independence (and the additional condition that all expected frequencies are "large enough") $X^2$ follows a $\chi^2$ distribution with $(r-1) \times (c-1)$ degrees of freedom, which we can use to statistically test the null hypothesis of independence.

Now suppose we would instead of $X^2$ use another quantity, like:

$$Q_1 =\sum(O-E)^2$$

or maybe

$$Q_2 = \sum|O-E|$$

to test the hypothesis of independence. Would that be "wrong" for some reason? Do we not use any of these (or other) alternatives because their distribution under the null hypothesis is unknown, as opposed to the null-distribution of $X^2$? That is to say, if we would generate the distribution of e.g. $Q_1$ under the null hypothesis of independence, could we than also use $Q_1$ to test for independence? Obviously, generating the exact distribution of e.g. $Q_1$ under independence, could be unfeasable for a large nr. of observations in the contingency table, but instead we could then draw a large sample (using e.g. r2dtable in R). However, maybe there exists another important reason why $X^2$ is simply a better or maybe even the best choice for testing independence. If so, then I would like to know that.

For all clarity, I'm not advocating any of the other quantities but would just like to know if theoretically these alternatives could be used too. Thanks for any guidance!

$\endgroup$
3
  • 1
    $\begingroup$ You'll probably be interested in this other thread: math.stackexchange.com/questions/2074029/… $\endgroup$
    – J-J-J
    Commented Jul 13 at 20:13
  • 1
    $\begingroup$ Also, you might be interested in the formula for the statistic used in the G-test: $G = 2\sum_{i} {O_{i} \cdot \ln\left(\frac{O_i}{E_i}\right)}$. You might want to read that too: stats.stackexchange.com/questions/169142/… $\endgroup$
    – J-J-J
    Commented Jul 13 at 20:25
  • $\begingroup$ @J-J-J Thanks for the references, that is all great stuff indeed! $\endgroup$
    – BenP
    Commented Jul 15 at 12:18

1 Answer 1

2
$\begingroup$

This is a great question.

When it comes to Hypothesis Testing, we always assume the Null Hypothesis is true unless we find sufficient evidence to suggest otherwise (kind of an innocent until proven guilty type approach). Therefore, the most important property for a test statistic is its sampling distribution under the null hypothesis. The sampling distribution would allow us to calculate the p-value and ask the question: if the null hypothesis is actually true, what is the probability of observing a test statistic (or sample data) that is as extreme or more extreme than what we observed?

With that said, a desirable test statistic should have the following properties:

  1. Its distribution under the null hypothesis can be well approximated
  2. This approximation is robust under reasonable deviations from core assumptions (independence, sample size, etc)

When it comes to contingency tables, the test statistic you tested is not the only one that is used. There are other statistics (Fisher's exact test, Cochran–Mantel–Haenszel test, etc) where the chi-square approximation is met.

If you wanted to test out the statistics you listed, you'd want to start with simulating the sampling distribution for both and see if anything sticks out. You would also want to approximate the power of the test using your proposed statistics for different sample sizes and comparing it to the ones more commonly used.

Hope this helps!

$\endgroup$
1
  • $\begingroup$ Thanks @Hamzah10 (+1). $\endgroup$
    – BenP
    Commented Jul 15 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.