Chi-squared
Concepts behind tests of goodness-of-fit and association
- observed counts -the no. of occurrences in each category observed in the sample
- expected counts - the no. of occurrences in each category expected under the null hypothesis
- χ2 - the test statistic represents the sum of the squared (and scaled) differences between observed and expected counts
- degrees of freedom - determines the distribution’s shape and proportions
- i.e. they are the number of values that are free to vary
- goodness of fit test - tests whether a sample of frequency data came from a population with a specific, known distribution
- continuous data - represents some measurement or score on a scale (e.g. reaction time)
- answers question: how much?
- categorical data - represents membership in a particular group or condition (e.g. control vs experimental group)
- answers question: which one?
Interpret and report significance tests of χ2
- ???
χ2 test of association
- two variables → both categorical
- data (in this context) - counts how many observations fall into each combinations of categories
- use Fisher’s exact test (fisher.test()) - work under the assumption that for χ2 expected frequencies are greater than 5
- statistical assumptions - a precondition that must be true for a statistical test to work as expected (if these assumptions are violated/not true, then the test may give inaccurate or misleading estimates or results)
- association is not causation \n \n