ST5219: BAYESIAN HIERARCHICAL MODELLING LECTURE 2.2 Priors, Normal Models, Computing Posteriors.

6
ST5219: BAYESIAN HIERARCHICAL MODELLING LECTURE 2.2 Priors, Normal Models, Computing Posteriors

Transcript of ST5219: BAYESIAN HIERARCHICAL MODELLING LECTURE 2.2 Priors, Normal Models, Computing Posteriors.

Page 1: ST5219: BAYESIAN HIERARCHICAL MODELLING LECTURE 2.2 Priors, Normal Models, Computing Posteriors.

ST5219: BAYESIAN HIERARCHICAL MODELLINGLECTURE 2 .2

Priors, Normal Models, Computing Posteriors

Page 2: ST5219: BAYESIAN HIERARCHICAL MODELLING LECTURE 2.2 Priors, Normal Models, Computing Posteriors.

The normal distribution

Stupid name

Page 3: ST5219: BAYESIAN HIERARCHICAL MODELLING LECTURE 2.2 Priors, Normal Models, Computing Posteriors.

The normal distribution

Although data are normally not normal, the normal distribution is a popular model for data

Assume normal distributions in: paired t tests two sample t tests ANOVAs regression multiple regression ++?

and use it as a limiting distribution for other models

We’ll look at how to deal with a single sample nowNext week: multiple normal data sets

Page 4: ST5219: BAYESIAN HIERARCHICAL MODELLING LECTURE 2.2 Priors, Normal Models, Computing Posteriors.

A normal model

Board

work

Page 5: ST5219: BAYESIAN HIERARCHICAL MODELLING LECTURE 2.2 Priors, Normal Models, Computing Posteriors.

Conjugate priors for a normal model

The normal-scaled inverse χ² (NSIχ²) distribution is conjugate for the normal distribution

If (μ,σ²)~ NSIχ²(μ0, κ0, ν0, σ0²)and xi~N(μ,σ²) then (μ,σ²)|x ~ NSI χ²(μn, κn, νn, σn²)

Use geoR’s dinvchisq, rinvchisq for the inverse χ² bit

To sample NSIχ², first draw σ² from Iχ²(μk, κk, νk, σk²) and then μ | σ² from N(μk, σ²/κk)

See Gelman et al (2003) Bayesian Data Analysis Chapman & Hall

Page 6: ST5219: BAYESIAN HIERARCHICAL MODELLING LECTURE 2.2 Priors, Normal Models, Computing Posteriors.

In practice

See computing posteriors (next section)