Exercise: Whose average reaction time?#
A laboratory reports the average reaction time of its participants. Does an average over recorded trials answer the same question as an average over people? Work with a small balanced teaching dataset before introducing unequal observation counts.
See the shared submission guidance and rubric. Run from book/exercises; the setup below supplies data, not completed answers.
# Shared simulator and small utility functions; no live service is called.
source("../R/course.R")
d <- simulate_trials(seed=101, n_subjects=24, n_items=20)
# Deliberately retain fewer trials from participant 1.
unequal <- d[!(d$subject == "1" & as.integer(d$item) > 10), ]
head(d)
1. Two denominators, two questions#
Compute the trial-weighted mean and the mean of participant means in d. Write both formulas, including their denominators, and explain their equality in this balanced dataset. Repeat in unequal. Report the number of trials contributed by each participant; explain why unequal counts need not produce a large difference in this particular sample.
# Calculate and label the two averages for each table.
Your explanation and evidence:
2. A missingness thought experiment#
Starting from d, retain only each participant’s ten fastest trials. Compare the resulting mean with the original mean. Explain which observations disappeared and why the retained mean cannot describe all attempted trials. Do not interpret this deliberately selected sample as an intervention that speeds responses.
# Create the selected table without overwriting d; quantify the change in milliseconds.
Your explanation and evidence:
3. Three claims from one table#
Write one descriptive question, one prediction question about a new participant, and one causal question about practice. For each, identify what these data provide and what further design or evidence is needed. No predictive model or causal-effect estimate is required.
# Optional calculations supporting your three claims.
Your explanation and evidence:
What to submit#
A four-row results table (two datasets × two averages), a selection-bias calculation, and three question/evidence pairs. Assessment emphasizes the population represented by each denominator, not advanced modeling.