3
$\begingroup$

I am studying frame delay variation (FDV) in packet networks. I will explain what that is (or what I interpret it to be) in more detail in a second. I'm assuming the time difference between two packets follows a normal distribution for various reasons. My empirical tests are not matching what my intuition was expecting. Allow me to explain further.

I am taking 10,000 samples from a Gaussian distribution with mean 6 and standard deviation 1. This is my latency. So for example:

5.5, 6.5, 7.0, 5.0

For each sample I use the absolute value of the difference from the previous sample to get my FDV. So for the above it would be:

1.0, 0.5, 2.0

I then average the result. For this simple case I get:

3.5/3 ~ 1.17

When I run this against 10,000 samples I was expecting the FDV to be equal to the standard deviation or the variance (both of which are 1) but instead it appears I am getting 1.25. Does this make sense to anyone? Is there some way to calculate whatever this is for a given normal distribution?

$\endgroup$
5
  • $\begingroup$ what's a "FDV"? $\endgroup$
    – Glen_b
    Commented Feb 6, 2015 at 7:14
  • $\begingroup$ @Glen_b: Probably "frame delay variation", as mentioned above. $\endgroup$ Commented Feb 6, 2015 at 7:25
  • $\begingroup$ Yep, I am trying to calculate the average frame delay variation (FDV) where I am defining FDV as the absolute value of the difference between two samples. $\endgroup$
    – Pace
    Commented Feb 6, 2015 at 7:26
  • $\begingroup$ @AleksandrBlekh, Pace I should have been able to figure that out. Sorry to be thick. $\endgroup$
    – Glen_b
    Commented Feb 6, 2015 at 7:36
  • $\begingroup$ @Glen_b: No big deal, as far as I'm concerned. We're all human... $\endgroup$ Commented Feb 6, 2015 at 7:41

1 Answer 1

2
$\begingroup$

You are calculating $\overline{(|x_t-x_{t-1}|)}$.

But $E(|X_t-X_{t-1}|)$ is not the same thing as $\sigma_X$.

If $X_j\stackrel{iid}{\sim} N(6,1)$ then $X_t-X_{t-1}\sim N(0,2)$.

So $\frac{1}{\sqrt{2}}(X_t-X_{t-1})\sim N(0,1)$, and the absolute value of that has a $\chi_1$ distribution, with expectation $\sqrt\frac{2}{\pi}$.

Consequently $E(|X_t-X_{t-1}|)=\frac{2}{\sqrt{\pi}}\approx 1.128379$

More generally, if $X_t\sim N(\mu,\sigma^2)$ then $E(|X_t-X_{t-1}|)=\frac{2\sigma}{\sqrt{\pi}}\approx 1.128379\sigma$

Check (this is in R):

> mean(abs(diff(rnorm(10000000,6,1))))
[1] 1.128571

Pretty close. (I took a bigger sample than 10000 but that won't hurt anything)

If you're really getting around $1.25$ I think there must be some mistake in your code. [I just ran a couple of dozen sets of size 10000 and none of the averages were bigger than $1.15$, so I'm not sure how you're getting up around $1.25$. Were you maybe getting $1.\color{red}{1}\color{}25$?]

$\endgroup$
1
  • $\begingroup$ You are correct, it was 1.125. Thank you. Also, thanks for the great explanation. $\endgroup$
    – Pace
    Commented Feb 6, 2015 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.