devtools::install_github("kevinwang09/learningtower")ETC5521 Tutorial 4
Computational evidence
🎯 Objectives
Practice conducting using computational tools to assess significance of patterns.
🔧 Preparation
The reading for this week is Wickham et al. (2010) Graphical inference for Infovis.
- Make sure you have this package installed from github:
- Open your RStudio Project for this unit, (the one you created in week 1,
ETC5521). Create a.qmddocument for this weeks activities.
📥 Exercises
Exercise 1
Load the 2022 data, and filter on Australia. Make a quick check on the missng values, and the variables contained in the data. Here is the code to load the data:
stu_2022 <- load_student(year = "2022")
stu_2022_oz <- stu_2022 |>
filter(country == "AUS")Exercise 2
Pick one of the categorical variables, and one of the score variables. Write down the ggplot2 code to make a plot of your chosen variables. Then answer these questions:
- What would be the obvious null hypothesis associated with your plot? That is, write out in English what it would mean to say that there is nothing interesting to see in the plot.
- Then what would be the alternative hypothesis?
- From your null hypothesis, what would be a suitable null data generating mechanism?
- Adjust your code to make a lineup plot, and use yourself to test whether the hull hypothesis can be rejected or not.
Exercise 3
This question is to assess if your choice of plot type might affect the ability to detect the difference. Whatever your conclusion from the activity in the previous question, think about an alternative plot design.
- Make the lineup with the different plot design. (You might use a new position - by not setting a seed and re-generating the lineup - every time you show someone, so if they hear another class mate say a number it won’t influence the next person.)
- Show half of your class mates, the new design, and half the old design.
- Record how many of them chose the data plot.
Exercise 4
The PISA data is actually an example of survey data, which means each observation is associated with a weight (stu_wgt). We need to work out how this should be incorporated in the the analysis.
- Find out what you can about this variable and how it should be used in an analysis, using AI if needed, or reading the documentation.
- How would you calculate a mean, for survey data like this that has a weight variable?
- What plotting methods can accommodate weights?
👌 Finishing up
Make sure you say thanks and good-bye to your tutor. This is a time to also report what you enjoyed and what you found difficult.