Вы находитесь на странице: 1из 2

R Tutorial with Bayesian Statistics Using OpenBUGS

22. Bayesian Poisson Inference


Kenji Hayashida

2014/12/6

1 Poisson Inference with Conjugate Prior


1.1 Problem Statement
The data set discoveries contains annual number of great scientific inventions from 1860 to
1959. Assume the data follows a Poisson distribution with mean parameter . Using uniform
prior, estimate the posterior mean, median, and standard deviation of based on the data set
discoveries.

1.2 What is required to do?


Since the event is a Poisson process, there is a good reason to assume a Poisson distribution.

y e
P (y | ) = , y = 0, 1, 2, . . . (1)
y!
But what is the value of ?
Since we dont have any information, lets assume that follows an uniform distribution. Then
with the help of Bayesian inference, lets refine the estimation of the value.

1.3 Basic idea


Applying Bayes Theorem to (1) yields

P ( | y) P (y | ) P () (2)
y
e P () (3)

Now we introduce the gamma distribution, which is a conjugate distribution for Poisson inference.
Then we can denote a prior of as

P () = gamma(; a, b) (4)
a1 b
e (5)

When a prior of follows an uniform distribution, we set a to 1 and b to 0.

1
From (3) and (5),

P ( | y) y e P () (6)
y e a1 eb (7)
a+y1 (b+1)
= e (8)

Normalizing the expression gives

P ( | y) = gamma(; a + y, b + 1) (9)

Repeating the calculation for n indentical independent Poisson variables yi , we have



P ( | y1 , . . . , yn ) = gamma(; a + yi , b + n) (10)
i

2 Poisson Inference with Prior Parameters


2.1 Problem statement
Assume the annual number of great scientific inventions in the data set discoveries to be
Poisson with mean . Assume also that the prior of is a gamma distribution with mean 2.15
and standard deviation 0.15. Find the posterior mean, median, and standard deviation of
based on the data set dicoveries.

2.2 What is required to do?


Now we have the mean and variance of a gamma distribution for a prior distribution. As weve
already seen,

= a/b (11)
2 2
= a/b (12)

Solving the above equations for a and b,

b = / 2 (13)
2 2
a = b = / (14)

Now we know the parameters of conjugate distribution for a prior distribution. Use (10) and
thats it.

Вам также может понравиться