Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Let me descirbe the problem: I have a client-server application that i would like to perform some tests on. Basically one of the test involves measuring the traversal time for a data packet to arrive at its destination. What i am doing right know just sending 10 byte packet (50 of those) and measuring the time it takes to reach its destination.

So say i have a set of 50 values each denoting the traversal time. How would a go about calculating the confidence interval?

Is it as simple as just calculating:

  1. the mean $\bar{x} = \frac{1}{n}\sum\limits_{j=1}^n x_j$

  2. the standard deviation $\sigma = \frac {S}{\sqrt{n}}$, where $S = \sqrt{\frac{1}{n}(\sum\limits_{j=1}^n{x_j^2}-\frac {1}{n}(\sum\limits_{j=1}^nx_j)^2}$

  3. $\bar{x}\pm1.96\times\sigma$, for a 95 % confidence.

I suspect that this might be the wrong approach. In that case, why?

Yours truly

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Your formula for standard deviation is a bit messed up. It should be

$$\sigma = \sqrt{\frac{1}{n-1}\sum\limits_{j=1}^n{\left({x_j - \bar{x}}\right)^2}} $$

Using $n-1$ instead of $n$ makes this an unbiassed estimate of the population variance. With $n=50$, that probably won't matter much in your application. But, other than that, your approach looks fine, to me. If the numbers are extreme, you may want to rearrange the formulae to avoid too much cancellation error.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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