A medical device performs a method for detecting atrial arrhythmias. A
signal including ventricular cycle length information is sensed in a
patient and used to determine each difference between successive
ventricular cycle lengths occurring during a predetermined time period.
Each succeeding difference is stored as a data point in a histogram, and
a metric of variability of the data points of the histogram is
determined. An atrial arrhythmia is detected in response to the metric
crossing a threshold. The threshold is determined in response to the
number of ventricular cycle lengths occurring during the predetermined
time period.