Testing discrete data for periodicity
well, there is always autocorrelation $$ R_x(\tau)=\sum x[n] x[n+\tau] $$ or AMDF $$ Q_x(\tau) = \sum |x[n] - x[n+\tau]| $$ or ASDF $$Q_x(\tau) = \sum (x[n] - x[n+\tau])^2 $$  with the latter there is the relationship between autocorrelation and ASDF $$ R_x(\tau)=R_x(0) - \frac12 Q_x(\tau) $$.  a measure of periodicity might be $\frac{R_x(P)}{R_x(0)} $ where $R_x(P)&gt;R_x(\tau)$ for all $\tau\ne 0$.  sometimes we call "$P$" the "period".  if $\frac{R_x(P)}{R_x(0)} \approx 1 $ we say it's pretty periodic.