You are on page 1of 3

Posterior Predictive Inference

Sudipto Banerjee
sudiptob@biostat.umn.edu

University of Minnesota

Posterior Predictive Inference – p. 1/3


Posterior Predictive Checks
Assume modelling data as y = (y1 , ..., yn ) ∼ N (µ, σ 2 )
Set priors on µ and σ 2
Run WinBUGS and obtain samples: θt = {µt , σt2 }, t = 1, . . . , M
t
For each sampled data point θt , replicate n data points: yrep,i ∼ N (µt , σt2 ),
t = 1, . . . , M and i = 1, . . . , n.
For each sampled value, (µt , σt2 ), we obtain M replicated data set
ytrep = (yrep,1
t t
, . . . , yrep,n ).
Does our model represent our data adequately? Choose a discrepancy measure, say

Xn
(yi − µ)2
T (y; θ) =
i=1
σ2

Compute T (y, θt ) and the set of of T (ytrep , θt ) and obtain “Bayesian p-values”:

1 X
M
P (T (yrep , θ) > T (y, θ) | y) = 1[T (ytrep , θt ) > T (y, θt )].
M t=1

Posterior Predictive Inference – p. 2/3


Model Comparisons
Compute the posterior predictive mean and variance for each observation:

1 X (t)
M
µrep,i = E[Yrep,i |y] = y , i = 1, . . . , n;
M t=1 rep,i

1 X t
M
2
σrep,i = V ar[Yrep,i |y] = (yrep,i − µrep,i )2 .
M t=1

Goodness of fit (lower values better):

X
n
G= (yi − µrep,i )2
i=1

Penalize predictive variance (lower values better):

X
n
2
P = σrep,i
i=1

Model Comparison Metric (lower values better): D = G + P


Posterior Predictive Inference – p. 3/3

You might also like