The UNIVARIATE Procedure

Robust Estimators

A statistical method is robust if it is insensitive to moderate or even large departures from the assumptions that justify the method. PROC UNIVARIATE provides several methods for robust estimation of location and scale. See Example 4.11.

Winsorized Means

The Winsorized mean is a robust estimator of the location that is relatively insensitive to outliers. The k-times Winsorized mean is calculated as

x overbar Subscript w k Baseline equals StartFraction 1 Over n EndFraction left parenthesis left parenthesis k plus 1 right parenthesis x Subscript left parenthesis k plus 1 right parenthesis Baseline plus sigma summation Underscript i equals k plus 2 Overscript n minus k minus 1 Endscripts x Subscript left parenthesis i right parenthesis Baseline plus left parenthesis k plus 1 right parenthesis x Subscript left parenthesis n minus k right parenthesis Baseline right parenthesis

where n is the number of observations and x Subscript left parenthesis i right parenthesis is the ith order statistic when the observations are arranged in increasing order:

x Subscript left parenthesis 1 right parenthesis Baseline less than or equals x Subscript left parenthesis 2 right parenthesis Baseline less than or equals midline horizontal ellipsis less than or equals x Subscript left parenthesis n right parenthesis

The Winsorized mean is computed as the ordinary mean after the k smallest observations are replaced by the left parenthesis k plus 1 right parenthesisst smallest observation and the k largest observations are replaced by the left parenthesis k plus 1 right parenthesisst largest observation.

For data from a symmetric distribution, the Winsorized mean is an unbiased estimate of the population mean. However, the Winsorized mean does not have a normal distribution even if the data are from a normal population.

The Winsorized sum of squared deviations is defined as

s Subscript w k Superscript 2 Baseline equals left parenthesis k plus 1 right parenthesis left parenthesis x Subscript left parenthesis k plus 1 right parenthesis Baseline minus x overbar Subscript w k Baseline right parenthesis squared plus sigma summation Underscript i equals k plus 2 Overscript n minus k minus 1 Endscripts left parenthesis x Subscript left parenthesis i right parenthesis Baseline minus x overbar Subscript w k Baseline right parenthesis squared plus left parenthesis k plus 1 right parenthesis left parenthesis x Subscript left parenthesis n minus k right parenthesis Baseline minus x overbar Subscript w k Baseline right parenthesis squared

The Winsorized t statistic is given by

t Subscript w k Baseline equals StartFraction x overbar Subscript w k Baseline minus mu 0 Over normal upper S normal upper E left parenthesis x overbar Subscript w k Baseline right parenthesis EndFraction

where mu 0 denotes the location under the null hypothesis and the standard error of the Winsorized mean is

normal upper S normal upper E left parenthesis x overbar Subscript w k Baseline right parenthesis equals StartFraction n minus 1 Over n minus 2 k minus 1 EndFraction times StartFraction s Subscript w k Baseline Over StartRoot n left parenthesis n minus 1 right parenthesis EndRoot EndFraction

When the data are from a symmetric distribution, the distribution of t Subscript w k is approximated by a Student’s t distribution with n minus 2 k minus 1 degrees of freedom (Tukey and McLaughlin 1963; Dixon and Tukey 1968).

The Winsorized 100 left parenthesis 1 minus StartFraction alpha Over 2 EndFraction right parenthesis percent sign confidence interval for the location parameter has upper and lower limits

x overbar Subscript w k Baseline plus or minus t Subscript 1 minus StartFraction alpha Over 2 EndFraction semicolon n minus 2 k minus 1 Baseline normal upper S normal upper E left parenthesis x overbar Subscript w k Baseline right parenthesis

where t Subscript 1 minus StartFraction alpha Over 2 EndFraction semicolon n minus 2 k minus 1 is the left parenthesis 100 left parenthesis 1 minus StartFraction alpha Over 2 EndFraction right parenthesis right parenthesisth percentile of the Student’s t distribution with n minus 2 k minus 1 degrees of freedom.

Trimmed Means

Like the Winsorized mean, the trimmed mean is a robust estimator of the location that is relatively insensitive to outliers. The k-times trimmed mean is calculated as

x overbar Subscript t k Baseline equals StartFraction 1 Over n minus 2 k EndFraction sigma summation Underscript i equals k plus 1 Overscript n minus k Endscripts x Subscript left parenthesis i right parenthesis

where n is the number of observations and x Subscript left parenthesis i right parenthesis is the ith order statistic when the observations are arranged in increasing order:

x Subscript left parenthesis 1 right parenthesis Baseline less than or equals x Subscript left parenthesis 2 right parenthesis Baseline less than or equals midline horizontal ellipsis less than or equals x Subscript left parenthesis n right parenthesis

The trimmed mean is computed after the k smallest and k largest observations are deleted from the sample. In other words, the observations are trimmed at each end.

For a symmetric distribution, the symmetrically trimmed mean is an unbiased estimate of the population mean. However, the trimmed mean does not have a normal distribution even if the data are from a normal population.

A robust estimate of the variance of the trimmed mean t Subscript t k can be based on the Winsorized sum of squared deviations s Subscript w k Superscript 2, which is defined in the section Winsorized Means; see Tukey and McLaughlin (1963). This can be used to compute a trimmed t test which is based on the test statistic

