Overview
Association: Chi-squared contingency and correlation
Congratulations on making it to the last week of the stage 1 Data Analysis in R!
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.