Robust meanΒΆ
The computation of robust mean is based on a re-descending Psi type M-estimator, that uses Hampel’s influence function, see [hampel86] and [huber81]:
(1)
where a = 1.7, b = 3.4 and c = 8.5. The function
and its first derivative
is plotted on Figure Hampel’s influence function. (a) influence function ; (b) first derivative .
Hampel’s influence function. (a) influence function
; (b) first derivative 
The starting point for iterations is determined by median as an estimate of location and median of absolute deviations (MAD) for an estimation of scale s.
(2)
The optimum solution is found by means of the Newton-Raphson optimizing algorithm.
In iteration $j$ a new estimation of location
is determined using the following
formula:
(3)
where
is a residual
(4)
If the input vector has normal distribution, the estimation of variance is:
(5)
where n is the number of samples. The term
is Bessel’s correction.
The iterations are stopped when one of the following conditions is satisfied:
- The number of iterations exceed 100 or
- the absolute difference
is less than
, where
is
an square root of variance
computed at each step or - the absolute difference
is less than
.