File Exchange

image thumbnail

Detect outliers in multivaraite datasets

version (9.75 KB) by Anton Semechko
Compute robust estimates of mean and covariance, and flag potential multivariate outliers


Updated 08 May 2019

GitHub view license on GitHub

This submission contains Matlab implementation of an iterative multivariate outlier detection algorithm described in Hadi (1992) [1]. In addition to flagging potential outliers, the main function `DetectMultVarOutliers.m` also outputs robust estimates of the mean and covariance that it computes during execution.

Deviating slightly from Hadi (1992), `DetectMultVarOutliers.m` initializes the sample mean with the geometric median [2] of the dataset, instead of the coordinate-wise median. `GeometricMedian.m` is the function used compute this robust statistic; via the Weiszfeld's algorithm [3]. Note that this auxiliary function can be used on its own in any application that requires robust estimation of central tendency of multivariate data corrupted by sampling errors and/or noise.

For a quick demo on how to use the main function, see source code for `outliers_demo.m` or simply enter `outliers_demo` into Matlab command window.


[1] Hadi, A.S., 1992. Identifying multiple outliers in multivariate data. Journal of the Royal Statistical Society. Series B Methodological), Vol. 54(3), pp. 761-771.
[2] Geometric median:
[3] Weiszfeld, E., 1937. Sur le point par lequel la somme des distances den points donnés est minimum. Tohoku Mathematics Journal, Vol. 43, pp. 355–386.

Cite As

Anton Semechko (2020). Detect outliers in multivaraite datasets (, GitHub. Retrieved .

Comments and Ratings (1)


- cosmetic description correction

- modified submission description

- migrated to GitHub


demo thumbnail

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux