Here we provide a concise example to demonstrate how to calculate an informationbased similarity index between two time series. The following figure illustrates a sample heartbeat interval time series from a healthy subject (left panel) showing complex variability. In contrast, a time series from a CHF subject (right panel) shows less variability. Both sample time series contain 1000 interbeat intervals. (See RR Intervals, Heart Rate, and HRV Howto for information on how to obtain additional interbeat interval time series in this format.)

We first map each signal to a binary sequence according to the increment of consecutive interbeat intervals. Suppose we set the m equal to 8, then there will be = 256 different 8bit words. We count the occurrences of each 8bit word, and then sort them by descending frequency. The resulting rankfrequency distribution represents the statistical hierarchy of repetitive patterns of a given time series. For example, the topranked 8bit words correspond to the most frequently occurring patterns in a given heartbeat time series. In contrast, the last ranked word defines the rarest patterns.

The rank order difference between two time series can be visualized by plotting the rank number of each 8bit word in the first time series against that of the second time series. The dashed diagonal line indicates the case where the rank order of words for both time series is identical.
As demonstrated by the above rank order comparison map, the ``distance'' (or dissimilarity) between any two time series can be quantified by measuring the scatter of these points from the diagonal line in the rank order comparison plot. By applying Eq.1 to the rankorder frequency list obtained from the sample time series, we obtained an informationbased similarity index equal to 0.412725. Using the example data files provided with the ibs software, this result may be reproduced by running the command
ibs 8 healthy.txt chf.txt