An anomaly is a reading or pattern that departs from what is considered normal. It may indicate a real fault, a measurement error or a legitimate rare event. So detection yields "candidates for review", not final verdicts.
The Z-score method measures the distance of a reading from the mean in standard deviations and assumes a distribution close to normal. IQR uses the first and third quartiles and treats as outliers what falls outside a defined range around them; it is less affected by extreme values.
Machine-learning methods such as Isolation Forest isolate anomalous points with random trees and suit more dimensions, but they need tuning of the contamination parameter and an understanding of what their scores mean.
Warning: no method suits all data. Test on data with known anomalies and watch the false-alarm rate. Note: our lab applies statistical methods only and does not claim to train a model.
