Home > Priors, Single parameter > Constructing a prior for a Poisson mean

## Constructing a prior for a Poisson mean

I am interested in learning about my son’s cell phone use.   Suppose the mean number of text messages that he sends and receives per day is equal to $\lambda$.   I will observe the number of text messages $y_1, ..., y_n$ for $n$ days — we’ll assume that conditional on $\lambda$, $y_1, ...., y_n$ are independent Poisson($\lambda$).

How do I construct a prior density on $\lambda$?   Suppose I model my beliefs by use of a gamma density with shape parameter $a$ and rate parameter $b$.  I want to figure out the values of the prior parameters $a$ and $b$.

There are two distinct ways of assessing your prior.  One can think about plausible values of the mean number of daily text messages $\lambda$.  Alternatively, it may be easier to think about the actual number of text messages $y$ — if we assume a gamma prior, then one can show that the predictive density of $y$ is given by

$f(y) = \frac{\Gamma(a+y)}{\Gamma(a) y!} \frac{b^a}{(b+1)^{a+y}}, y= 0, 1, 2, ...$

Personally, I think it is easier to think about the number of text messages $y$.  My best prediction at $y$ is 10.  After some additional thought, I decide that my standard deviation for $y$ is equal to 3.5.    One can show that the mean and standard deviation of the predictive density are given by

$E(y) = \frac{a}{b}, SD(y) = \sqrt{\frac{a}{b} + \frac{a}{b^2}}$

If one matches my guesses with these expressions, one can show $a = 44.4, b = 4.4$.

To see if these values make any sense, I plot my predictive density.  This density is a special case of a negative binomial density where (using the R notation)

size = a,  prob = b /(b + 1).

I graph using the following R commands.  One can compute P(5 <= y <= 15) = 0.89 which means that on 89% of the days, I believe Steven will send between 5 and 15 messages.

a = 44.4; b = 4.4
plot(0:30,dnbinom(0:30,size=a,prob=b/(b+1)),type=”h”,
xlab=”y”, ylab=”Predictive Prob”, col=”red”, lwd=2)

a = 44.4; b = 4.4
plot(0:30,dnbinom(0:30,size=a,prob=b/(b+1)),type=”h”,
xlab=”y”, ylab=”Predictive Prob”, col=”red”, lwd=2)