# ferdo Lab — Proposed Week 6: INDEPENDENT worked example # Synthetic, illustrative sample; not a UCL worksheet answer. rt_ms <- c(620,610,590,605,615,600,625,595,608,612,598,603) reference_mu <- 600 # arbitrary teaching benchmark, not a research claim result <- t.test(rt_ms, mu=reference_mu, alternative="two.sided") print(result) print(c(estimate_ms=unname(result$estimate), t=unname(result$statistic), p=result$p.value)) print(result$conf.int) stopifnot(result$parameter == length(rt_ms)-1, result$p.value>=0, result$p.value<=1, length(result$conf.int)==2L) # H0: population mean = 600 ms; H1: not equal to 600 ms. # p: probability, assuming H0 and test assumptions, of a test # statistic at least as extreme as observed (two-sided). # 95% CI: procedure has 95% long-run coverage under assumptions. # This is NOT a 95% posterior probability for this specific interval. # Independent/approximately normal observations are assumed; the # twelve fabricated numbers are not a random sample of a real population. cat("WEEK 6 WORKED EXAMPLE PASS\n")