nanog mailing list archives

Re: Calculating Jitter


From: "Marshall Eubanks" <tme () multicasttech com>
Date: Fri, 10 Jun 2005 15:04:10 -0400


On Fri, 10 Jun 2005 10:07:06 -0700
 Eric Frazier <eric () dmcontact com> wrote:

At 09:56 AM 6/10/2005, Fred Baker wrote:

you saw marshall's comment. If you're interested in a moving average, he's 
pretty close.

If I understood your question, though, you simply wanted to quantify the 
jitter in a set of samples. I should think there are two obvious 
definitions there.

A statistician would look, I should think, at the variance of the set. 
Reaching for my CRC book of standard math formulae and tables, it defines 
the variance as the square of the standard deviation of the set, which is 
to say

That is one thing I have never understood, if you can pretty much just look 
at a standard dev and see it is high, and yeah that means your numbers are 
flopping all over the place, then what good is the square of it? Does it 
just make graphing better in some way?


Hello  Eric;

<statistics details>

Because (under some broad assumptions, primarily that the underlying process is stationairy)
estimates of the variance are distributed as a CHI**2 distribution. More
exactly, 

summation( (x[i] - mean(x))^2) / true_variance is distributed as CHI**2(N), 
which means that as i increases, then

summation( (x[i] - mean(x))^2) / true_variance 
is distributed as a normal distribution with a mean of N and a
variance (of the variance estimate) of 2N, so that 

V = summation( (x[i] - mean(x))^2) / N is an efficient estimate of the true variance, with
a sigma (of the variance estimate) of sqrt (2 / N) *  V

(Since you have to estimate the mean from the same data, you can show that the
estimator is less biased if you use 1 / N - 1 rather than 1 / N in actual calculations.)

Basically, if you want to perform the true rites in the Church of Linear Statistics, you
worry about variances and CHI**2 distributions. If (like most of us in the real world) you
are dealing with non-stationary processes and unknown distributions, you can ignore 
this, just calculate the standard deviation, see whether or not things differ
by more than 3 standard deviations, and be done with it.

</statistics details>

Note (from the days when spacecraft had 4 kilobytes of memory) that if you estimate

s[i] = s[i-1] + x[i]
v[i] = v[i-1] + x[i]^2

then the mean estimate at any time is

m[i] = s[i] / i 

the total variance is 

V[i] = v[i] / i

and the standard deviation for i > 1 is 

sigma[i] = sqrt[(v[i] - (i * m[i]^2))/(i-1)]

so, you can do this on the fly without storing all of the data.

Regards
Marshall


Thanks,

Eric 



Current thread: