Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2008/iii/paper-44/3/h/solution

Add the new individual's latent mean and log variance to the same population hierarchy. Enter only that individual's first two measurements as observations; use the historical data and these two values to fit the model. The third measurement must be held out, or the predictive check reuses the value it is meant to test. For example, augment the unchanged population hyperpriors with this WinBUGS structure:
new.mean ~ dnorm(mu, invtau2)
new.logvar ~ dnorm(phi, invpsi2)
new.precision <- exp(-new.logvar)
for (k in 1:2) {
    new.Y[k] ~ dnorm(new.mean, new.precision)
}
future.Y ~ dnorm(new.mean, new.precision)
upper.indicator <- step(future.Y - held.out.third)
future.Y is unobserved. Its simulated values give the posterior predictive distribution, including uncertainty in the population parameters and personal variance. A central 99.9% prediction interval uses its and empirical quantiles. Flag the third value if it is outside that interval. Equivalently, estimate its predictive tail probability by the mean of upper.indicator and flag if that mean is below or above . This is two-sided, unlike the earlier one-sided upper limit.

New to topics? Read the docs here!