Plotting correlated data
Lukas Koch
TL;DR
The paper addresses the misinterpretation risk when plotting correlated uncertainties using only marginal error bars. It advocates embedding correlation information directly into plots through full correlation matrices, correlation lines between neighboring data points, principal component analysis to highlight dominant covariance directions, and conditional uncertainties to reveal intrinsic variance under fixed others, all with specified formulas such as $C = \sum_i \lambda_i \bm{u}_i \bm{u}_i^T$ and $K = C - s^2 \lambda_1 \bm{u}_1 \bm{u}_1^T$ and $\mathrm{Var}[y_i|y_j] = \sigma_i^2(1-\rho_{ij}^2)$. The proposed methods improve model-data assessment under correlation, provide actionable visualization strategies (including Hinton diagrams for accessibility), and are implemented in the NuStatTools package for practical use. These contributions offer a more faithful representation of uncertainty structure and help identify model deficiencies arising from correlated errors. The work has practical impact for high-stakes data analyses where off-diagonal covariances significantly influence inference and decision-making.
Abstract
A very common task in data visualization is to plot many data points with some measured y-value as a function of fixed x-values. Uncertainties on the y-values are typically presented as vertical error bars that represent either a Frequentist confidence interval or Bayesian credible interval for each data point. Most of the time, these error bars represent a 68\% confidence/credibility level, which leads to the intuition that a model fits the data reasonably well if its prediction lies within the error bars of roughly two thirds of the data points. Unfortunately, this and other intuitions no longer work when the uncertainties of the data points are correlated. If the error bars only show the square root of diagonal elements of some covariance matrix with non-negligible off-diagonal elements, we simply do not have enough information in the plot to judge whether a drawn model line agrees well with the data or not. In this paper we will demonstrate this problem and discuss ways to add more information to the plots to make it easier to judge the agreement between the data and some model prediction in the plot, as well as glean some insight where the model might be deficient. This is done by explicitly showing the contribution of the first principal component of the uncertainties, and by displaying the conditional uncertainties of all data points.
