Single-parameter models: Poisson data Applied Bayesian Statistics - - PowerPoint PPT Presentation

single parameter models poisson data
SMART_READER_LITE
LIVE PREVIEW

Single-parameter models: Poisson data Applied Bayesian Statistics - - PowerPoint PPT Presentation

Single-parameter models: Poisson data Applied Bayesian Statistics Dr. Earvin Balderama Department of Mathematics & Statistics Loyola University Chicago September 14, 2017 Poisson-Gamma model 1 Last edited September 8, 2017 by Earvin


slide-1
SLIDE 1

Single-parameter models: Poisson data

Applied Bayesian Statistics

  • Dr. Earvin Balderama

Department of Mathematics & Statistics Loyola University Chicago

September 14, 2017

1

Poisson-Gamma model Last edited September 8, 2017 by Earvin Balderama <ebalderama@luc.edu>

slide-2
SLIDE 2

One-parameter models

The Poisson model

Estimating a rate has many applications: Number of new Zika cases per day. Number of invasive trees per square mile. Number of concussions per NFL season. What we observe (the data) is some number of events, Y ∈ {0, 1, 2, . . . }, that

  • ccur over some given time period or spatial region.

Let λ > 0 be the rate parameter we are trying to estimate. We would like to

  • btain the posterior of λ.

2

Poisson-Gamma model Last edited September 8, 2017 by Earvin Balderama <ebalderama@luc.edu>

slide-3
SLIDE 3

One-parameter models

Bayesian analysis - Likelihood

Given a rate λ, the distribution of Y can be described as Y |λ ∼ Poisson(λ) Thus, the likelihood function for Y = y is f(y |λ) = λye−λ y!

3

Poisson-Gamma model Last edited September 8, 2017 by Earvin Balderama <ebalderama@luc.edu>

slide-4
SLIDE 4

One-parameter models

Bayesian analysis - Likelihood

Given a rate λ, the distribution of Y can be described as Y |λ ∼ Poisson(λ) Thus, the likelihood function for Y = y is f(y |λ) = λye−λ y! Note: If we consider the observation period or region to be composed of M temporal or spatial units, and λ is the rate per unit, then a more general specification of the likelihood would be Y |λ ∼ Poisson(Mλ), and f(y |λ) = (Mλ)ye−Mλ y!

3

Poisson-Gamma model Last edited September 8, 2017 by Earvin Balderama <ebalderama@luc.edu>

slide-5
SLIDE 5

One-parameter models

Bayesian analysis - Prior

λ is the parameter of interest, and is continuous and positive. A natural prior distribution to select would be λ ∼ Gamma(a, b) Thus, f(λ) =

ba Γ(a)λa−1e−bλ

4

Poisson-Gamma model Last edited September 8, 2017 by Earvin Balderama <ebalderama@luc.edu>

slide-6
SLIDE 6

One-parameter models

Bayesian analysis - Posterior

We can now derive the posterior distribution, which happens to be: λ |Y ∼ Gamma(a + Y, b + M)

5

Poisson-Gamma model Last edited September 8, 2017 by Earvin Balderama <ebalderama@luc.edu>

slide-7
SLIDE 7

One-parameter models

Bayesian analysis - Posterior

We can now derive the posterior distribution, which happens to be: λ |Y ∼ Gamma(a + Y, b + M) Note: a and b can be interpreted as the “prior number of events and

  • bservation time/spatial units,” which may be useful for specifying the

prior. What values of a and b to select if we have no information about λ before collecting data? What if historical data/expert opinion indicates that λ is likely between 2 and 4 per day, and data is observed weekly?

5

Poisson-Gamma model Last edited September 8, 2017 by Earvin Balderama <ebalderama@luc.edu>

slide-8
SLIDE 8

One-parameter models

Likelihood for two observations

Suppose our data consists of two independent observations, Y1 |λ ∼ Poisson(Mλ) and Y2 |λ ∼ Poisson(Mλ) Thus, the likelihood function for Y1 = y1, Y2 = y2 is f(y1, y2 |λ) = (Mλ)y1e−Mλ y1! · (Mλ)y2e−Mλ y2! = (Mλ)y1+y2e−2Mλ y1! y2! With a Gamma(a, b) prior, the posterior distribution becomes: λ |Y1, Y2 ∼ Gamma(a + Y1 + Y2, b + 2M)

6

Poisson-Gamma model Last edited September 8, 2017 by Earvin Balderama <ebalderama@luc.edu>

slide-9
SLIDE 9

One-parameter models

Likelihood for n observations

Suppose our data consists of n observations, Y1, . . . , Yn |λ

iid

∼ Poisson(Mλ) Thus, the likelihood function is f(y1, . . . , yn |λ) =

n

  • i=1

(Mλ)yie−Mλ yi! = (Mλ)

  • i yie−nMλ
  • i yi!

With a Gamma(a, b) prior, the posterior distribution becomes: λ |Y1, . . . Yn ∼ Gamma

  • a +

n

  • i=1

Yi, b + nM

  • 7

Poisson-Gamma model Last edited September 8, 2017 by Earvin Balderama <ebalderama@luc.edu>

slide-10
SLIDE 10

One-parameter models

Shrinkage

The prior mean was E(λ) = a b. The posterior mean is ˆ λB = E(λ |Y1, . . . Yn) = a + Yi b + nM =

  • b

b + nM a b +

  • nM

b + nM Yi nM The posterior mean is between the sample rate

Yi nM and the prior mean a b.

1

When is ˆ λB close to

Yi nM ?

2

When is ˆ λB shrunk towards the prior mean a

b?

8

Poisson-Gamma model Last edited September 8, 2017 by Earvin Balderama <ebalderama@luc.edu>

slide-11
SLIDE 11

One-parameter models

The Poisson model

Example: Concussions PBS gathered data on NFL concussions from 2012-2015 and made them available at http://apps.frontline.org/concussion-watch/. Our objective is to use these data to determine if the rate of concussions varies by team and/or year. Load the data into R: > dat <- read.csv("ConcussionsByTeamAndYear.csv")

1

Combining teams, estimate the number of concussions per game for 2014 and 2015, separately. How does the rate of concussions change

  • ver time?

2

Estimate and compare the number of concussions per game (16 games per year) for each NFL team. How does the rate of concussions vary by team?

9

Poisson-Gamma model Last edited September 8, 2017 by Earvin Balderama <ebalderama@luc.edu>