Covariance, correlation, and the limits of uncertainty estimates
Standard errors describe the uncertainty of each coefficient, but they do not explain how the estimates vary together. The covariance matrix adds this information and lets you propagate uncertainty correctly to derived quantities.
GX-TXT Curve Fitter · Example of linear calibration with physical coordinates in seconds and volts.
The example: a linear calibration
We consider eleven synthetic pairs of time and voltage, with time values from 0 to 10 seconds. To represent the data we choose the linear model:
U(t) = a + bt, where a is the intercept in volts and b is the slope in volts per second.
In Curve Fitter, open the c19_original Dataset, select X = time_s (s) and Y = voltage_v (V), and click Add Dataset curve. Set Fit orientation = Y=f(X), Model = linear, Fit points = all, and Output domain = source.
To work in the declared physical coordinates, open Fit → Measurements and uncertainty → Input translation / shift positive… and set the translation mode to off for both the independent and dependent axes. Open Statistical assumptions and intervals…, choose Independent Gaussian — estimated variance, and set the confidence level to 0.95. Confirm and run Preview fit.
Assumptions needed for confidence intervals
To obtain confidence intervals for the coefficients we adopt a model with independent Gaussian errors and common variance, estimated from the residuals. This is an inferential assumption: the mere fact that the menu allows it does not show that a real experiment satisfies it.
For eleven points and two free parameters, the residual degrees of freedom are 11 − 2 = 9. The estimate of residual variance is:
s² = Σ(Uᵢ − Ũᵢ)² / 9 = 0.000255556 V².
The result of the regression is a = 0.250000 V and b = 0.150000 V/s, with RMSE = 0.014460 V and R² = 0.999072.
Standard errors and the covariance matrix
In the Parameters & Statistics tab the standard errors are about 0.009017 V for the intercept and 0.001524 V/s for the slope.
Standard errors are the square roots of the diagonal elements of the covariance matrix. For the parameter vector β = (a, b) and for an ordinary linear regression, the estimated covariance is:
Σβ = s² (XᵀX)−1,
where X is the design matrix, with one column of 1s and one column of times. The off-diagonal entries describe how the estimates vary together.
| Original covariance | intercept | slope |
|---|---|---|
| intercept | 8.13131 × 10 −5 V² | −1.16162 × 10 −5 V²/s |
| slope | −1.16162 × 10 −5 V²/s | 2.32323 × 10 −6 V²/s2 |
The matrix is symmetric. The two diagonal variances have different units because the parameters describe different physical quantities. The off-diagonal covariance is negative: other things being equal, slightly higher slope estimates tend to accompany lower intercept estimates.
From covariance to correlation
To compare the strength of the relationship between two coefficients independently of their units, the correlation coefficient is calculated:
ρ(a,b) = Cov(a,b) / [SE(a) · SE(b)].
Open Results → Measurement and uncertainty results → Parameter correlation…. Curve Fitter shows the matrix of the free parameters.
The negative value also stems from the position of the time origin. Over the range from 0 to 10 s, a small change in the slope can be compensated by changing the intercept so that the line still agrees well with the points. Let us see how this relationship changes when the time origin is moved.
Change only the time origin
We define a new variable, still expressed in seconds:
τ = t − 5 s.
The new coordinate is −5 s for the first observation, 0 s at the center and +5 s for the last. The voltage values are the same, in the same order: **the measurements and the physical model do not change**.
Open the c19_centered dataset, select X = centered_time_s (s), Y = voltage_v (V) and add the curve. Keep the internal translations off, model linear , and the same Gaussian assumption with confidence 0.95. If the old source is visible, you can hide it with Hide, then make the source list active.
The new fit is:
U(τ) = ac + bτ = 1.000000 V + (0.150000 V/s)τ.
The slope is unchanged; the new intercept is 1.000000 V because it represents the predicted voltage at physical time t = 5 s, no longer at t = 0 s.
How standard errors and covariance change
Select Parameters & Statistics for the new fit. The standard error of the slope remains about 0.001524 V/s, but that of the centered intercept drops to about 0.004820 V.
For the two parameters the new matrix is, within numerical precision:
| Covariance with centered axis | intercept | slope |
|---|---|---|
| intercept | 2.32323 × 10 −5 V² | 0 V²/s |
| slope | 0 V²/s | 2.32323 × 10 −6 V²/s2 |
The intercept–slope covariance vanishes because the column of centered times has zero mean and the model includes an intercept, with equal weights for all observations. This is a property of the ordinary regression design; it does not show that two physical phenomena are statistically independent.
Centering did not artificially improve the agreement of the fit: RMSE = 0.014460 V and R² = 0.999072 remained unchanged. Only the definition of the coefficients and the representation of their uncertainty have changed.
Transform the covariance correctly
The two parameters are related by ac = a + 5 s · b and bc = b . This relationship involves both the intercept estimate and its covariance with the slope.
Denoting by T the transformation matrix of the coefficients, the covariance changes according to:
Σcentered = T Σoriginal Tᵀ, with T = [[1, 5 s], [0, 1]].
This transformation lets you obtain the centered matrix from the original one. Transforming only the standard errors, without the off-diagonal terms, would not be enough.
Propagate uncertainty to a predicted voltage
If the quantity of interest is the mean response at time coordinate t, the linear model gives:
Ũ(t) = a + bt.
Its estimation variance is obtained using all the elements of the covariance matrix:
Var[Ũ(t)] = Var(a) + 2t Cov(a,b) + t² Var(b).
The mixed term 2t Cov(a,b) is essential. Ignoring it can give a wrong uncertainty and make the physical result appear to depend arbitrarily on the time origin.
| Physical time | Expected voltage | Standard error of the mean | 95 % CI half-width of the mean |
|---|---|---|---|
| 0 s | 0.2500 V | 0.009017 V | 0.020399 V |
| 2.5 s | 0.6250 V | 0.006144 V | 0.013899 V |
| 5 s | 1.0000 V | 0.004820 V | 0.010904 V |
| 7.5 s | 1.3750 V | 0.006144 V | 0.013899 V |
| 10 s | 1.7500 V | 0.009017 V | 0.020399 V |
The same values are obtained from the centered model and its covariance matrix, replacing t with τ = t − 5 s. The standard error of the mean response is smallest near the mean time of the observations and increases towards the ends of the range.
The half-widths in the table use Student’s t distribution with 9 degrees of freedom. These are pointwise intervals for the estimated mean response, not prediction intervals for a future individual observation: the latter must also include the variability of the new measurement.
Limits and interpretation of uncertainty
The covariance matrices and intervals calculated in the example are conditional on the linear model, the sample used and the assumption of independent Gaussian errors with constant variance. If the errors are correlated or heteroscedastic, or the observations have different uncertainties, an appropriate statistical formulation is needed, with weights or measurement covariance matrices when available.
A covariance matrix of the estimated coefficients does not coincide with a covariance matrix of the observations. The first describes the uncertainty in the parameter estimates; the second describes the error associated with the input data. They can be linked through the estimation model, but they play distinct roles.
Likewise, a correlation between parameters close to zero does not guarantee that the model is correct, that the residuals are independent or that the predictions are accurate. Checking the residuals, the domain of validity and the physical assumptions remains necessary.
The general principle is that estimates, covariances and coordinates must be transformed together. A simple choice of time origin can make the parameters easier to understand, but it does not change the experimental information contained in the Dataset.






