# Calculation of Trimmed Mean, SE and confidence interval

The *k*-times trimmed mean is calculated as the mean of the sample after the *k* smallest and *k* largest observations are deleted from the sample.

If the number of observations to be trimmed is specified as a percentage *p*, then *p* is taken as the total percentage of observations to be trimmed and *k*=(*np*/100)/2. If for example the percentage is 10%, then MedCalc trims 5% at the low side and 5% at the high side.

If *k* is not an integer number, it is truncated to the largest smaller integer (rounded down). Note that also SPSS, R and Excel round down, but SAS rounds up.

The *k*-times trimmed mean is calculated as

The Standard Error of the trimmed mean is based on the Winsorized mean and Winsorized sum of squared deviations (Tukey & McLauglin, 1963). The Winsorized mean is calculated as

and the Winsorized sum of squared deviations is calculated as

The Standard Error of the trimmed mean can then be calculated as

The confidence interval for the trimmed mean is defined as

## References

- Tukey JM, McLaughlin DH (1963) Less Vulnerable Confidence and Significance Procedures for Location Based on a Single Sample: Trimming/Winsorization 1. Sankhya A, 25:331–352.