views:

1818

answers:

3

Let's in fact generalize to a c-confidence interval. Let the common rate parameter be a. (Note that the mean of an exponential distribution with rate parameter a is 1/a.)

First find the cdf of the sum of n such i.i.d. random variables. Use that to compute a c-confidence interval on the sum. Note that the max likelihood estimate (MLE) of the sum is n/a, ie, n times the mean of a single draw.

Background: This comes up in a program I'm writing to make time estimates via random samples. If I take samples according to a Poisson process (ie, the gaps between samples have an exponential distribution) and n of them happen during Activity X, what's a good estimate for the duration of Activity X? I'm pretty sure the answer is the answer to this question.

+1  A: 

Hint: the sum of independent exponential random variables is a gamma random variable.

John D. Cook
+2  A: 

As John D. Cook hinted, the sum of i.i.d. exponential random variables has a gamma distribution.
Here's the cdf of the sum of n exponential random variables with rate parameter a (expressed in Mathematica):

F[x_] := 1 - GammaRegularized[n, a*x];

http://mathworld.wolfram.com/RegularizedGammaFunction.html

The inverse cdf is:

Fi[p_] := InverseGammaRegularized[n, 1 - p]/a;

The c-confidence interval is then

ci[c_, a_, n_] := {Fi[a, n, (1-c)/2], Fi[a, n, c+(1-c)/2]}

Here is some code to empirically verify that the above is correct:

(* Random draw from an exponential distribution given rate param. *)
getGap[a_] := -1/a*Log[RandomReal[]]

betw[x_, {a_, b_}] := Boole[a <= x <= b]

c = .95;
a = 1/.75;
n = 40;
ci0 = ci[c, a, n];
N@Mean@Table[betw[Sum[getGap[a], {n}], ci0], {100000}]

----> 0.94995
dreeves
+1  A: 

I would use a Chernoff bound, from which you can improvise an interval because the expression is pretty generalizable and you can solve such that the bounded range is wrong < 0.05 of the time.

A Chernoff bound is just about the strongest bound you can get on iid variables without knowing too many moment generating functions.

Overflown
Thanks! If you're up for spelling out exactly how to do that for the case of summed exponential RVs, that would be really awesome.
dreeves
Reading more about Chernoff bounds, I'm not convinced this is the right way to get a 95% confidence interval on a random variable.
dreeves