t Subscript t k Baseline equals StartFraction left parenthesis x overbar Subscript t k Baseline minus mu 0 right parenthesis Over normal upper S normal upper E left parenthesis x overbar Subscript t k Baseline right parenthesis EndFraction

where the standard error of the trimmed mean is

normal upper S normal upper E left parenthesis x overbar Subscript t k Baseline right parenthesis equals StartFraction s Subscript w k Baseline Over StartRoot left parenthesis n minus 2 k right parenthesis left parenthesis n minus 2 k minus 1 right parenthesis EndRoot EndFraction

When the data are from a symmetric distribution, the distribution of t Subscript t k is approximated by a Student’s t distribution with n minus 2 k minus 1 degrees of freedom (Tukey and McLaughlin 1963; Dixon and Tukey 1968).

The "trimmed" 100 left parenthesis 1 minus alpha right parenthesis percent sign confidence interval for the location parameter has upper and lower limits

x overbar Subscript t k Baseline plus or minus t Subscript 1 minus StartFraction alpha Over 2 EndFraction semicolon n minus 2 k minus 1 Baseline normal upper S normal upper E left parenthesis x overbar Subscript t k Baseline right parenthesis

where t Subscript 1 minus StartFraction alpha Over 2 EndFraction semicolon n minus 2 k minus 1 is the left parenthesis 100 left parenthesis 1 minus StartFraction alpha Over 2 EndFraction right parenthesis right parenthesisth percentile of the Student’s t distribution with n minus 2 k minus 1 degrees of freedom.

Robust Estimates of Scale

The sample standard deviation, which is the most commonly used estimator of scale, is sensitive to outliers. Robust scale estimators, on the other hand, remain bounded when a single data value is replaced by an arbitrarily large or small value. The UNIVARIATE procedure computes several robust measures of scale, including the interquartile range, Gini’s mean difference G, the median absolute deviation about the median (MAD), upper Q Subscript n, and upper S Subscript n. In addition, the procedure computes estimates of the normal standard deviation sigma derived from each of these measures.

The interquartile range (IQR) is simply the difference between the upper and lower quartiles. For a normal population, sigma can be estimated as IQR/1.34898.

Gini’s mean difference is computed as

upper G equals StartFraction 1 Over StartBinomialOrMatrix n Choose 2 EndBinomialOrMatrix EndFraction sigma summation Underscript i less than j Endscripts StartAbsoluteValue x Subscript i Baseline minus x Subscript j Baseline EndAbsoluteValue

For a normal population, the expected value of G is 2 sigma divided by StartRoot pi EndRoot. Thus upper G StartRoot pi EndRoot divided by 2 is a robust estimator of sigma when the data are from a normal sample. For the normal distribution, this estimator has high efficiency relative to the usual sample standard deviation, and it is also less sensitive to the presence of outliers.

A very robust scale estimator is the MAD, the median absolute deviation from the median (Hampel 1974), which is computed as

normal upper M normal upper A normal upper D equals normal m normal e normal d Subscript i Baseline left parenthesis StartAbsoluteValue x Subscript i Baseline minus normal m normal e normal d Subscript j Baseline left parenthesis x Subscript j Baseline right parenthesis EndAbsoluteValue right parenthesis

where the inner median, normal m normal e normal d Subscript j Baseline left parenthesis x Subscript j Baseline right parenthesis, is the median of the n observations, and the outer median (taken over i) is the median of the n absolute values of the deviations about the inner median. For a normal population, 1.4826 times normal upper M normal upper A normal upper D is an estimator of sigma.

The MAD has low efficiency for normal distributions, and it might not always be appropriate for symmetric distributions. Rousseeuw and Croux (1993) proposed two statistics as alternatives to the MAD. The first is

upper S Subscript n Baseline equals 1.1926 times normal m normal e normal d Subscript i Baseline left parenthesis normal m normal e normal d Subscript j Baseline left parenthesis StartAbsoluteValue x Subscript i Baseline minus x Subscript j Baseline EndAbsoluteValue right parenthesis right parenthesis

where the outer median (taken over i) is the median of the n medians of StartAbsoluteValue x Subscript i Baseline minus x Subscript j Baseline EndAbsoluteValue, j equals 1 comma 2 comma ellipsis comma n. To reduce small-sample bias, c Subscript s n Baseline upper S Subscript n is used to estimate sigma, where c Subscript s n is a correction factor; see Croux and Rousseeuw (1992).

The second statistic proposed by Rousseeuw and Croux (1993) is

upper Q Subscript n Baseline equals 2.2219 left brace StartAbsoluteValue x Subscript i Baseline minus x Subscript j Baseline EndAbsoluteValue semicolon i less than j right brace Subscript left parenthesis k right parenthesis

where

k equals StartBinomialOrMatrix left bracket StartFraction n Over 2 EndFraction right bracket plus 1 Choose 2 EndBinomialOrMatrix

In other words, upper Q Subscript n is 2.2219 times the kth order statistic of the StartBinomialOrMatrix n Choose 2 EndBinomialOrMatrix distances between the data points. The bias-corrected statistic c Subscript q n Baseline upper Q Subscript n is used to estimate sigma, where c Subscript q n is a correction factor; see Croux and Rousseeuw (1992).

Last updated: April 16, 2025