For contingency tables I don't understand why the Null Hypothesis is 'independent'.

We calculate Sum(Observed^2 / Expected) - N and compare this with the chi-squared distribution table.

Let's say:

Sum(Observed^2 / Expected) - N = 4

Chi-square value = 5.1

So 4 < 5.1 and we do NOT reject the Null Hypothesis, they are independent.

But if 4 < 5.1, then the difference between all Observed and Expected is smaller than our Critical Value, so surely they are correlated and therefore not independent?


I got confused because I was doing this question:

enter image description here

and in the answer:

enter image description here

they state the Null Hypothesis is "no difference", which read like they are not independent?


1 Answer 1


The values you call "expected" are more precisely the values we'd expect if the rows and columns of the contingency table were independent. (The logic is: if the $i^{\text{th}}$ row has a $\frac{R_i}{N}$ fraction of the values, and the $j^{\text{th}}$ column has a $\frac{C_j}{N}$ fraction of the values, and these are independent, then we expect a $\frac{R_i}{N} \cdot \frac{C_j}{N}$ fraction of the values in the $(i,j)$ cell. That corresponds to an expected count of $\frac{R_i}{N} \cdot \frac{C_j}{N} \cdot N = \frac{R_i \cdot C_j}{N}$.)

So if the "observed" values are close to the "expected" values, that means that the data we actually see is consistent with what we'd expect to see if we have independence. So the null hypothesis is not ruled out.

Why does "no difference" correspond to "independent"? More precisely, "no difference between the two rows" corresponds to "independence between rows and columns".

The null hypothesis says "there is no difference in preference between the two genders". So for example the event "a random viewer is male" and the event "a random viewer prefers Stranded" are independent: knowing that the random viewer is male gives no information about the viewer's preferences.

Side notes:

  1. I'm not sure why it's clear to you that from $\chi^2 = \sum_i \frac{O_i^2}{E_i} - N$ being small, we conclude that $O_i$ (the observed values) are close to $E_i$ (the expected values). It's the right conclusion! But it's easier to see from the equivalent formula $\chi^2 = \sum_i \frac{(O_i - E_i)^2}{E_i}$: if this is small, then every $(O_i - E_i)^2$ must be small.
  2. A correction - when we don't reject the null hypothesis, we don't conclude that the rows and columns are independent. We simply say "this is not sufficient evidence to conclude that they're not independent".
  • $\begingroup$ Thank you. I have updated my question to explain what confused me. I didn't understand the Null Hypothesis in the exam question answer. If you could explain that, it would be incredibly appreciated. $\endgroup$
    – user997112
    Mar 26 at 16:41
  • 1
    $\begingroup$ I've tried my best. Essentially, the independence hypothesis says that gender and show preference are independent - knowing whether a viewer is male or female tells you nothing about which show they like. If this is true, we expect the male row and the female row to be similar. $\endgroup$ Mar 26 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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