There are few tests for outliers. See the article 'Algorithm 974: The OutlierLib - A MATLAB library for outliers' detection' , ACM Transactions on Mathematical Software, 43(4):38, March 2017 (https://www.researchgate.net/publication/315519154_Algorithm_974_The_OutlierLib_-_A_MATLAB_library_for_outliers%27_detection).