Why the estimand comes first
A robust procedure does not answer a single, universal question called “the difference between groups.” It answers a question about a specified feature of their distributions. For contaminated multivariate data, that distinction matters: a mean contrast can respond strongly to a few extreme observations, while a robust location contrast targets a different feature. The estimand must therefore be stated before fitting a test or interpreting a confidence region.
This tutorial uses the vector of coordinatewise population medians as the group location. This choice is robust to extreme values in each coordinate, but it is coordinate-dependent: changing the coordinate system can change the estimand. It is not a general affine-equivariant multivariate center. That limitation is part of the interpretation, not a reason to leave the target implicit.
Assume the two groups are independent, observations are independent and identically distributed within each group, and \(p\) is fixed as the sample sizes increase. For the usual asymptotic inference below, each marginal distribution should have a unique median \(m_{gj}\), be differentiable with density \(f_{gj}\) positive and continuous at that median, and satisfy the regularity conditions for the sample-quantile expansion. The coordinates within an observation need not be independent: their dependence contributes to the covariance of the estimated vector.
Estimating the contrast and its uncertainty
Let \(\hat\theta_g\) contain the sample median of each coordinate in group \(g\), and set \(\hat\Delta=\hat\theta_B-\hat\theta_A\). For the \(j\)th coordinate, the influence function of the marginal median at \(m_{gj}\) is \(\operatorname{IF}_{gj}(x)=\{1/2-\mathbf{1}(x_j\leq m_{gj})\}/f_{gj}(m_{gj})\). Write \(\Omega_g\) for the covariance matrix of this vector of influence functions. Under the stated regularity conditions, \(\sqrt{n_g}(\hat\theta_g-\theta_g)\) converges in distribution to a mean-zero normal vector with covariance \(\Omega_g\). The off-diagonal entries of \(\Omega_g\) account for dependence among coordinates.
In practice, estimate the contrast covariance either with a suitable robust sandwich estimate or with a bootstrap that resamples observations within each group and recomputes the full vector of medians. Denote the estimated covariance of \(\hat\Delta\) by \(\hat V\). For independent groups, its large-sample form is \(\hat V=\hat\Omega_A/n_A+\hat\Omega_B/n_B\). A bootstrap estimate should preserve each observed vector as a whole; resampling each coordinate separately would destroy the within-observation dependence relevant to joint inference.
Proof. The marginal-quantile asymptotic expansion gives asymptotic normality for each group’s vector of sample medians, with covariance \(\Omega_g/n_g\) to first order. Independence of the groups makes the covariance of their difference the sum of those two covariances. Consequently, under \(H_0\), \(\hat V^{-1/2}\hat\Delta\xrightarrow{d}N_p(0,I_p)\), by consistency of \(\hat V\) and Slutsky’s theorem. The squared Euclidean length of a \(N_p(0,I_p)\) vector has a \(\chi^2_p\) distribution, and \(W=\|\hat V^{-1/2}\hat\Delta\|^2\). This proves the result. \(\square\)
Worked Example: A symmetric contamination model
Worked Example: A symmetric contamination model
Suppose a two-dimensional group has distribution \(0.92N(\mu,I_2)+0.08\delta_{\mu+(12,12)^\mathsf{T}}\), where \(\delta_a\) is a point mass at \(a\). Find its coordinatewise median and explain what the contamination does to the mean.
For either coordinate, values below \(\mu_j+12\) have cumulative probability \(0.92\Phi(x-\mu_j)\), where \(\Phi\) is the standard normal distribution function. The median lies below the contaminating point, so it solves \(0.92\Phi(m_j-\mu_j)=0.5\). Thus \(\Phi(m_j-\mu_j)=0.5/0.92=0.543478\), giving \(m_j-\mu_j=\Phi^{-1}(0.543478)\approx0.109\). The location vector is approximately \(\mu+(0.109,0.109)^\mathsf{T}\).
The mean, by contrast, is \(\mu+0.08(12,12)^\mathsf{T}=\mu+(0.96,0.96)^\mathsf{T}\). The contrast between the two location summaries is substantial: a point mass comprising eight percent of observations shifts the mean by 0.96 units per coordinate, but shifts the marginal median by about 0.109. Neither summary is “the” location without qualification. A comparison based on coordinatewise medians estimates the difference between those medians.
A joint confidence region and bootstrap calibration
Under the same regularity conditions, an asymptotic \(100(1-\alpha)\%\) confidence region for \(\Delta\) is the ellipsoid \((\hat\Delta-\Delta)^\mathsf{T}\hat V^{-1}(\hat\Delta-\Delta)\leq\chi^2_{p,1-\alpha}\), where \(\chi^2_{p,1-\alpha}\) is the \(1-\alpha\) quantile of \(\chi^2_p\). This is a joint region: it accounts for the covariance between coordinates. A collection of separate marginal intervals is not a substitute for it.
With modest samples or visibly nonnormal data, a centered, studentized bootstrap can be used to calibrate the Wald statistic. Resample complete observations separately within each group. In each bootstrap sample, recompute the coordinatewise medians and their covariance estimate. Center the two resampled group estimates so that their location difference is zero, retaining each group’s resampled shape and dependence; this imposes the null without assuming that the two full distributions are identical. Compute the studentized quadratic statistic for each null bootstrap replicate. Its empirical \(1-\alpha\) quantile, denoted \(c^*_{1-\alpha}\), supplies the cutoff. The corresponding confidence region replaces \(\chi^2_{p,1-\alpha}\) with \(c^*_{1-\alpha}\).
This calibration is an asymptotic refinement, not a guarantee of accurate inference for any small or highly contaminated sample. Its justification requires a valid bootstrap for the estimator and studentization under the null. The group samples must remain independent, the estimator must be recomputed in every replicate, and the bootstrap must retain within-vector dependence. The cutoff should be reported with the resampling scheme and number of replicates.
Justification. Let \(F_n^*\) be the conditional bootstrap distribution function of the studentized statistic, and let \(F\) be its continuous limiting null distribution. Bootstrap consistency means that \(F_n^*(t)\) converges in probability to \(F(t)\) at continuity points. If \(c\) is the unique \(1-\alpha\) quantile of \(F\), then for any \(\epsilon>0\), continuity and strict increase at \(c\) give \(F(c-\epsilon)<1-\alpha<F(c+\epsilon)\). The same inequalities hold for \(F_n^*\) with probability tending to one. Therefore its \(1-\alpha\) quantile lies between \(c-\epsilon\) and \(c+\epsilon\) with probability tending to one. Hence \(c^*_{1-\alpha}\xrightarrow{p}c\), giving the stated calibration. \(\square\)
Worked Example: Computing and interpreting the comparison
In an illustrative analysis, group A has \(n_A=48\) and group B has \(n_B=52\). The estimated coordinatewise median vectors are \(\hat\theta_A=(4.1,2.8)^\mathsf{T}\) and \(\hat\theta_B=(5.3,2.1)^\mathsf{T}\). A within-group bootstrap gives the following estimated covariance matrices for the two location estimates:
The estimated contrast and its covariance are \(\hat\Delta=(5.3-4.1,\,2.1-2.8)^\mathsf{T}=(1.2,-0.7)^\mathsf{T}\) and \(\hat V=\hat V_A+\hat V_B=\begin{pmatrix}0.25&0.04\\0.04&0.41\end{pmatrix}\). The determinant is \(0.25(0.41)-0.04^2=0.1009\), so \(\hat V^{-1}=0.1009^{-1}\begin{pmatrix}0.41&-0.04\\-0.04&0.25\end{pmatrix}\). The Wald statistic is \(W=\{0.41(1.2)^2-0.08(1.2)(-0.7)+0.25(-0.7)^2\}/0.1009 =0.7801/0.1009\approx7.73\).
Suppose the null-centered bootstrap uses 9,999 replicates and yields a 95% critical value of 6.30. Since \(7.73>6.30\), the joint confidence region excludes zero and the comparison rejects equal coordinatewise locations at the five-percent level. For orientation, the region’s coordinate projections extend approximately \(1.255=\sqrt{6.30(0.25)}\) and \(1.607=\sqrt{6.30(0.41)}\) from the estimated contrast. The resulting projected intervals are \([-0.055,2.455]\) and \([-2.307,0.907]\). These projections are not independent marginal tests: the decision about the zero vector comes from the joint ellipsoid, which also uses the covariance \(0.04\).
Checking calibration and influential cases
A defensible result checks both whether the uncertainty estimate is plausible and whether a few observations determine the conclusion. First inspect group sizes, missingness, marginal distributions, and robust distances or other diagnostics appropriate to the fitted robust procedure. Compare the bootstrap and asymptotic calibrations when feasible. A large discrepancy is a warning to investigate small-sample behavior, influential observations, or an unstable covariance estimate; it is not permission to select whichever answer is more favorable.
Worked Example: A leave-one-out sensitivity check
Suppose the reported analysis above is accompanied by a leave-one-out check. Removing each observation in turn and recomputing both group median vectors gives a maximum change in \(\hat\Delta\) of \((0.08,0.06)\) in absolute coordinate size. Repeating the calibration after the most influential deletion gives \(W=7.21\) and a bootstrap cutoff of 6.28. The conclusion remains the same because \(7.21>6.28\). This supports the statement that the decision is not driven by any single case under this diagnostic.
Now suppose instead that deleting one case changes the contrast to \((0.4,-0.1)^\mathsf{T}\) and the recalibrated statistic to \(1.3\). The original rejection would then be sensitive to that observation. The appropriate report is not to discard the case automatically, but to investigate its data quality and scientific context and to show the sensitivity. The estimand has not changed; the analysis has revealed fragility in its estimate or uncertainty.
Common pitfall and responsible reporting
Common mistake: “The robust test is significant, so the groups differ in their multivariate means.” This reasoning changes the estimand mid-analysis. A test based on coordinatewise medians concerns the vector of marginal medians, not the mean vector. Likewise, a small bootstrap p-value does not establish that the distributions differ only in location; the groups may differ in shape, spread, or dependence as well.
Report the target, estimate, uncertainty, calibration, and sensitivity together. For example: “The estimated difference in coordinatewise median location (B minus A) was \((1.2,-0.7)^\mathsf{T}\). The null-centered, studentized bootstrap Wald statistic was 7.73, exceeding its 95% cutoff of 6.30; the joint confidence region therefore excluded zero. The conclusion was unchanged in the leave-one-out sensitivity check.” Add the sample sizes, number of bootstrap replicates, and any material data-quality decisions. This wording makes clear both what the analysis supports and what it does not establish.
Check Your Understanding
Use these questions to check whether you can connect the estimand, calculation, and conclusion.
- What is the estimand when each group is summarized by the sample median of each coordinate?
- Why must the bootstrap resample complete multivariate observations rather than each coordinate separately?
- What assumptions allow the two group covariance estimates to be added for the contrast?
- How does a joint confidence ellipsoid differ from reporting separate coordinatewise intervals?
- If deleting one observation changes the test decision, what should be reported and investigated?