Exercise: Find the pattern a mean hides#

A collaborator shows only a grand mean and concludes that participants behave similarly. Use the same trials at three levels of aggregation to examine that claim.

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=107, n_subjects=24, n_items=25)
# A controlled disturbance: participant 1 slows down by 200 ms.
d$rt[d$subject == "1"] <- d$rt[d$subject == "1"] + 200
# Supplied deliberately uninformative display.
barplot(mean(d$rt), names.arg="All trials", ylab="Reaction time (ms)")

1. Diagnose the supplied display#

Write two questions the grand-mean bar cannot answer. Create a distribution or raw-point view of trial RTs and a participant-level view that keeps individual observations visible. Locate the controlled disturbance without removing it. Label what one mark represents in each figure.

# Build raw-trial and participant displays with explicit axis units.

Your explanation and evidence:

2. Compare two ways to aggregate#

Plot participant means and item means separately. Explain which variation each display suppresses, and why the number of plotted marks differs. Identify whether the shifted participant remains visible in each view; explain any dilution instead of asserting every view should expose it equally well.

# Compute and plot participant and item summaries.

Your explanation and evidence:

3. Choose an uncertainty display#

For the mean across participants over these fixed items, bootstrap whole participants 1000 times using their means. Add a percentile interval to the grand mean. Separately display the spread of individual participant means. Explain why these two ranges answer different questions and why this bootstrap does not generalize to new items.

# Calculate the participant bootstrap interval and the descriptive spread.

Your explanation and evidence:

4. Make an analytical figure#

Assemble a final two-panel figure answering “Is the grand mean representative of participants?” Write a caption identifying the unit, disturbance, interval definition, and fixed-item limitation. State one pattern you discovered by plotting, without recasting it as a prespecified test.

# Create the final figure from the existing summaries.

Your explanation and evidence:

What to submit#

The criticized original display, three exploratory views, a participant-bootstrap interval, and a final two-panel figure with a defensible caption. Assessment emphasizes what each visual reveals or hides.