# Bayesian inference on binarized Poisson distribution

I have a variable that is Poisson distributed. Let's say I have a number of boxes each with a number of balls inside according to a Poisson distribution, with $$\lambda=0.4$$, (the average number of balls per box is 0.4):

$$X\sim Poiss(\lambda=0.4)$$

A random sample of 20 boxes would give us these values:

X=[0, 2, 1, 0, 0, 2, 1, 0, 2, 1, 1, 0, 0, 2, 0, 0, 1, 1, 0, 0]

An average of these values as an estimate of $$\lambda$$ gives us $$0.7$$, which is off due to the low sample count.

However, I can't actually see the number of balls in each box, just whether the box is empty or not:

X_1=[0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0]

I can estimate $$\lambda$$ from this via $$\lambda=-ln(Empty Box\%)$$ since the probability of a box having $$k$$ balls is:

$$p(k) = \displaystyle\frac{\lambda^ke^{-\lambda}}{k!}$$

and therefore:

$$Empty Box\%=p(0) = \displaystyle\frac{\lambda^0e^{-\lambda}}{0!}=e^{-\lambda}$$

In this case I get an estimate of $$\lambda$$ as $$0.69$$, again because of the low sample size for this demonstration. I'm aware that this approach works for sufficiently large sample size, and appropriate range of $$\lambda$$s.

In my case, I have several thousand boxes, and I am much closer to the true value when running simulations. But I am wondering if there is any Bayesian inference I can do in determining $$\lambda$$ for an unknown population. If I had the original counts per box instead of the binarized states, I'm aware that I could create a Gamma conjugate prior and perform Bayesian inference with my data to get a credible range of $$\lambda$$ predictions. Is there any way for me to do this with the data I have?

If $$X \sim \mathcal{Pois}(\lambda)$$ then $$X^* = \mathcal{1}\{X>0\}$$ have a Bernoulli distribution with parameter $$p=1-e^{-\lambda}$$. If you have observations for $$n$$ boxes then $$\sum_i^n X_i^* \sim \mathcal{Bin}(n,p)$$ and you can base inference on that.
• Thanks @kjetil, in this case would it be $p=1 - e^{-\lambda}$? Is $X^* = \mathcal{1}\{X>0\}$ math notation for $X^*$ is 1 for all values greater than $0$, and $0$ elsewhere? May 19, 2019 at 19:10
• Yes, and yes. I will edit. The $\mathcal{1}$ means the indicator function. May 19, 2019 at 19:16
• Great. I now have the following model: $\lambda \sim \mathcal{Gam}(\alpha, \beta)$; $p = 1 - e^{-\lambda}$; $\sum_i^n X_i^* \sim \mathcal{Bin}(n,p)$; In my Gamma prior for $\lambda$, I'm using $\alpha = \lambda_{ideal} \cdot 10000$, $\beta = 10000$. Where I would expect to measure $\lambda_{ideal}$ after observing $10000$ boxes. A less confident prior would use a smaller number. May 19, 2019 at 20:09