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

You believe that absenses follow a Poisson(λ) distribution and, before

seeing any evidence, you are 75% sure that the value of λ is less than 5
and decide to use an exponential distribution as your prior for λ. You take a
random sample of 50 students and find out the number of absences that
each has had over the past semester. You discover
that HR has only recorded the precise number of absences for any
employee if they have had 2 or more absences in the past 12 months.
Therefore the data do not discriminate between those who have had 0
absences and those who have had 1 absence. The data that you are
provided with are summarised below.
Absenses <=1 2 3 4 5 6 7 8 9 10

Frequency 18 13 8 3 4 3 0 0 0 1

Derive carefully an algorithm to estimate the posterior distribution of λ.


Similarly, explain how one might explore the posterior distribution of z, the
number of employees out of the sample of 50 who had no absenses in the
previous 12 months.
Write the R code to implement this algorithm.

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