Exercise: Design a test that separates two explanations#
Two accounts agree near the center of a stimulus range but disagree at its extremes. Choose observations that could discriminate between them rather than merely fitting either account after seeing the data.
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")
x <- seq(0, 4, length.out=41)
predict_A <- function(x) 600 - 40*x
predict_B <- function(x) 520 - 80*tanh((x-2)/2)
predictions <- data.frame(x=x, A=predict_A(x), B=predict_B(x))
1. Map agreement and disagreement#
Plot both predicted curves on one set of axes. Calculate their difference across x. Select three stimulus values before generating observations and justify them using separation and feasibility. Explain why sampling only near x=2 would be weak evidence for choosing between these accounts.
# Plot predictions and define chosen_x as three stimulus values.
Your explanation and evidence:
2. Run a discriminating experiment#
Generate 20 observations at each chosen value from account A with independent Normal noise of SD 25 ms. Compare each fixed account using mean squared prediction error. Repeat the entire experiment 200 times and report how often each account wins; retain ties explicitly. Repeat with SD 60 ms.
# Simulate experiments; do not refit the supplied account parameters.
Your explanation and evidence:
3. Turn curves into theories#
Name a possible mechanism behind each curve and an auxiliary assumption needed to test it. State one result that would count against each account and one reason a winning curve might still have the wrong mechanism. Distinguish the simulated choice frequency from evidence about real human behavior.
# Summarize discrimination rates and Monte Carlo uncertainty.
Your explanation and evidence:
What to submit#
A prediction plot with chosen design points, a two-noise-level discrimination table, and a short proposed experiment. Credit depends on a falsifiable contrast and honest treatment of ambiguous outcomes.