# Estimating a sample size such that its sum has some probability of not crossing some upper bound

We have a random variable $$X\sim Pois(\lambda)$$ with $$\lambda$$ unknown, and given any random sample $$S=\{s_1, \ldots, s_{|S|}\}$$ generated from $$X$$, we define $$\text{numsum}(S)=\sum_{i=1}^{|S|}s_i$$.

Our problem is then,

Given a natural number $$L$$ and a real number $$p\in[0, 100]$$, we have to find the biggest natural number $$M$$ such that if I generate random numbers from $$X$$ and accumulate them in a set $$S_1$$ until the set has a size $$M$$, and then I construct a new set $$S_2$$ and start accumulating numbers again until $$S_2$$ has a size $$M$$, and I repeat this process indefinitely, generating an infinite amount of sets of size $$M$$, $$\text{numsum}(S_i)\leq L$$ holds for $$p\%$$ of the sets (or better).

To estimate $$M$$, assume we have an initial random sample $$Y=\{y_1, \ldots, y_{|Y|}\}$$ available where $$|Y|$$ is under your control (you can get an initial random sample has large as you need, although the shorter the better).

• Isn't this just a restatement of your previous question at stats.stackexchange.com/questions/563926/…??
– whuber
Feb 13 at 21:31
• @whuber Yes but I thought I had deleted the old one already (and I just did) and that is why I asked again with a much less ambiguous specification of the problem in my opnion. Feb 13 at 21:43
• @whuber besides in my previous question I said "lowest M" which is exactly the opposite that I really want to ask (biggest M), because if I ask for the lowest M, with M = 0 the bound holds 100% of the time. Feb 13 at 21:45
• If $p$ can be as large as $100$, then $100p\%$ can be as large as $10000\%$ Feb 14 at 0:13
• @Glen_b, that is what happens when one rewrite the questions dozens of tomes. Fixed. Feb 14 at 0:15