Joint dependence of leave-one-out consensus residuals (source code)

= Joint dependence of leave-one-out consensus residuals

The \b[joint dependence of leave-one-out consensus residuals] arises because different laboratories' benchmarks reuse many of the same observations. Excluding each result from its own <leave-one-out interlaboratory consensus> does not make the complete collection of residuals independent.

Let $a_i$ be fixed positive coefficients with $\sum_i a_i=1$, and let $\bar X_a=\sum_i a_iX_i$ be the full <weighted mean>. With at least two observations, every $a_i<1$, and the omitted-result residual is
$$
D_i=X_i-\frac{\sum_{j\ne i}a_jX_j}{1-a_i}
=\frac{X_i-\bar X_a}{1-a_i}.
$$
Write $P_a=I-\mathbf1a^T$ for the <weighted centering matrix>, and $M=\operatorname{diag}(1-a_1,\ldots,1-a_n)$ for a <diagonal matrix>. Then
$$
D=AX,\qquad A=M^{-1}P_a,\qquad
\boxed{\operatorname{Cov}(D)=A\operatorname{Cov}(X)A^T}.
$$
Each row of $A$ sums to zero, so each residual is a <contrast>: a common additive level cancels.

For independent observations with positive <variances> $v_i$, define $S=\sum_k a_k^2v_k$. Expanding <linearity of covariance> gives
$$
\operatorname{Var}(D_i)=\frac{v_i(1-2a_i)+S}{(1-a_i)^2},\qquad
\operatorname{Cov}(D_i,D_j)=\frac{S-a_iv_i-a_jv_j}{(1-a_i)(1-a_j)}\quad(i\ne j).
$$
Equal coefficients and equal <variances> reduce these expressions to
$$
\operatorname{Var}(D_i)=\frac n{n-1}v,\qquad
\operatorname{Cov}(D_i,D_j)=-\frac{n}{(n-1)^2}v.
$$
The familiar <negative covariance> belongs to this model. Arbitrary fixed coefficients can produce a different sign.

An original three-laboratory counterexample sets $v_1=v_2=v_3=1$ and $a=(0.05,0.05,0.90)$. Then $S=0.815$, and
$$
\operatorname{Cov}(D_1,D_2)=\frac{0.815-0.05-0.05}{0.95^2}
=\frac{286}{361}\simeq0.792>0.
$$
This <positive covariance> has a simple cause: both benchmarks are dominated by the third result. Increasing $X_3$ pushes both $D_1$ and $D_2$ downward. The coefficients are stipulated to expose the dependence; with equal observation <variances>, they are not inverse-variance coefficients.

\Image[/leave-one-out-residual-correlation-patterns.png]
{title=Leave-one-out residual correlation depends on both coefficients and observation variances}
{description=Original three-laboratory models with independent unit-variance observations. Equal coefficients give negative pairwise correlation; a dominant third coefficient creates positive correlation between the first two residuals.}

For positive <inverse-variance weights> $a_i=v_i^{-1}/W$, where $W=\sum_kv_k^{-1}$, one has $a_iv_i=1/W$ and $S=1/W$. The off-diagonal expression becomes
$$
\operatorname{Cov}(D_i,D_j)=-\frac1{W(1-a_i)(1-a_j)}<0.
$$
Thus the <leave-one-out inverse-variance weighted consensus> has a special sign pattern under its independent known-variance assumptions.

The coefficients also impose a deterministic constraint,
$$
\sum_i a_i(1-a_i)D_i=0.
$$
Consequently the residual <covariance matrix> is a <singular matrix>. Under the independent-observation model with every $v_i>0$, its <matrix rank> is $n-1$: the <weighted centering matrix> removes the common-level direction and the invertible <diagonal matrix> $M$ preserves that rank. For equal coefficients the constraint is simply $\sum_iD_i=0$.

These dependencies matter when evaluating several laboratories together. Products of single-residual probabilities generally do not describe joint events. A specified joint model or a set of appropriately chosen <contrasts> can represent the available information without treating redundant residuals as independent observations.