Interactive model — experiment with these parameters in µGauss

Scope note: This note fits a statistical model to a published series to show how a kernel represents structure. The forecast extrapolates that model. It is not a projection from the physics, ecology or economics of the series, and the series is used as published, without the corrections a domain analysis would apply.

The yearly level of Lake Huron from 1875 to 1972, in feet, is the Brockwell and Davis series from Rdatasets. µGauss treats a degree-$1$ polynomial trend in either rigid mode, fixed at its GLS estimate, or uncertain mode, propagating line-coefficient uncertainty into forecast bands. The exact same linear uncertainty can be placed directly inside the covariance kernel. Assigning independent Gaussian priors $\beta_0 \sim \mathcal{N}(0, a_0^2)$ and $\beta_1 \sim \mathcal{N}(0, b^2)$ to intercept and slope gives the random line $\beta_0 + \beta_1 (t - c)$ covariance

$$ k(s,t) = a_0^2 + b^2\,(s - c)(t - c) , $$

written Const(a0) + Lin(c, b). Adding it to a Matérn $\frac{1}{2}$ kernel under zero mean (Mat12(l, a) + Const(a0) + Lin(c, b)) recovers Bayesian linear regression with Gaussian priors as in Section 2.7 of Rasmussen and Williams.

Run this in µGauss

Open µGauss with this model pre-loaded to inspect the fit, forecast, and parameter sensitivities, or adjust the kernel and refit:

Matching forecasts under fixed hyperparameters

To isolate how the trend enters prediction, fix the Matérn parameters at the degree-$1$ optimum, $\ell = 4.098$ and $\sigma = 1.134$. Model 1 keeps trend degree $1$ in uncertain mode, while model 2 sets mean zero, pivots the linear kernel at the midpoint $c = 1923.5$, and assigns wide prior scales $a_0 = 1000$, $b = 100$.

YearMean, trendMean, kernelStandard deviation, trendStandard deviation, kernel
$1975$$578.931$$578.931$$1.0499$$1.0499$
$1985$$577.909$$577.909$$1.32739$$1.32739$
$2000$$577.527$$577.527$$1.42271$$1.42271$
$2020$$577.117$$577.117$$1.55008$$1.55008$

All displayed digits agree: across all eight forecast quantities, differences stay below $5.8 \times 10^{-5}$ in mean and $7 \times 10^{-9}$ in standard deviation, a relative gap of $10^{-7}$.

Convergence in the vague-prior limit

Analytically, the uncertain trend mode corresponds to the diffuse prior limit $B \to \infty$ in the augmented covariance $K + H B H^\top$, where $H$ evaluates the basis functions $1$ and $t - c$ and $B = \operatorname{diag}(a_0^2, b^2)$. Raising $(a_0, b)$ confirms $O(a_0^{-2})$ convergence until numerical conditioning intervenes:

$a_0$$b$Largest difference of a meanRelative
$10$$1$$0.582$$1.0 \times 10^{-3}$
$100$$10$$5.83 \times 10^{-3}$$1.0 \times 10^{-5}$
$1000$$100$$5.83 \times 10^{-5}$$1.0 \times 10^{-7}$
$10^4$$10^3$$3.5 \times 10^{-6}$$9.1 \times 10^{-7}$

Multiplying prior standard deviations by $10$ cuts the error by $100$ until $a_0 = 10^4$, where huge diagonal entries erode floating-point precision in $K + H B H^\top$. The closed-form GLS projection used by uncertain mode avoids that ill-conditioning entirely.

Fitting with the trend inside the kernel

When hyperparameters are estimated rather than pinned, the two formulations diverge. Uncertain mode fits $(\ell, \sigma)$ cleanly by profiling out the deterministic trend before propagating line uncertainty into bands, whereas Const(a0) + Lin(c, b) injects the prior directly into the marginal likelihood, analogous to restricted likelihood or REML. Letting $\ell$ and $\sigma$ move freely while keeping line parameters fixed gives

Model$\ell$ in years$\sigma$
Trend of degree $1$, uncertain mode$4.10 \pm 1.36$$1.13 \pm 0.17$
Constant plus linear kernel$5.19 \pm 2.33$$1.26 \pm 0.26$

Integrating over line uncertainty inside the likelihood shifts estimates to longer correlation and slightly higher amplitude with wider standard errors. Their log likelihoods, $-105.2$ against $-122.4$, cannot be compared directly because they evaluate different marginal models.

Related notes: Exponential kernel as an AR(1) process, Held-out coverage of forecast bands by trend degree and mode. Trend estimation modes are detailed in Gaussian process regression with symbolic kernels.