Overview
Association: Chi-squared contingency and correlation
Congratulations on making it to the end of the stage 1 Data Analysis in R teaching!
This week you will learn how to test whether there is an association between two categorical variables using the chi-squared contingency test and how to test whether there is an association between two continuous variables using the correlation test.
Learning objectives
The successful student will be able to:
- Explain the principles of correlation and chi-squared contingency tests
- Select, appropriately correlation and chi-squared contingency tests
- Apply and interpret a correlation and chi-squared contingency tests in R
- Appreciate the difference between statistical significance and biological significance
- Summarise and illustrate with appropriate R figures test results scientifically
Instructions
-
- π Read Association
-
- π» Test whether there is an association between the heights of sibling pairs.
- π» Learn about the effect of sample size on correlation
- π» Apply the Spearman rank correlation test to the heights of sibling pairs.
- π» Test whether there is an association between blood type and peptic ulcers.
- π» Repeat iv. using untabulated data.
-
- π» Test whether there the proportion of slug colour morphs is the same in two populations.
- π» Repeat i. using untabulated data.
References
Horst, Allison. 2023. βData Science Illustrations.β https://allisonhorst.com/allison-horst.