# Contradictory behaviour on sums of poisson variables

Trying to solve this problem of mine (you don't actually need to read the linked problem, the problem is rephrased below with a different assumption):

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

I started with the assumption that the mean $$\lambda$$ is known, to see how far I can get, but I got a result whose semantics are confusing me. Such confusing semantics is the reason of doing a separate question.

Rephrasing the problem under such assumption of known $$\lambda$$:

Given a natural number $$L$$ and a real number $$p\in[0, 1]$$, find the biggest natural number $$n$$ such as, given $$n$$ random variables $$X_1, \ldots, X_n$$, where each $$X_i\sim \mathcal{P}(\lambda)$$ and with $$\lambda\gt 0$$, $$\mathbb{P}\biggl[\sum_{i=1}^nX_i\leq L\biggr] = p$$

Knowing that the sum of poisson variables is a poisson variable whose mean is the sum of means, and a poisson variable can be approximated by a normal distribution when its mean is big (which in my case is):

$$\sum_{i=1}^nX_i\sim \mathcal{P}(n\lambda)\approx \mathcal{N}(n\lambda, n\lambda)$$

Normalizing:

$$\mathbb{P}\biggl[\frac{\sum_{i=1}^nX_i-n\lambda}{\sqrt{n\lambda}}\leq \frac{L-n\lambda}{\sqrt{n\lambda}}\biggr] = \mathbb{P}\biggl[Z\leq \frac{L-n\lambda}{\sqrt{n\lambda}}\biggr]=p$$

Now I find the constant $$c$$ such that $$\mathbb{P}[Z\leq c]=p$$, name $$\alpha^2=n\lambda$$, and solve:

$$\frac{L-n\lambda}{\sqrt{n\lambda}} = c\quad\Rightarrow\quad\frac{L-\alpha^2}{\alpha} = c$$ $$\Rightarrow\quad\alpha^2+c\alpha -L=0\quad\Rightarrow\quad\alpha=\frac{-c+\sqrt{c^2+4L}}{2}$$ $$\Rightarrow\quad \boxed{n = \frac{\alpha^2}{\lambda} = \frac{(-c+\sqrt{c^2+4L})^2}{4\lambda}}$$

But according to the formula, if I want a higher probability, e.g., a larger $$c$$, it calculates a larger $$n$$. In other words, asking for more probability implies asking for more data to sum, and that confuses me.

I mean, informally speaking, If I sum $$n=0$$ numbers the result will be below any $$L$$ for sure. Adding more numbers should increase the probability of being above $$L$$, not the other way around, but the equation above says otherwise. Did I do something wrong?

• I made the question a bit shorter now. Feb 15 at 9:38

You don't need a normal approximation for this. You just look at the cumulative distribution function $$F$$ and the quantile function $$F^{-1}$$ of a $$\text{Poisson}(n \times \lambda)$$ Poisson distribution.

You basically want to solve $$F(L; n \lambda) \leq p$$ or equivalently $$F^{-1}(p; n \lambda) \leq L$$ in terms of $$n \in \text{Integers}$$ (or solve the equality in terms of $$n \in \text{Reals}$$ and then take the floor).

• Ok I will try to look at those functions to know how I should use them. But even if I don't need a normal approximation, is it wrong to use it? In case it is not wrong, what did I do wrong then? Because my final result makes no sense to me. Feb 15 at 10:26

Ok, all I did looks fine. My misunderstanding was based on my thought that the function

$$n=f(c)=\frac{(-c+\sqrt{c^2+4L})^2}{4\lambda}$$

was increasing on $$c$$. But it's not, it's actually a decreasing function, which means that the highest the requested probability, the lowest the number of terms I have to add; exactly what I thought. 