Example Data Table
| Observation | Variable 1 | Variable 2 | Variable 3 | Comment |
|---|---|---|---|---|
| 1 | 12.0 | 20.0 | 31.0 | Regular point |
| 2 | 13.0 | 22.0 | 30.0 | Regular point |
| 3 | 12.5 | 21.0 | 31.5 | Regular point |
| 4 | 14.0 | 23.0 | 32.0 | Regular point |
| 5 | 13.5 | 22.5 | 31.8 | Regular point |
| 6 | 12.8 | 21.7 | 30.9 | Regular point |
| 7 | 40.0 | 65.0 | 95.0 | Intentional outlier |
| 8 | 13.2 | 22.1 | 31.2 | Regular point |
Use the “Load Example Data” button to place similar observations into the calculator instantly.
Formula Used
The calculator follows a resistant workflow instead of relying only on the sample mean and sample covariance.
1) Initial robust center
For each variable, the initial center is the median:
mj = median(x1j, x2j, ..., xnj)
2) Robust scale estimate
The scale for each variable is based on the median absolute deviation:
sj = 1.4826 × median(|xij - mj|)
3) Standardized observation distance
Each row receives a distance using the robust center and scale:
di = √Σ[(xij - mj) / sj]2
4) Huber weight
Observations farther from the robust center receive smaller weights:
wi = min(1, c / di)
5) Robust weighted mean
μ̂ = Σ(wixi) / Σwi
6) Robust covariance matrix
Ŝ = Σ[wi(xi - μ̂)(xi - μ̂)ᵀ] / [Σwi - Σwi2 / Σwi]
This approach reduces the influence of extreme rows while preserving ordinary data structure better than trimming every point equally.
How to Use This Calculator
- Choose whether you want a 2-variable or 3-variable covariance matrix.
- Enter descriptive labels for each variable.
- Adjust the Huber tuning constant if you want weaker or stronger downweighting.
- Type each observation row into the data grid. Use complete rows only.
- Click “Calculate Robust Covariance.”
- Review the robust center, scale, covariance matrix, correlation matrix, and row weights.
- Compare the robust and classical results to understand outlier influence.
- Export the summary as CSV or PDF if you need a report.
Frequently Asked Questions
1) What does a robust covariance matrix measure?
It measures joint variability between variables while reducing the impact of unusual rows. This helps you estimate dependence patterns when a few observations are extreme, contaminated, or not representative of the main sample structure.
2) Why compare robust and classical covariance?
The classical matrix treats every observation equally. The robust version downweights distant points. Comparing both matrices helps you see whether outliers are inflating variance, changing correlations, or distorting the overall multivariate pattern.
3) What does the tuning constant control?
The tuning constant controls how quickly weights shrink for distant rows. Smaller values downweight more aggressively, while larger values behave more like the classical estimator. It is a sensitivity setting for outlier resistance.
4) Why use medians and MAD first?
Medians and MAD are resistant summary statistics. They give a stable starting point even when some values are extreme. That makes the subsequent distance and weight calculation much less vulnerable to distorted initial estimates.
5) What does a low row weight mean?
A low weight means the observation is far from the robust center after scaling. It still contributes to the estimate, but with reduced influence. This is different from deleting the row completely.
6) Can I use only two variables?
Yes. Select two variables to compute a 2×2 robust covariance and correlation matrix. Choose three variables if you want a full 3×3 multivariate structure and a 3D weighted scatter display.
7) How many observations should I enter?
Use at least four complete rows, but more observations usually give more stable results. Robust covariance is especially helpful when your dataset is moderate in size and a few rows may be unusually large or noisy.
8) Does this replace full robust multivariate modeling?
No. It is a practical calculator for resistant covariance estimation and diagnostics. For highly specialized work, you may still want dedicated statistical software for advanced estimators, inference, and high-dimensional robust procedures.