Example: Depression and marital status
If depression level is independent of marital status, we expect the
conditional distributions to be similar regardless of marital status (left
figure).
But widowed/divorced patients seem to have a di↵erent conditional
distribution from single or married patients.
So, we are asking: is this statistically significant?
Applied Stats 27 / 67
Expected cell count
The conditional distribution and of the column given the row:
cell count
P(column|row ) = .
row total
The marginal distribution of the column variable:
column total
P(column) =
overall total
When the column variable and the row variable are independent, then
P(column|row ) = P(column)
Thus the expected cell counts
row total ⇥ column total
expected cell count =
overall total
Applied Stats 28 / 67
Expected cell count for ”Depression and marital status”
Note the expected cell counts need not be integers.
Applied Stats 29 / 67
Test for independence
Applied Stats 30 / 67
Test for independence: back to the example
Applied Stats 31 / 67
Test for independence: back to the example
We compute the Critical Value 2crit (dof , ↵) for the rejection region, where
dof are the degrees of freedom and ↵ is the confidence level.
We have dof = (R 1)(C 1) = (3 1)(3 1) = 4.
We take ↵ = 0.1
We obtain (from the tables or computed) 2 (4, 0.1) = 7.78
crit
Since our test statistic 2 = 6.83 is smaller than 2crit = 7.78, we conclude
that no strong evidence exist to say that the level of depression is
associated with marital status.
Applied Stats 32 / 67