Solution (source code)

= 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 $0.0005$ and $0.9995$ empirical quantiles. \b[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 $0.0005$ or above $0.9995$. This is two-sided, unlike the earlier one-sided upper limit.