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

I have set of numbers and know it's size, mean, standard deviation, minimum and maximum. When I calculate regular confidence interval for mean I get something like this (-20;50). But the source value can only be positive, so it would look bad on a graph. I'd like to find confidence interval within given minimum and maximum values. It's just max values have random peaks and I want to smooth it with CI. Is there some way to do it?

share|cite|improve this question
There is almost certainly a better way to do what you're doing, but I would want to know more about what you're doing before trying to say what that is. In particular, how do you know that the values can only be positive? Could it be that you're finding a confidence interval appropriate to a sample from a normal distribution? Observations from a normal distribution will not always be positive, so that's not a good way to proceed unless you have a standard deviation that's so small compared to the sizes of the observations that a normal approximation is appropriate. – Michael Hardy Oct 7 '11 at 22:15
Values are pings. They can't be negative. Standard deviation isn't small at all. Basically I need a good way to show statistics of pings on a graph for a period of time. So what's a better way you're thinking about? – Nickname Oct 7 '11 at 22:41
What do you mean by "pings"? (That the standard deviation is large could be deduced from what you told us initially.) – Michael Hardy Oct 7 '11 at 23:21
Ping is the round-trip time for the signal sent from one computer to another. – Nickname Oct 7 '11 at 23:46
One might want to see the data before being sure how to proceed. You might consider whether the logarithms of the times look like a sample from a normal distribution. If so, find a confidence interval by the usual methods you'd use for samples from a normal distribution, then take antilogarithms to get a confidence interval for what you started with. This would be for the median of the population, not for the mean, since lognormal distributions are like that. – Michael Hardy Oct 8 '11 at 0:21

As Michael Hardy noted in comments, the likely problem is that you are trying to model the process with inappropriate distribution. If a confidence interval is built using a distribution supported on positive numbers, it will consist of positive numbers. Given the context of "pings", it is reasonable to try the exponential distribution, which is often used to model the waiting time. Another possibility is log-normal distribution also mentioned by Michael Hardy.

share|cite|improve this answer

Try resampling. Construct, say, 10,000 samples of the same size as what you have (with replacement). Compute the mean for each. Assume you want a 95% confidence interval. Throw out the lowest and highest 250 sample means. The range of your remaining 9500 values is your desired confidence interval.

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.