3

I want to know how many consecutive i.i.d. RVs with: $$X_{i} \sim\text{Uniform}(L, H)$$ can be added until the sum of them is greater than or equal to a certain value ($r$). I'm calculating this for a resource management algorithm and I want my algorithm to be based on accurate statistics and I want to avoid any guesses or meaningless intuitions.

*: I've found a similar question where the question is about summing up uniform RVs with range $[0, 1]$ and for the $r = 1$. But I stress that I'm asking a more general question and if we set $L = 0$, $H = 1$ and $r = 1$, we'd get the same answer as that question.

Rezvan
  • 41

1 Answers1

5

As was noted in my comment, your question about "how many" does not make literal sense, because the time moment (say $\tau$) of the first reaching or exceeding the level $r$ is random, which can in principle take any nonnegative integer value (depending on $L,H,r$).

What we can talk about is the probability distribution of $\tau$. This distribution can be found explicitly only if $L\ge0$, which will be done below.

Indeed, the condition $L\ge0$ ensures that $X_i\ge0$ almost surely for all $i$, and hence $$P(\tau>n)=P(S_n<r)$$ for $n=0,1,\dots$, where $S_n:=X_1+\dots+X_n$, with $S_0:=0$. Introducing now $$Y_i:=\frac{X_i-L}{H-L}$$ and $T_n:=Y_1+\dots+Y_n$, we see that $Y_1,\dots,Y_n$ are independent random variables each uniformly distributed over the interval $[0,1]$, and $S_n=nL+(H-L)T_n$. So, $$P(\tau>n)=P(nL+(H-L)T_n<r)=P(T_n<t),$$ where $$t:=t_n(L,H,r):=\frac{r-nL}{H-L}.$$ To complete our task, let us use the Irwin–Hall formula: $$P(\tau>n)=P(T_n<t)=\frac1{n!}\sum_{k=0}^n (-1)^{k}\binom nk(t-k)_+^{n},$$ where $u_+:=\max(0,u)$.

Iosif Pinelis
  • 116,648