mad_remove_outliers function

Remove outliers using the MAD method