Math for Causal Inference
All simulators

Estimator Race: Bias, Variance & MSE

Mean, median and a shrinkage estimator compete across repeated samples.

Day 8: Estimators: Bias, Variance, MSE & Consistency
00.10.2-5-2.502.557.510estimatedensitytrue μ
Sample meanSample median0.90 × mean
estimatorbiasvarianceMSE
Sample mean0.0483.8473.849
Sample median0.0506.0276.029
0.90 × mean-0.1563.1163.141
Sample mean
Sample median
0.90 × mean
Solid = variance, light = bias². Lowest MSE: 0.90 × mean.

3,000 repeated samples per setting. With normal data the mean wins among unbiased estimators; with heavy tails (t₃) the median can beat it. Shrinkage wins when the truth is near zero.