The Median as a Constant Absolute-Error Predictor
A median of real targets minimizes total absolute error among constant predictions. The minimizer can be nonunique with an even number of observations.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace three observations
For 1, 3, 20, prediction 3 gives absolute errors 2, 0, and 17, total 19. Prediction 8 gives 7, 5, and 12, total 24. See the median.
Compare another criterion
Squared error gives large residuals more influence, so its constant optimum can move toward twenty. A mean baseline supplies that comparison.[1]
Move the prediction and count competing slopes
With targets one, four and twelve, constant four yields absolute error \(3+0+8=11\). Between four and twelve, two distances increase as the prediction increases and one decreases, so the total rises. Moving below four initially reverses that balance. See the mean for squared loss.
c=3 → 2+1+9=12
c=4 → 3+0+8=11
c=5 → 4+1+7=12
Recognize a whole interval of optimal constants
For two distinct values, every point between them gives the same total absolute error. With even sample size, all constants between the middle pair minimize this objective.