# Measure of dispersion in a time series

#### cigarprofiler

##### New Member
My introduction

Attached is a sample time series of observations in 8 categories. I want to calculate the dispersion of these observations in both dimensions (time and category). I have approached this problem from a few different angles:
• The most accurate one is an Excel matrix where actual (=unevenly spaced) observation intervals are compared to ideal (=evenly spaced) intervals.

• This approach turned out to be too complex for programming into a web application (though my daughter is trying it in Python at the moment) so I switched to using the variation ratio (VR) and forgetting about the time aspect.

• Recently, I started using the index of qualitative variation (IQV) because the VR is all about variation around the mode which is not really relevant to the problem at hand.
Although the IQV is an improvement to the VR, it still lacks the time dimension. I found an article that I think fits this problem very well but unfortunately, I don’t understand a word he’s saying once he gets into the calculations (I am not used to the notation).

So my question is this: does anyone know of a good measure for dispersion that covers both dimensions (time and category)? Wikipedia mentions more than a hundred of them but I wouldn’t know where to start.

Your help is greatly appreciated. I can offer nothing in return except gratitude and hopefully an interesting problem.

#### noetsi

##### Fortran must die
Why are you doing this? Nothing I have ever seen in time series (and I have read a lot) stresses the importance of dispersion of time series data.

I am not sure what category means here. Mahabolis distance gets at being an outlier in multidimensional space which I assume could cover time and whatever category is.

#### cigarprofiler

##### New Member
Thank you for your comment, noetsi.

I've taken some time to think about why I am doing this. The basic answer is that I am developing a review method for cigars (see my introduction as a new forum member).

What got me thinking about dispersion was looking at a sample time series in a chart:

Chart

When you look at this chart, the dots are not spread out evenly across the chart area. For instance, there is an empty area at the top right corner.

Now, the categories are nominal (flavor groups such as sweet, sour, etc.) so you can't read too much into this chart re. vertical dispersion. Merely changing the order of the categories will give a different spatial configuration.

Still, what I'm looking for (if it exists) is a single measure for an even dispersion of all observations across the chart (maybe think of it as a matrix?). Alternatively, I could combine a "vertical" measure with a "horizontal"one.

The IQV would be a good candidate for the vertical measure but is there an IQV for a time series?

#### noetsi

##### Fortran must die
I am not familiar with IQV and have never seen it raised in the time series literature. The only time variation is generally raised, or that I have seen it raised that is, in time series is in issues of changing variation such as in GARCH or ARCH models. I doubt that would be of interest to you, in honesty all time series I have seen is interval in nature and the data is equally spaced in time (it is rare in my observation for this not to occur in times series analysis).

I have not seen such a measure raised in the way you ask it. You can calculate variance with interval data, the sum of the squared difference from a mean value divided by the sample size of course. I am not sure what the nominal equivalent would be. The link below list two, but I am not sure how well accepted they are, or if there is any well accepted version of variance for nominal data.
https://www.tandfonline.com/doi/abs/10.1080/02664763.2017.1380787

That of course deals with the dispersion of the data not where it is dispersed. One thing to remember is that I work in time series, as a practisioner only not a theorist, in terms of predicting future events.