1
$\begingroup$

I am analyzing daily data transaction data.

I am assuming that

  • The number of transactions in every day of length t has the Poisson distribution with mean λt
  • The number of transactions in evert collection of disjoint days are independent

Xi = {number of transactions on day i}
And thus, X~Poisson(λ) where λ is the mean number conversions per day.

I want to take a Bayesian approach - specifically, as I get more days of data, I want to update λ with the conjugate prior distribution to the Poisson, Gamma.

What are the parameters of this Gamma distribution and how do they relate to the Poisson process?

$\endgroup$
3
$\begingroup$

Your prior is $\lambda\sim\mathcal G(a, b)$, i.e. $$\pi(\lambda)\propto \lambda^{a-1}e^{-b\lambda}.$$

To get the posterior, multiply the prior by the likelihood:

$$\begin{eqnarray} \pi\left(\lambda|X_1,\ldots,X_n\right) &\propto& \lambda^{a-1}e^{-b\lambda} \prod_{i=1}^n e^{-\lambda}\frac{\lambda^{X_i}}{X_i!} \\ &\propto& \lambda^{a-1}e^{-b\lambda} e^{-n\lambda}\lambda^{\sum X_i}\\ & \propto&\lambda^{a+\sum X_i -1} e^{-\lambda(b+n)} \end{eqnarray}$$

and so the posterior is $\lambda|X_1,\ldots, X_n \sim \mathcal G\left(a+\sum X_i, b+n\right)$.

$\endgroup$
  • $\begingroup$ is there anyway, that $\mathcal G\left(a+\sum X_i, b+n\right)$ can be persented as this $\mathcal G\left(a+\sum X_i, b/(nb+1)\right)$, because I have been asked a question in an assignment about this, and I can only get the posterior you get. $\endgroup$ – Bucephalus Sep 23 '18 at 11:19
  • 1
    $\begingroup$ My answer uses the shape-rate parameterization for the gamma distribution. If you use the shape-scale parameterization, your formula is correct. $\endgroup$ – Robin Ryder Sep 23 '18 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.