- 1 min: identify what one row in
gapminder_2007 represents and the unit of lifeExp.
- 2 min: run
mean() and round() on the selected column. Compare the two mean(practice_readings) calls and inspect ?mean.
- 1 min: add a comment explaining the weighting of the Gapminder mean and the effect of
na.rm = TRUE.
- 1 min: vote by show of hands on whether the Gapminder result is a population-weighted mean; two pairs explain their vote and join the debrief.
Keep: the calls, their results and the two interpretation comments. If access fails: inspect the displayed selection and calculate the fictional non-missing mean on paper.
- Ask the room: “What does this mean describe, and what changed when a missing value was removed?”
- Expected reasoning: the Gapminder calculation is an unweighted mean of the represented countries’ life expectancies in 2007. The fictional vector gives a missing result by default and 11 when its missing value is excluded.
- Common mistake: averaging an entire mixed-type table or calling the result a mean for individual people. Select a meaningful numeric column and state the observation level.
- Transfer: read the arguments and returned value before using an unfamiliar function on research data.