Term 2 L7: Chi square and Contingency Tables Flashcards
Two types of chi square test:
for goodness of fit;
of independence
What level of data are chi square
The tests are often useful for
nominal or ordinal variables.
Both tests designed to test Hypotehses about:
frequencies (counts).
Goodness of Fit - what is it answering?
whether the deviation of observed results from expected values is large enough for us to reject the null hypothesis?
Is the difference between observed and expected values statistically significant?
The Chi-Square (Ο2) Statistic (goodness-of-fit test)
π
2 = β(πβπΈ)2 / πΈ
O - observed frequencies;
E - expected frequencies;
Ξ£ - sum (to be taken over all cells in the table
Degrees of freedom for the goodness-of-fit test
df = βNumber of cellsβ β 1.
The distribution of the Ο
2 statistic depends onβ¦.
the associated degrees of
freedom (df, denoted by k in the graph above)
Interpreting results of chi square goodness of fit
called a goodness-of-fit test,
because we are testing whether the distribution of a variable (here: accuracy of guesses) fits an expected distribution (under
the null hypothesis).
In this case, we saw that the data do not fit the expectation. Practitioners of Therapeutic Touch performed worse than their
theory would have led to suppose (and also worse than chance)
How do you report the result of chi square statstic?
Ο2 (1) = 4.128
Chi-square test of independence
Analysis of Contingency Tables
Contingency tables are frequently used in the analysis of
categorical variables
what does Chi-square test of independence test?
whether the null hypothesis
that the row variable and the column variable are independent
(i.e. that there is no association between the two variables)
Give an example of a hypothesis for a Chi square test of independence
Does the table
constitute evidence for an effect of βtype of treatmentβ on the likelihood of suicide attempt, (or could we have obtained the numbers in the table by chance, even if there was no effect in the
population)?
Marginals
allow us to work out expected outcomes
and if we have one of the observed values we can caluate all the observed values
Degrees of freedom for Ο2 test of independence
ππ = (π β 1) Γ (π β 1)
What to do with small expected frequencies? for test of independence
SPSS vs Howell what are their minimum values?
Small expected frequencies
The chi-square test can be inaccurate if one or more of the expected values are very small.
One convention is to set a minimum value to 5. This convention is overly cautious.
β’ For a 2Γ2 table, a sample size of n=10 will ensure reasonable accuracy (see Howell 2013, p. 152). This corresponds to an average expected value of 2.5!
β’ For larger tables, all cells should have expected values greater
than 1.