Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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|cite|improve this question
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|cite|improve this answer

Your Answer


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.