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?
Confidence Interval within min and max values
-
0One 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](http://en.wikipedia.org/wiki/Normal_probability_plot). 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. – 2011-10-08
2 Answers
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.
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.