Calculation of 95% confidence interval for the sum of n iid exponential random variables
Let it actually be generalized to an a c
-versal interval. Let the general speed parameter a
. (Note that the mean of the exponential distribution with the velocity parameter a
is 1/a
.)
First find the cdf sums of n
such iid random variables. Use this to calculate the c
-confidence interval by sum. Note that the maximum likelihood estimate (MLE) of the sum is n/a
, i.e. n
multiplies the average of one draw.
Background: This appears in a program I write to make estimates of time using random samples. If I take samples according to a Poisson process (i.e. the gaps between samples have an exponential distribution) and n
from them occur during action X, what is a good estimate for the duration of action X? I'm sure the answer is the answer to this question.
source to share
As John D. Cook hinted, the sum iid of exponential random variables has a gamma distribution.
Here the cdf of the sum of n exponential random variables with the velocity parameter a (expressed in Mathematica):
F[x_] := 1 - GammaRegularized[n, a*x];
http://mathworld.wolfram.com/RegularizedGammaFunction.html
Reverse cdf:
Fi[p_] := InverseGammaRegularized[n, 1 - p]/a;
Then the c-confidence interval
ci[c_, a_, n_] := {Fi[a, n, (1-c)/2], Fi[a, n, c+(1-c)/2]}
Here's some code to empirically test the above:
(* 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
source to share
I would use a Chernoff anchor , from which you can improvise the spacing, because the expression is quite generalizable and you can solve so that the bounded range is wrong <0.05 times.
The Chernoff constraint is the strongest bound you can get on iid variables without knowing too many torque generation functions.
source to share