Sequential normal predictive monitoring (source code)

= Sequential normal predictive monitoring
{title2=$u_k=m_k+\Phi^{-1}(1-\alpha)\sqrt{v_k+\sigma^2}$}

For repeated independent $N(\theta,\sigma^2)$ measurements with prior $\theta\sim N(\mu,\tau^2)$ and known scales, <normal-normal conjugacy> gives $v_k=(\tau^{-2}+k\sigma^{-2})^{-1}$ and $m_k=v_k(\mu\tau^{-2}+\sigma^{-2}\sum_{j=1}^k y_j)$. The next measurement has <posterior predictive distribution> $N(m_k,v_k+\sigma^2)$. Its one-sided false-alarm level $\alpha$ yields the displayed limit. Predictive width tends to the irreducible measurement width, while the center adapts to the individual's data. To assess a held-out measurement, fit with earlier measurements only.