A heart monitor is disclosed. The monitor computes ST segment deviations and stores the results in heart rate based histograms. Periodically, the monitor analyzes the histogram data to determine a median value of ST deviation. Subsequently, beats are excluded from the computation of the time series if their ST deviations both varies too far from the long term median value and varies too far from the then current time series value.