# Method for calculating percentiles for a set of time series

I have a set of time series for a given quantity (e.g. CPU). The measurements are roughly evenly spaced, but the data points aren't synchronised between sets and some sets have missing measurements. The measurements often exhibit a strong pattern over the course of an hour or day.

I'd like to compare the most recent time series to a set of previous ones for similar periods (e.g. the same hour from previous days), to see if the recent behaviour is similar to past behaviour. I want this for a data visualisation, rather than any measure of correlation.

At the moment I'm taking a time slice from each previous set, combining them and calculating percentiles on each slice. The lack of synchronisation of measurements means that each time slice can have a varying number of measurements.

Is there a better method to achieve this?

Here's some sample data to illustrate the problem, though I need to be able to do this on other sets. The sample includes 9 sets of hourly CPU data for each of two machines. The mapped_date column aligns all series to the same hour. https://dl.dropboxusercontent.com/u/133024/crossvalidated/sample_cpu_data.csv

• Why don't you post your data and perhaps someone can help. – IrishStat Jun 10 '13 at 16:05
• The same (similar) time series will have the same (similar) marginal distributions, but the converse does not follow. What's wrong with a plot of the time series? If you want a numerical comparison, interpolate both to the same grid of equally spaced points: there are choices of grid and of interpolation method, but you can calculate any measures of similarity or dissimilarity you like. – Nick Cox Jun 11 '13 at 7:30