# Metric for temporal deviation or variation from mean? Hurst or one-sample K-S test?

I am not sure I am articulating this question properly, and my unfamiliarity with the proper terminology has hindered my ability to research this question.

I am looking for a metric that captures differences in the length (in time) of departures from the mean.

i have a 2 groups of time series data (below are representative examples).  The coefficient of variation for the 2 is very similar. But visually i can tell that the top timeseries has shorter timespans of deviation from the mean. In fact if i measure the length of departures from the middle 50%, the top has a much shorter median than the bottom. I am hoping there is an established metric for this rather than the ad hoc approach i have taken.

I read about the Hurst exponent, and am not clear on whether that is the appropriate metric for what i am looking for. Comparing a one-sided K-S test is something else that i have considered.

Any suggestions or search terms would be helpful.

## migrated from physics.stackexchange.comMay 23 '17 at 10:18

This question came from our site for active researchers, academics and students of physics.

An autoregressive time series is one where each observation depends on the one(s) before that. For instance, an AR(1) series is one where $y_t=\phi y_{t-1}+\epsilon_t$ for an AR parameter $\phi$ and noise $\epsilon_t$. AR models are a special case of ARIMA models.

If your time series tends to stay at a certain level for a longer while, this usually indicates autoregressive behavior. If $y_{t-1}$ is far away from the median and $y_t$ depends on $y_{t-1}$ autoregressively with $\phi>0$, then $y_t$ will likely also be far away from the median, in the same direction as $y_{t-1}$.

Below are a few examples (with R code) for AR(1) series, for different values of the autoregressive parameter $\phi$. Note how the bottom series for $\phi=0.99$ displays markedly strong persistence.

library(forecast)
nn <- 1e3
set.seed(1)

par(mfrow=c(4,1),mai=c(.7,1,0,0),cex=1.5)
for ( ar in c(0.1, 0.3, 0.7, 0.9) ) {
plot(arima.sim(list(ar=ar),nn),ylab="",xlab="",yaxt="n")
mtext(ar,2,line=1,cex=1.5)
} If you want to follow up on this, there are many textbooks on time series out there - just be sure you find one with an emphasis on ARIMA models, not so much exponential smoothing. This chapter in an online textbook may be a good start.

In your particular example, you could fit AR(1) models to each time series and see how different the estimated coefficients are, and even calculate significance if you are so inclined. Or fit more general AR($p$) models, but those are harder to interpret and compare.

• thanks for the helpful reply. Your answer showed me the proper term i'm looking for is Persistence. That alone has been very helpful. The materials you linked document Arima very well alos. Thanks again. – Bobby M May 24 '17 at 15:30