compute anomaly