Md. Asif Uddin
    I.4.X01

    Three losses, two moderate outliers

    numeric▲△△

    Compute MSE, MAE and Huber1\mathrm{Huber}_1 on the residuals (1.0, −1.5, 0.4, −2.5, 0.1)(1.0,\ -1.5,\ 0.4,\ -2.5,\ 0.1). Say which branch of Huber each residual takes, and what share of each total the two residuals with ∣r∣>1|r| > 1 take together.

    Hint

    Decide the branches before computing anything, as in I.4.B01.

    Solution

    Branches first. ∣1.0∣=1.0≤1|1.0| = 1.0 \le 1 — quadratic, exactly at the join. ∣−1.5∣>1|{-1.5}| > 1 and ∣−2.5∣>1|{-2.5}| > 1 — linear. ∣0.4∣|0.4| and ∣0.1∣|0.1| — quadratic.

    | rr | r2r^2 | ∣r∣|r| | Huber1\mathrm{Huber}_1 | branch | |---|---|---|---|---| | 1.01.0 | 1.00001.0000 | 1.00001.0000 | 0.50000.5000 | quadratic | | −1.5-1.5 | 2.25002.2500 | 1.50001.5000 | 1.00001.0000 | linear | | 0.40.4 | 0.16000.1600 | 0.40000.4000 | 0.08000.0800 | quadratic | | −2.5-2.5 | 6.25006.2500 | 2.50002.5000 | 2.00002.0000 | linear | | 0.10.1 | 0.01000.0100 | 0.10000.1000 | 0.00500.0050 | quadratic | | sum | 9.67009.6700 | 5.50005.5000 | 3.58503.5850 | | | mean | 1.93401.9340 | 1.10001.1000 | 0.71700.7170 | |

    Working the two linear-branch entries. Huber1(−1.5)=(1)(1.5−0.5)=1.0000\mathrm{Huber}_1(-1.5) = (1)(1.5 - 0.5) = 1.0000 and Huber1(−2.5)=(1)(2.5−0.5)=2.0000\mathrm{Huber}_1(-2.5) = (1)(2.5 - 0.5) = 2.0000.

    The shares. The two large residuals contribute 2.25+6.25=8.502.25 + 6.25 = 8.50 of 9.679.67; 1.5+2.5=4.01.5 + 2.5 = 4.0 of 5.55.5; and 1.0+2.0=3.01.0 + 2.0 = 3.0 of 3.5853.585:

    MSE 87.9%,MAE 72.7%,Huber 83.7%\text{MSE } 87.9\%, \qquad \text{MAE } 72.7\%, \qquad \text{Huber } 83.7\%

    What is different from I.4.B01. There, one extreme outlier at r=4r = 4 took 94%94\% of MSE. Here two moderate ones at 1.51.5 and 2.52.5 take 87.9%87.9\%. The concentration is milder because the outliers are milder — MSE’s dominance grows with the square of how unusual the outlier is, so it is a problem of degree, not a switch that flips.

    The residual at exactly ∣r∣=1|r| = 1 is worth noticing. It sits on the join, and both branches give 0.50.5: quadratic 12(1)2=0.5\tfrac12(1)^2 = 0.5, linear (1)(1−0.5)=0.5(1)(1 - 0.5) = 0.5. Continuity holds, as I.4.B01’s sanity check argued it must. An implementation that used << where it should use ≤\le would still give the right answer here — which is exactly why such a bug survives testing.

    Draws on