Create outlier detection functionality