Exercise: Evidence for which alternative?#
Two studies have similar estimated effects but different precision. Compare evidence under an explicit point null and a range of normal alternatives.
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")
studies <- data.frame(study=c("Imprecise","Precise"),estimate=c(.10,.10),se=c(.30,.05))
prior_sds <- c(.05,.1,.3,1,3)
# H0: effect=0. H1: effect ~ Normal(0, prior_sd^2); sampling SE is assumed known.
1. Calculate marginal likelihoods#
For each study/prior pair calculate BF10 using normal_mean_bf. Independently verify one value by integrating the normal likelihood times the normal prior and dividing by the point-null likelihood. State which hypotheses and sampling model the ratio compares.
# Tabulate BF10 and verify one case using integrate().
Your explanation and evidence:
2. Map prior sensitivity#
Plot BF10 against prior SD on log axes, marking 1. Explain how a diffuse alternative changes the predictive mass assigned near the observed estimate. Compare the two studies without assuming that greater precision must always favor H0.
# Produce the evidence-sensitivity plot with study labels.
Your explanation and evidence:
3. Distinguish odds from probabilities#
Convert BF10 to posterior probability of H1 under prior model probabilities .5 and .1. Contrast those numbers with two-sided normal-test p-values computed from estimate/SE. Explain why neither calculation authorizes declaring a practically negligible effect without specifying a meaningful effect range.
# Compute posterior odds/probabilities and the separate frequentist tail areas.
Your explanation and evidence:
What to submit#
A Bayes-factor grid, an integration check, and a prior-sensitivity plot. Conclude with a conditional statement naming both hypotheses, the alternative prior, and the known-SE assumption.