Bayesian Course Main (1)
Bayesian Course Main (1)
Christel Faes
Interuniversity Institute for Biostatistics and statistical Bioinformatics
Hasselt University
[Link]@[Link]
Emmanuel Lesa↵re
Department of Biostatistics, Erasmus Medical Center
Interuniversity Institute for Biostatistics and statistical Bioinformatics
Catholic University Leuven & University Hasselt
Contents
1.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
1.4 Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2
4.3 The normal distribution with µ and unknown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
2
4.3.1 No prior knowledge on µ and is available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
4.7.3 Posterior summary measures for the linear regression model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
• Three approaches:
. Frequentist approach
. (Likelihood approach)
. Bayesian approach
Classical approach:
• Example: RCT
• A: µ1 & B: µ2
• H0 : = µ1 µ2 = 0
• The P -value depends on the sample space (Examples I.3 and I.4)
• The P -value does not take all evidence into account (Example I.5)
• P -value 6= p(H0 | y)
• Example I.2
0.4
unobserved y values
0.3
observed t value
Density
0.2
0.015 0.015
0.1
area area
0.0
4 2 0 2 4
t
• The possible samples are similar in some characteristics to the observed sample
(e.g. same sample size)
2 13
• Pearson (1)-test: P =7.8959x10
14
• Fisher’s Exact test: P = 1.487x10
• Small P -value does not necessarily indicate large di↵erence between treatments,
strong association, etc.
• Interpretation: most likely (with 0.95 probability) lies between 0.14 and 2.62
= a Bayesian interpretation
1. Fisher’s approach
• Inductive approach
• Introduction of:
. Null-hypothesis (H0)
. Significance test
. P -value = evidence against H0
. Significance level
. NO alternative hypothesis
. NO power
• Deductive approach
• Introduction of:
. Alternative hypothesis (HA)
. Type I error
. Type II error & power
. Hypothesis test
• Other measures (Bayes factor) have been proposed as measure for or against an
hypothesis
• Notation:
Result on ith operation: success yi = 1, failure yi = 0
Total experiment: n operations with s successes
Sample {y1, . . . , yn} ⌘ y
Probability of success = p(yi) = ✓
) Binomial distribution:
Expresses probability of s successes out of n experiments.
0 1
n
X
n
f✓ (s) = @ A ✓s (1 ✓)n s
with s = yi
s i=1
0
(a) (b)
−10
0.20
Log−likelihood
Likelihood
−30
0.10
−50
0.00
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
θ θ
• `(✓|s) = c + s ln ✓ + (n s) ln(1 ✓)
• d
d✓ `(✓|s) = s
✓
(n s)
(1 ✓) = 0 ) ✓b = s/n
• LP 2: Two likelihood functions for ✓ contain the same information about ✓ if they
are proportional to each other.
b
• Standardized likelihood: LS (✓|s) ⌘ L(✓|s)/L(✓|s)
0.25
0.20
Binomial likelihood
Likelihood
0.15
95% CI
0.10
0.05
MLE
0.00
P
n
. Surgeon 1: s = yi has a binomial distribution
i=1
n
) binomial likelihood L1(✓|s) = s ✓s(1 ✓)(n s)
P
n
. Surgeon 2: s = yi has a negative binomial (Pascal) distribution
i=1
s+k 1
) negative binomial likelihood L2(✓|s) = s ✓s(1 ✓)k
0.25
0.20
Binomial likelihood
Likelihood
0.15
0.10
MLE
0.00
s=9 s
• Surgeon 2: Calculation P -value = 0.0337
0 1
X1
2+s
p [s 9 |✓ = 0.5] = @ A 0.5s (1 0.5)3
s=9 s
• Examples I.7 and I.8: combination of information from a similar historical surgical
technique could be used in the evaluation of current technique = Bayesian exercise
• New mouthwash:
. Daily use of the new mouthwash before tooth brushing reduces plaque?
. Results: new mouthwash reduced 25% of plaque with a 95% CI = [10%, 40%]
. Previous trials: overall reduction in plaque in-between 5% and 15%
. Experts: plaque reduction will probably not exceed 30%
. What to conclude then?
• Medical example: Patients treated for CVA with thrombolytic agent su↵er from
SBAs. Historical studies (20% - prior), pilot study (10% - data) ) posterior
p (A | B ) · p (B)
p (B | A) =
p (A)
p (A | B ) · p (B)
p (B | A) =
p (A | B ) · p (B) + p (A | B C ) · p (B C )
• Folin-Wu blood test: screening test for diabetes (Boston City Hospital)
Se = 56/70 = 0.80
Sp = 461/510 = 0.90
prev = 70/580 = 0.12
• Bayes’ Theorem:
+ + p (T + | D+ ) · p (D+)
p D T =
p (T + | D+ ) · p (D+) + p (T + | D ) · p (D )
Se · prev
pred+ =
Se · prev + (1 Sp) · (1 prev)
• Folin-Wu blood test: prior (prevalence) = 0.10 & positive test ) posterior = 0.47
Ioannidis (2005) ‘explains’ why many ‘medical research findings’ appear to be false
)
(1 )R
pred+ =
(1 )R + ↵
• If (1 )R > ↵
) Posterior probability of finding a true relationship > 0.5
) Power to find a positive result must be > 0.05/R to find with high likelihood a
truly positive result, which is impossible for G large
) Other (interesting!) conclusions, see Ioannidis (2005)
• Bayes theorem will be further developed in the next chapter ) such that it
becomes useful in statistical practice
• Figure 1.4 (a): AUC on pos x-axis represents = our posterior belief that is
positive (= 0.98)
• Figure 1.4 (b): AUC on AUC for the interval [1, 1[ = our belief that µ1/µ2 > 1
• Figure 1.4 (c): incorporation of skeptical prior that is positive (a priori around
-0.5, with some uncertainty) (= 0.54)
(a) (b)
delta sample: 5000 rat sample: 5000
0.6 6.0
0.4 4.0
0.2 2.0
0.0 0.0
-2.0 0.0 2.0 4.0 0.75 1.0 1.25 1.5
(c) (d)
delta sample: 5000 ratsig sample: 5000
0.8 6.0
0.6 4.0
0.4
0.2 2.0
0.0 0.0
-2.0 0.0 2.0 0.8 1.0 1.2 1.4
Philosophical di↵erences aside, there are practical reasons that drive the recent
popularity of Bayesian analysis:
• Simplicity in thinking about problems and answering questions
• Flexibility in making inference on a wide range of models (data augmentation,
hierarchical models)
• Incorporation of prior information
• Development of efficient inference and sampling tools
• Fast computers
• Statistical world:
. Bayesian statistics has not been (widely) accepted for a long time.
. Frequentist world versus Bayesian (Likelihood) world
. From 1990: change in attitude of statistical community.
• Medical world:
. The medical world is more conservative. Bayesian methods are better accepted
in exploratory/epidemiological studies than in clinical trials. In clinical trials,
there seems to be a role for Bayesian methods except for in phase III studies.
A Bayesian and a frequentist were sentenced to death. When the judge asked what
their final wishes were, the Bayesian replied that he wished to teach the frequentist the
ultimate lesson. The judge granted his request and then repeated the question to the
frequentist. He replied that he wished to get the lesson again and again and again . . .
In this chapter:
• A variety of examples
D+ ⌘ ✓ = 1 and D ⌘ ✓ = 0
T + ⌘ y = 1 and T ⌘ y = 0
p(y = 1 | ✓ = 1) · p(✓ = 1)
p(✓ = 1 | y = 1) =
p(y = 1 | ✓ = 1) · p(✓ = 1) + p(y = 1 | ✓ = 0) · p(✓ = 0)
Shorthand notation
p(y | ✓)p(✓)
p(✓ | y) =
p(y)
Probability can have two meanings: limiting proportion (objective) or personal belief
(subjective)
• Tour de France
• Global warming
• ...
• Ak : p(Ak ) 0 (k=1, . . ., K)
• p(S) = 1
• p(AC ) = 1 p(A)
p (y | ✓k ) p (✓k )
p (✓k | y) =
P
K
p (y | ✓k ) p (✓k )
k=1
L(✓|y)p(✓) L(✓|y)p(✓)
p(✓|y) = = R
p(y) L(✓|y)p(✓)d✓
• Frequentist
• Likelihood
• SICH incidence: ✓
• SICH: yi = 1, otherwise yi = 0
Pn n
•y= 1 yi has Bin(n, ✓): p(y|✓) = y ✓y (1 ✓)(n y)
• MLE ✓b = 0.20
n0
• ECASS 2 likelihood: L(✓|y0) = y0 ✓y0 (1 ✓)(n0 y0 )
(y0 = 8 & n0 = 100)
0.15
• As a function of ✓
L(✓|y0) 6= density (AUC 6= 1)
0.10
LIKELIHOOD
• How to standardize?
0.05
Numerically or analytically?
0.0
0.0 0.05 0.10 0.15 0.20 0.25 0.30
PROPORTION SICH
1
p(✓) = B(↵0 , 0 ) ✓↵0 1(1 ✓) 0 1
(b)
15
(↵+ )
(·) gamma function proportional to
LIKELIHOOD
10
• ↵0(9) ⌘ y0 + 1
0 (100 8 + 1) ⌘ n0 y0 + 1
5
LIKELIHOOD
0
0.0 0.05 0.10 0.15 0.20 0.25 0.30
PROPORTION SICH
• Averaged likelihood
✓ ◆
n B(↵0 + y, 0 + n y)
p(y) =
y B(↵0, 0)
1
p(✓|y) = ✓↵ 1(1 ✓) 1
B(↵, )
with
↵ = ↵0 + y
= 0+n y
POSTERIOR
15
10
PRIOR proportional to
LIKELIHOOD
5
0
• Posterior mode: ✓ = n0
n0 +n ✓0 + n0n+n ✓b (analogous result for mean)
• Here: posterior more peaked than prior & likelihood (not in general)
• Posterior estimate ✓ = MLE of combined ECASS 2 data & interim data ECASS 3
• Beta(↵0, 0) prior
⌘ binomial experiment with (↵0 1) successes in (↵0 + 0 2) experiments
) Prior
⇡ extra data to observed data set: (↵0 1) successes and ( 0 1) failures
• Suppose DSMB neurologists ‘believe’ that SICH incidence is probably more than
5% but most likely not more than 20%
• The neurologists could also combine their qualitative prior belief with ECASS 2
data to construct a prior distribution ) adjust ECASS 2 prior
ECASS 2
15
POSTERIOR
SUBJECTIVE
POSTERIOR
10
ECASS 2 SUBJECTIVE
PRIOR PRIOR
5
0
8
• For stroke study: NI prior = proportional to
POSTERIOR LIKELIHOOD
p(✓) = I[0,1] = flat prior on [0,1]
6
• Uniform prior on [0,1] = Beta(1,1)
4
2
FLAT PRIOR
2
• y ⇠ N(µ, ) when
1 ⇥ 2 2
⇤
f (y) = p exp (y µ) /2
2⇡
0.004
0.08
(a) (b)
0.06
0.002
0.04
0.02
MLE= 328
0.000
0.00
0 200 400 600 800 310 320 330 340
cholesterol (mg/day) µ
2
• Likelihood / N(µ0, 0)
µ0 ⌘ y 0 = 328
p p
0 = / n0 = 120.3/ 563 = 5.072
with µ0 ⌘ y 0
• IBBENS-2 study:
sample y with n=50
y = 318 mg/day & s = 119.5 mg/day
95% confidence interval = [284.3, 351.9] mg/day ) wide
2
p(µ|y) = N(µ, ),
with
1 n
2 µ0 + 2 y 1
0 2
µ= 1 n and = 1 n
2 + 2 2 + 2
0 0
0.08
IBBENS−2 POSTERIOR IBBENS PRIOR
0.06
0.04
0.02
IBBENS−2 LIKELIHOOD
0.00
2
with w0 = 1/ 0 = prior precision and w1 = 1/( 2/n) = sample precision
2
• When n ! 1 or 0 :! 1: p(µ|y) = N(y, /n)
2 2 2 2
• Prior variance 0 = ) = /(n + 1)
2 2
• General: 0 = /n0, with n0 general
n0 n
µ= µ0 + y
n0 + n n0 + n
and
2
2
=
n0 + n
0.05
POSTERIOR
(a) (b) POSTERIOR
0.04
0.04
PRIOR PRIOR
0.03
0.03
LIKELIHOOD LIKELIHOOD
0.02
0.02
0.01
0.01
0.00
0.00
250 300 350 400 250 300 350 400
µ µ
2
• Non-informative prior: 0 !1
2
) Posterior: N(y, /n)
0.025
0.020
0.015 POSTERIOR
LIKELIHOOD
0.010
0.005
PRIOR
0.000
• Poisson(✓) ✓y e ✓
p(y| ✓) =
y!
• Poisson likelihood:
n
Y n ✓ y
Y ✓
◆ P
✓ ei ✓ i yi
e n✓
L(✓| y) ⌘ p(yi| ✓) = = Q
i=1 i=1
yi ! i yi !
0.4
• Annual examinations from 1996 to 2001
0.3
PROPORTION
• 4468 children (7% of children born in 1989)
0.2
• Caries experience measured by dmft-index
0.1
(min=0, max=20)
0.0
0 5 10 15
dmft-index
• MLE of ✓: ✓b = y = 2.24
↵0
0
p(✓) = ✓ ↵0 1
e 0✓
(↵0)
0.25
0.20
0.15
0.10
Gamma(3,1)
0.05
0.00
0 5 10 15 20
θ
• Posterior
n
Y ↵0
n✓ yi 0
p(✓| y) / e (✓ /yi!) ✓ ↵0 1 e 0✓
(↵0)
P i=1
( yi +↵0 ) 1 (n+ 0 )✓
/ ✓ e
P
• Recognize kernel of a Gamma( yi + ↵ 0 , n + 0) distribution
¯↵¯ ¯✓
) p(✓| y) ⌘ p(✓| y) = ✓↵¯ 1
e
(↵)
¯
P
with ↵
¯= yi + ↵0= 9758 + 3 = 9761 and ¯ = n + 0= 4351 + 1 = 4352
• For STM study posterior more peaked than prior likelihood, but not in general
• Bayesian approach satisfies 1st likelihood principle in that inference does not
depend on never observed results
• Frequentist approach:
. ✓ fixed and data are stochastic
. Many tests are based on asymptotic arguments
. Maximization is key tool
. Does depend on stopping rules
• Bayesian approach:
. Condition on observed data (data fixed), uncertainty about ✓ (✓ stochastic)
. No asymptotic arguments are needed, all inference depends on posterior
. Integration is key tool
. Does not depend on stopping rules
• Subjectivity , objectivity
born on 1701
. Thomas Bayesand died on
was probably born7-4-1761.
in 1701
and died in 1761
verent. with
He wasmathematical interests.
a Presbyterian minister, studied logic
and theology at Edinburgh University,
and had strong mathematical interests
matics. was published during his life.
Bayes’ theorem was submitted posthumously by
his friend Richard Price in 1763
and was entitled
An Essay toward a Problem in the Doctrine of Chances
• de Finetti: exchangeability
• Spiegelhalter: (Win)BUGS
The theory that would not die. How Bayes rule cracked the enigma
code, hunted down Russian submarines & emerged triumphant from
two centuries of controversy
Mc Grayne (2011)
In this chapter:
Direct exploration of the posterior: P (a < ✓ < b|y) for di↵erent a and b
• Posterior mode
• Posterior mean
• Posterior median
Properties:
Posterior mean ✓:
R
✓= ✓ p(✓|y)d✓
Properties:
R
. ✓ minimizes (✓ b 2 p(✓|y)d✓ over all estimators ✓b
✓)
. Posterior mean involves twice integration
. = h(✓) with h monotone transformation: 6= h(✓)
Posterior median ✓M :
R
0.5 = ✓M p(✓|y)d✓
Properties:
R
. ✓M minimizes a |✓ b p(✓|y)d✓ with a > 0 over all estimators ✓b
✓|
. For a symmetric posterior: posterior median = posterior mean = posterior mode
. Posterior median involves one integration and solving an integral equation
. = h(✓) with h monotone transformation: M = h(✓M )
2
Posterior variance :
2
R
= (✓ ✓)2 p(✓|y)d✓
• Posterior SD:
1
R1
• Posterior mean: integrate B(↵, ) 0 ✓ ✓↵ 1(1 ✓) 1
d✓
) ✓ = B(↵ + 1, )/B(↵, ) = ↵/(↵ + ) = 19/152 = 0.125
1
R1
• Posterior median: solve 0.5 = B(↵, ) ✓M ✓↵ 1(1 ✓) 1
d ✓ for ✓
) ✓M = = 0.122 (R-function qbeta)
12 ↵ 1
R1 1
• Posterior variance: calculate also 0 ✓ ✓ (1
B(↵, )
✓) d✓
2
⇥ ⇤
) 2
= ↵ / (↵ + ) (↵ + + 1) = 0.02672
• Posterior mode=mean=median: µ
bM = 327.2 mg/dl
2
• Posterior variance & SD: = 22.99 & = 4.79 mg/dl
P (a ✓ b | y) = 1 ↵
P (a ✓ b | y) = 1 ↵ = F (b) F (a)
• Given data set y: 95% credible interval contains the 95% most plausible
parameter values a posteriori
• Given data set y: 95% confidence interval either contains or does not contain the
true value. Adjective 95% gets its meaning only in the long run
2
• Posterior = N(µ, )
BETA(19,133)
15
10
0.025 0.025
5
2.0
15
1.5
10
1.0
5
0.5
95% HPD interval log(95% original HPDI)
0.0
0
• Naive approach
. Estimate ✓ ) ✓b
b
y | ✓)
. Predictive distribution of ye: p(e
• Three cases:
. All mass (AUC ⇡ 1) of p(✓ | y) at ✓bM ) distribution of ye: p(e y | ✓bM )
1 K
PK
y | ✓k )p(✓k | y)
. All mass at ✓ , . . . , ✓ ) distribution of ye: k=1 p(e
. General case: posterior predictive distribution (PPD)
) distribution of ye
R
y | y) =
p(e y | ✓)p(✓ | y) d✓
p(e
2
• Gaussian case ( known): 95% reference interval of alp
p
• yi = 100/ alpi (i = 1, . . . , 250) ⇡ normal distribution
2 2
• 95% ref interval for N(µ, ) (µ & known): [µ 1.96 , µ + 1.96 ]
• Naive approach:
Replace µ, by y = 7.11, s = 1.4 ) 95% ref interval (alp) = [104.45, 508.95]
2 2
• Posterior PD: ye | y ⇠ N(µ, + )
2 2
• Prior PD: ye ⇠ N(µ0, + 0)
p p
2 2 2 2
• 95% PPI (equal tail & HPPI): [µ 1.96 + , µ + 1.96 + ]
2
• Prior variance 0 large:
)µ⇡y
2 2
) ⇡ /n
⇥ 2
⇤
) PPD ⇡ ye|y ⇠ N y, (1 + 1/n)
) 95% Bayesian ref interval = frequentist 95% ref interval = [104.3, 510.2]
• Naive approach
. MLE of ✓ (incidence SICH) = 8/100 = 0.08 for (fictive) ECASS 2 study
. Predictive distribution: Bin(50, 0.08)
. 95% predictive set: {0, 1, . . . , 7} ⇡ 94% of the future counts
) observed result of 10 SICH patients out of 50 is extreme
0.20
Bin(50,0.08)
0.15
0.10
0.05
0.00
0 2 4 6 8 10 12 14
# future RT−PA patients with SICH
b
• BB(m, ↵, ) shows more variability than Bin(m, ✓)
0.20
BB(50,9,93) Bin(50,0.08)
0.15
0.10
0.05
0.00
0 2 4 6 8 10 12 14
# future RT−PA patients with SICH
OBSERVED DISTRIBUTION
0.4
0.3
Probability
PPD
0.2
0.1
0.0
0 5 10 15 20
dmft−index
• Independence:
Qn
p(y1, y2, . . . , yn | ✓) = i=1 p(yi | ✓)
Independence is defined conditional on ✓
• Exchangeable:
✓ is never known but given a prior distribution p(✓):
Z
p(y1, y2, . . . , yn) = p(y1, y2, . . . , yn | ✓)p(✓)d ✓,
Z✓ Yn
= p(yi | ✓)p(✓)d ✓
✓ i=1
• Exchangeable ; independence
• Partial/conditional exchangeability
• Up to now: choice of prior was taken such that posterior & posterior summary
measures are obtained analytically
• Logarithm of OR = ✓ ◆
✓1/(1 ✓1 )
= log
✓0/(1 ✓0 )
• OR = eˆ
• MLE of ✓ ◆
r1 (n0 r0 )
ˆ = log
r0 (n1 r1 )
2
• Approximately ˆ ⇠ N( , ˆ)
2 1 1 1 1
var(ˆ ) ⌘ ˆ = + + +
r0 n 0 r0 r1 n 1 r1
• But large sample result for ˆ makes the Bayesian analysis easier
• Chapter 2
2
. Prior N( 0, 0) for + normal likelihood of ˆ
2
) Normal posterior for : N( , )
!
ˆ 0 2
= 2 + 2 ⇥
ˆ 0
! 1
2 1 1
= 2 + 2
ˆ 0
2
• Prior N( 0 = log(5), 0 = 10, 0002)
0.15
0.10
POSTERIOR
0.05
PRIOR
0.0 95% CI
0 5 10 15 20 25
ODDS RATIO
• Expert opinion:
. Best guess (median value) for e = 5
. 95% prior credible interval for OR = [1, 25]
) Experts put 95% belief in N(1.6, 0.822) for
0.15
PRIOR
0.10
POSTERIOR
0.05
0.0
0 5 10 15 20 25
ODDS RATIO
• Normal posterior for a large sample size is justified even when the likelihood is
combined with a non-normal prior
. ✓ = mean dmft-index
P10
. Likelihood: dmft-index of ten children i yi = 26
. Prior: Gamma(3, 1)
. Posterior: Gamma(29, 11) (solid)
0.8
Posterior
0.6
. ✓b = y = 2.6
2
0.4
. b
✓
= y/n = 0.26
0.2
0.0
1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5
θ
• Numerical integration
• Gaussian quadrature
Non-adaptive
Adaptive (M = 1 = Laplace approximation)
• Posterior distribution
⇣ ⌘
Pn log(✓) µ0 2
n✓
/✓ i=1 yi 1 e 2 0
, (✓ > 0)
• Mid-point approach
0.10
k x POSTERIOR DENSITY
AUC =0.13
0.08
0.06
0.04
0.02
0.00
1 2 3 4 5
θ
• Monte Carlo integration: replace integral by a Monte Carlo sample {✓e1, . . . , ✓eK }
• Approximate p(✓|y) by sample histogram
• Classical Strong Law of Large Numbers:
Z K
1 X e
t(✓) p(✓|y) d✓ ⇡ t = t(✓k ), for K large
K
k=1
• Posterior for ✓ = probability of SICH with rt-PA = Beta(19, 133) (Example II.1)
2.0
(a) (b)
20
1.5
15
1.0
10
0.5
5
0.0
0
• ICDF method
1
. Sample u from U(0, 1) ) x = F (u) ⇠ F (x)
1.0
F−1
0.8
u
0.6
cdf
0.4
0.2
0.0
−4 −2 0 2 4
θ
0.6
A=1.8
. q = envelope distribution
0.5
N(0,1)
0.4
. A = envelope constant
0.3
q
0.2
0.1
0.0 −4 −2 0 2 4
θ
• Stage 2:
• Properties AR algorithm:
. Produces a sample from the posterior
. Only needs p(y | ✓) p(✓)
. Probability of acceptance = 1/A
• Envelope and squeezing density are log of piecewise linear functions with knots at
sampled grid points
TANGENT DERIVATIVE−FREE
log posterior
log posterior
SQUEEZING SQUEEZING
θ1 θ2 ~ θ3 θ1 θ2 ~ θ3
θ θ
Interest in E [t(✓) | y]
R Rh i h i
= t(✓)p(✓ | y)d✓ = t(✓) p(✓|y)
q(✓) q(✓)d✓ = Eq t(✓) p(✓|y)
q(✓)
• Estimate E [t(✓) | y] by
K K
1 X t(✓k )p(✓k | y) 1 X k k
k
⌘ t(✓ )w(✓ )
K q(✓ ) K
k=1 k=1
• Two stage-sampling
e ⌘ {✓e1, . . . , ✓eJ } from q(✓) and compute weights
. Stage 1: Draw ✓
p(✓ej |y)/q(✓ej )
w j = PJ (j = 1, . . . , J)
ei
p(✓ |y)/q(✓ ) ei
i=1
Accept-reject algorithm
0.8
0.6
0.4
0.2
0.0
1 2 3 4 5
θ
L2 (✓|y) p2 (✓)
) p2(✓ | y) / L1 (✓|y) p1 (✓) p1(✓ | y) = v(✓) p1(✓ | y)
Here
• Stage 2:
. Determine weights v(✓ei) based on p2(✓) (likelihood stays the same)
. Take weighted random sample from this sample of size K = 1, 000
) ⇡ same histogram
• Testing:
. Frequentist: 2-sided binomial test (P = 0.043)
. Bayesian: U(0,1) prior + Bin(21,30) = Beta(22, 10) posterior (pB = 0.023)
pB against θ = 0.5
• Bayes factor =
factor that transforms prior odds for H0 into posterior odds after observed the data
• H0 : ✓ = 0.5 versus Ha : ✓ = 0.8 (only 0.5 and 0.8 are possible for ✓)
• ✓ is continuous ) needed
p(y | H0) = weighted average of p(y | ✓), weights from p(✓ | H0) ⌘ U (0, 0.5)
p(y | Ha) = weighted average of p(y | ✓), weights from p(✓ | Ha) ⌘ U (0.5, 1)
• Di↵erent priors p(✓ | H0) & p(✓ | Ha) give di↵erent Bayes factors
• Needed
p(y | H0) = p(y | 0.5)
p(y | Ha) = weighted average of p(y | ✓), weights from p(✓ | Ha) ⌘ U (0, 1)
0.521 0.59
• Classical likelihood ratio test: Z = (21/30)21 (9/30)9
= 0.0847 (P = 0.026)
Lindley’s paradox:
Reason:
2
• I.i.d. yi ⇠ N(✓, ) (i = 1, . . . , n) ( known)
• Explanation:
Averaging over a large number of unrealistic values under Ha
. Estimation: priors often do not have a great impact on the posterior conclusion
. Testing : priors MAY have a great impact on the posterior conclusion
In this chapter:
• Examples
. (multivariate) Gaussian distribution
. Multinomial distribution data
• Let
y = sample of n independent observations
✓ = (✓1, ✓2, . . . , ✓d)T
L(✓ | y)
Multivariate prior: p(✓)
L(✓ | y)p(✓)
• Multivariate posterior: p(✓ | y) = R
L(✓ | y)p(✓) d ✓
bM
Posterior mode: ✓
Posterior mean: ✓
HPD region of content (1-↵)
• Let
. ✓ = {✓ 1, ✓ 2} Z
. Marginal posterior: p(✓ 1 | y) = p(✓ 1, ✓ 2 | y) d ✓ 2
• Often ✓ 1 = one-dimensional
Easy to graphically display marginal posterior
Posterior summary measures based on p(✓ 1 | y) convenient in practice
Marginal posterior mean of ✓ 1 = joint posterior mean
Z
• Alternatively: p(✓ 1 | y) = p(✓ 1 | ✓ 2, y) p(✓ 2 | y) d ✓ 2
2
Acknowledging that µ and are unknown
2
• Sample y1, . . . , yn of independent observations from N(µ, )
2
• Joint likelihood of (µ, ) given y:
" n
#
1 1 X
2
L(µ, | y) = exp 2
(yi µ)2
(2⇡ 2)n/2 2 i=1
• Three priors:
. No prior knowledge is available
. Previous study is available
. Expert knowledge is available
2 2 2
• Noninformative joint prior p(µ, )/ (µ and a priori independent)
2 1 1
⇥ 2 2
⇤
• Posterior distribution p(µ, | y) / n+2 exp 2 2
(n 1)s + n(y µ)
2.4
7.4
2.2
7.3
2.0
7.2
1.8
7.1
1.6
σ2 7.0
1.4 6.9 µ
1.2 6.8
. p(µ | y)
2
. p( | y)
2 2
• Conditional posterior for µ: p(µ | , y) = N(y, /n)
2 2 2
• Marginal posterior for : p( | y) ⌘ Inv (n 1, s2)
(scaled inverse chi-squared distribution)
(n 1)s2 2
) 2
⇠ (n 1)
2 2 2 2 2
p(µ, | y) = p(µ | , y) p( | y) = N(y, /n) Inv (n 1, s2)
2.4
7.4
2.2
7.3
2.0
7.2
1.8
7.1
1.6
σ2 7.0
1.4 6.9 µ
1.2 6.8
2
) A posteriori µ and are dependent
(n 1) 2
• Posterior variance = n(n 2) s
(n 1) 2
• Posterior mean = (n 3) s
(n 1) 2
• Posterior mode = (n+1) s
(n 1)
• Posterior median = 2 (0.5,n 1) s2
2(n 1)2 4
• Posterior variance = 2
(n 3) (n 5)
s
2 2
• µ and known: ) distribution of ye = p(e
y | µ, )
2
• µ and unknown:
Z Z
2 2 2
y | y) =
p(e y | µ,
p(e )p(µ, | y) dµ d
⇥ 2 1
⇤
= tn 1 y, s 1 + n -distribution
2.0
POSTERIOR DENSITY
POSTERIOR DENSITY
3
1.5
2
1.0
0.5
1
0.0
0
6.2 6.4 6.6 6.8 7.0 7.2 7.4 1.5 2.0 2.5 3.0 3.5 4.0
MU SIGMA^2
• For µ:
bM = µM = 7.11
.µ=µ
2
. µ = 0.0075
. 95% (equal tail and HPD) CI = [6.94, 7.28]
2
• For :
2 2 2
. = 1.88, bM = 1.85, M = 1.87
2
. 2 = 0.029
. 95% equal tail CI = [1.58, 2.24], 95% HPD interval = [1.56, 2.22]
• PPD:
h ⇣ ⌘i
y | y) = t⌫ ȳ, s2 1 + 01+n
p(e
2.0
POSTERIOR DENSITY
POSTERIOR DENSITY
3
1.5
2
1.0
0.5
1
0.0
0
6.2 6.4 6.6 6.8 7.0 7.2 7.4 1.5 2.0 2.5 3.0 3.5 4.0
MU SIGMA^2
2 2
) Joint prior N(µ0, 0) ⇥ Inv (⌫0, ⌧02) 6= conjugate
Two distributions:
• Multinomial distribution
(⌫+p)/2
[(⌫ + p)/2] 1/2 1
p(y | ⌫, µ, ⌃) = p/2
|⌃| 1 + (y µ)T ⌃ 1(y µ)
(⌫/2)(k⇡) ⌫
Properties:
Yk
n! y
p(y | ✓) = ✓j j
y1!y2! . . . yk ! j=1
Pk T
Pk
with n = j=1 yj , ✓ = (✓1, . . . , ✓k ) , ✓j > 0, (j = 1, . . . , k), j=1 ✓j =1
Properties:
1 Y ↵ij 1
✓⇠ ✓
B(↵) i,j ij
• Note:
Dirichlet distribution = extension of beta distribution to higher dimensions
Marginal distributions of a Dirichlet distribution = beta distribution
✓11 ✓22
=
✓12 ✓21
20
30
15
20
10
10
5
5
0
0
0.30 0.35 0.40 0.45 0.04 0.06 0.08 0.10 0.12
θ11 θ12
1.2
15
0.8
10
0.4
5
0.0
0
0.35 0.40 0.45 0.50 0.5 1.0 1.5 2.0 2.5 3.0 3.5
θ12 ψ
• Classical frequentist tests (Fisher’s Exact test, chi-square test, etc) can be
‘reproduced’ by Bayesian tests
• A dependent prior p(✓1, ✓2) is more natural than product of p(✓1) and p(✓2)
• Stagewise approach
• Sampling approach:
. Sample ✓ed from p(✓d | y)
. Sample ✓e(d 1) from p(✓(d 1) | ✓ed, y)
. ...
. Sample ✓e1 from p(✓1 | ✓ed 1, . . . , ✓e2, y)
2 2
• Sampling approach from normal posterior p(µ, | y) ⌘ N(µ, )
• Three cases:
. No prior knowledge
. Historical data available
. Expert knowledge available
2 2 2
Sample from p(µ, | y): Sample from p( | y) & Sample from p(µ | , y)
2
1. Sample from p( | y):
2
2. Sample from p(µ | , y):
y | y), 2 approaches:
To sample from the posterior predictive distribution p(e
⇥ 2 1
⇤
1. Sample directly from tn 1 y, s 1 + n -distribution
(b)
5
(a)
2.0
4
1.5
3
1.0
2
0.5
1
0.0
0
1.4 1.6 1.8 2.0 2.2 2.4 6.9 7.1 7.3
2 µ
σ
0.30
(d)
(c)
2.4
2.2
0.20
2.0
σ2
0.10
1.8
1.6
0.00
1.4
2
• Problem: p( | y) does not have a known distribution
p
• Priors for y = alp:
2 2
µ ⇠ N(5.25, 2.75/65) & ⇠ Inv (64, 2.75)
• Method of Composition:
2
. Stage I: sample
n
Y
2 2 2 2
p( | y) / N(µ | µ0, 0 ) Inv ( | ⌫0, ⌧02) N(yi | µ, 2
)
i=1
p( 2 | y) evaluated on a grid ) mean and variance
Approximating distribution q( 2) ) Inv 2 2
( | 294.2, 2.12)
Weighted resampling
. Stage II: sample µ from a normal distribution
(a) (b)
expert
2.5
conjugate
conjugate
4
2.0
3
1.5
2
1.0
0.5
1
0.0
0
1.5 2.0 2.5 3.0 6.5 6.6 6.7 6.8 6.9 7.0 7.1
2 µ
σ
µ, e 2 )
• Sample ye from N(e
• Based on sample
. 95% normal range for y: [4.05, 9.67]
. 95% normal range for alp: [106.84, 609.70]
Likelihood:
2 1 1
L( , | y, X) = exp 2
(y X )T (y X )
(2⇡ 2)n/2 2
2.5
2.0
TBBMC (kg)
1.5 1.0
0.5
20 25 30 35 40
BMI(kg m2)
• Posterior distributions:
h i
p( , 2
| y) = N(d+1) | b, 2 T
(X X) 1
⇥ Inv 2
( 2
|n d 1, s2)
h i
p( | 2
, y) = N(d+1) | b, 2
(X T X) 1
2 2 2
p( | y) = Inv h( | n d 1, s2)i
p( | y) = tn d 1 | b , s2(X T X) 1
• 100(1-↵)%-HPD region=
n o
C↵ ( ) = :( b )T (X T X)( b ) d s2 F↵(d + 1, n d 1)
e:
• PPD of ye with x
t-distribution with (n d 1) degrees of freedom with
location parameter: T xe
h i
2 T T 1
scale parameter: s 1 + x e (X X) x e
,
T
ye e
x
Given y : q ⇠ tn d 1
e T (X T X) 1x
s 1+x e
• How to sample?
. Directly from t-distribution
. Method of Composition
Method of Composition
2
• p( | , y) = multivariate normal distribution
• Sample e2 from p( 2
| y) = Inv 2
( 2
|n d 1, s2)
h i
• Sample from e from p( | e2, y) = N(d+1) | b , e2(X T X) 1
2
• Sample future observation ye from N(e
µ30, e30 ):
T
.µ e
e30 = (1, 30)
2 2
⇥ T 1 T
⇤
. e30 = e 1 + (1, 30)(X X) (1, 30)
100
(a) (b)
80
3
60
2
40
1
20
0
0
0.6 0.8 1.0 1.2 0.025 0.035 0.045
β0 β1
(d)
1.5
(c)
0.045
1.0
β1
0.035
0.5
0.025
0.0
Generalized Linear Model (GLIM): extension of the linear regression model to a wide
class of regression models
• Distributional part
• Link function
• Variance function
• Distributional part:
y ✓ b(✓)
p(y | ✓; ) = exp + c(y; ) , with a(·), b(·), c(·) known functions
a( )
Often a( ) = /w, with w a prior weight. For known and w = 1:
d b(✓)
. E(y) = µ = d✓
d2 b(✓)
. V ar(y) = a( ) V (µ) with V (µ) = d2 ✓
• Examples of a GLIM:
2
. Normal linear regression model with a normal distribution yi ⇠ N(µi, ),
identity link (g(µi) = µi), = 1 and V (µi) = 2 assumed known
. Poisson regression model with the Poisson distribution yi ⇠ Poisson(µi), log
link (g(µi) = log(µi)), = 1 and V (µi) = µi
. Logistic regression model with the Bernoulli (or Binomial) distribution
yi ⇠ Bern(µi), logistic link (g(µi) = logit(µi)), = 1 and V (µi) = µi(1 µi )
. Solving the posterior distribution analytically is often not feasible due to the
difficulty in determining the integration constant
. Computing the integral using numerical integration methods is a practical
alternative if only a few parameters are involved
) New computational approach is needed
Method of Composition:
Gibbs sampling:
• Under mild conditions: sample from the posterior distribution = target distribution
) From k0 on: summary measures calculated from the chain consistently estimate
the true posterior measures
• Example IV.5: sampling from posterior distribution of the normal likelihood based
on 250 alp measurements of ‘healthy’ patients with NI prior for both parameters
(a) (b)
2.6
2.6
2.4
2.4
2.2
2.2
σ2
σ2
2.0
2.0
1.8
1.8
1.6
1.6
1.4
1.4
6.6 6.8 7.0 7.2 7.4 6.6 6.8 7.0 7.2 7.4
µ µ
2
Zigzag pattern in the (µ, )-plane
1 complete step = 2 substeps (blue=genuine element)
Burn-in = 500, total chain = 1,500
2.5
(a) (b)
4
2.0
3
1.5
2
1.0
0.5
1
0.0
0
6.8 6.9 7.0 7.1 7.2 7.3 7.4 1.4 1.6 1.8 2.0 2.2 2.4
µ σ2
0.08
0.06
Density
0.04 0.02
0.00
0 5 10 15 20 25 30
x
• Posterior:
1 (µ µ )2
2 1 2 02
0
p(µ, | y) / e
0
2 (⌫0 /2+1) ⌫0 ⌧02 /2 2
⇥ ( ) e
n
1 Y 1 (y µ)2
⇥ n e 2 2 i
i=1
n
Y 1 (µ µ )2
1 (y µ)2 0 n+⌫0
/ e 2 2 i e 2 02
( ) 2 +1) e
2 ( ⌫0 ⌧02 /2 2
i=1
7.0
6.5
µ
6.0
(a)
5.5
(b)
2.2 2.6
σ2
1.8
(k+1)
1. Sample ✓1 from p(✓1 | ✓2k , . . . , ✓(d
k k
1) d , y)
, ✓
(k+1) (k+1)
2. Sample ✓2 from p(✓2 | ✓1 , ✓3k , . . . , ✓dk , y)
..
(k+1) (k+1) (k+1)
d. Sample ✓d from p(✓d | ✓1 , . . . , ✓(d1) , y)
. British coal-mining disasters data set: # severe accidents in British coal mines
from 1851 to 1962
. Decrease in frequency of disasters from year 40 (+ 1850) onwards?
6
5
4
# Disasters
3
2
1
0
0 20 40 60 80 100
1850+year
Statistical model:
• Priors
. ✓: Gamma(a1, b1), (a1, b1 parameters)
. : Gamma(a2, b2), (a2, b2 parameters)
. k: p(k) = 1/n
Full conditionals:
k
X
p(✓ | y, , b1, b2, k) = Gamma(a1 + yi , k + b1 )
i=1
Xn k
p( | y, ✓, b1, b2, k) = Gamma(a2 + yi , n k + b2 )
i=k+1
p(b1 | y, ✓, , b2, k) = Gamma(a1 + c1, ✓ + d1)
p(b2 | y, ✓, , b1, k) = Gamma(a2 + c2, + d2)
⇡(y | k, ✓, )
p(k | y, ✓, , b1, b2) = Pn
j=1 ⇡(y | j, ✓, )
✓ ◆Pki=1 yi
✓
with ⇡(y | k, ✓, ) = exp [k( ✓)]
a1 = a2 = 0.5, c1 = c2 = 0, d1 = d2 = 1
0.20
0.15
0.10
0.05
0.00
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 35 40 45
θ λ k
a1 = a2 = 0.5, c1 = c2 = 0, d1 = d2 = 1
Posterior mode of k: 1891
Posterior mean for ✓/ = 3.42 with 95% CI = [2.48, 4.59]
(a)
0.045
β1
0.030
(b)
0.09
σ2
0.07
(a)
0.045
β1
0.030
(b)
0.08 0.10
σ2
0.06
2
• : index plot and trace plot similar ) (almost) independent sampling
2
) Method of Composition and Gibbs sampling: similar posterior measures of
Autocorrelation:
k (k 1)
. Autocorrelation of lag 1: correlation of 1 with 1 (k=1, . . .)
k (k 2)
. Autocorrelation of lag 2: correlation of 1 with 1 (k=1, . . .)
...
k (k m)
. Autocorrelation of lag m: correlation of 1 with 1 (k=1, . . .)
High autocorrelation:
• Transition kernel
• Full conditionals determine the joint distribution: see Besag (1974) and
Hammersley and Cli↵ord (1971)
• Proofs in Robert and Casella (2004) for bivariate case (Theorem 9.3) and for
general case (Theorem 10.5)
R
) p(✓1, ✓2) = p(✓2 | ✓1)/ [p(✓2 | ✓1)/p(✓1 | ✓2)] d✓2
That the joint distribution exists is not enough to determine the joint
• Bivariate case (Casella and George, 1992): compute p(✓1, ✓2) from p(✓1 | ✓2) &
p(✓2 | ✓1)
R
1. p1(✓1) = p(✓1 | ✓2)p2(✓2) d✓2 and similar for ✓2
Z Z
2. p1(✓1) = p(✓1 | ✓2) p(✓2 | 1)p1( 1) d 1 d✓2
Z Z
= p(✓1 | ✓2)p(✓2 | 1) d✓2 p1( 1) d 1
Z
= K1( 1, ✓1) p1( 1) d 1
R
with K1( 1, ✓1) = p(✓1 | ✓2)p(✓2 | 1) d✓2
• Gibbs sampler:
K(✓, ) = p( 1 | ✓2, . . . , ✓d) ⇥ p( 2 | 1 , ✓2 , . . . , ✓d ) ⇥ p( d | 1, . . . , (d 1) )
R
• K1( 1, ✓1) = p(✓1 | ✓2)p(✓2 | 1 ) d✓2 :
Sampling the full conditionals is done via di↵erent algorithms depending on:
. Shape of full conditional (classical versus general purpose algorithm)
. Preference of software developer:
SASr procedures GENMOD, LIFEREG and PHREG: ARMS algorithm
WinBUGS: variety of samplers
• y = auxiliary variable
• Three cases:
. [a, b] finite interval
Sample from [a, b] ⇥ [0, m = max f (x)] and reject if outside region A
. General unimodal case
. General multimodal case
• y | x ⇠ U(0, f (x))
• x | y ⇠ U(miny , maxy )
miny (maxy ) minimal (maximal x-value) of solution y = f (x)
(a)
Density
S(y)
0.2
y
0.1
0.0
−4 −2 0 2 4 −3 −1 0 1 2 3
x x
• Became popular only after introduction of Gelfand & Smith’s paper (1990)
Sketch of algorithm:
Metropolis algorithm:
Chain is at ✓ k ) Metropolis algorithm samples value ✓ (k+1) as follows:
e = probability of a move
Function ↵(✓ k , ✓)
(a) (b)
2.6
2.6
2.4
2.4
2.2
2.2
σ2
σ2
2.0
2.0
1.8
1.8
1.6
1.6
1.4
1.4
6.6 6.8 7.0 7.2 7.4 6.6 6.8 7.0 7.2 7.4
µ µ
2
Jumps to any location in the (µ, )-plane
Burn-in = 500, total chain = 1,500
Marginal distributions:
(b)
3.0
6 (a)
2.5
5
2.0
4
1.5
3
1.0
2
0.5
1
0.0
0
6.9 7.0 7.1 7.2 7.3 1.6 1.8 2.0 2.2 2.4
µ 2
σ
Trace plots:
(a)
7.3
7.1
µ
6.9
(b)
2.0
σ2
1.6
2.6
(a) (b)
3.0
2.4
2.2
2.0
σ2
2.0
1.8
1.0
1.6
1.4
0.0
6.6 6.8 7.0 7.2 7.4 1.5 1.7 1.9 2.1
µ 2
σ
Metropolis-Hastings algorithm:
Chain is at ✓ k ) Metropolis-Hastings algorithm samples value ✓ (k+1) as follows:
e = probability of move
• Reversibility condition: Probability of move from ✓ to ✓
e to ✓
from ✓
e | ✓ k ) ⌘ q(✓)
• Example asymmetric proposal density: q(✓ e (Independent MH
algorithm)
(a) (b)
0.30
0.30
0.20
0.20
0.10
0.10
0.00
0.00
−5 0 5 10 −5 0 5 10
t t
Only possible jumps are to parameter vectors ✓e that match ✓ k on all components
other than the jth. Then ratio r in the jth substep:
e | y)q G(✓ k | ✓)
p(✓ e e | y)p(✓ k | ✓e j , y)
p(✓
j j
r = =
e | ✓ k ) p(✓ k | y)p(✓ej | ✓ k , y)
p(✓ k | y)qjG(✓ j
e | y)/p(✓ej | ✓ k , y)
p(✓ j
= k k e
=1
p(✓ | y)/p(✓ j | ✓ j , y)
) each jump is accepted
• Jump in 2 components:
. First component (move): K(✓, ) = ↵(✓, )q( | ✓)
move to = ✓ e suggested by the proposal density q( | ✓) and accepted with
probability ↵(✓, )
R
. Second component (stay): r(✓) = 1 ↵(✓, )q( | ✓)d
IRd
probability that no move is made, i.e. = ✓
Reversibility condition:
= Probability to move from set A to set B = probability to move from set B to set
A (any sets A and B in ⇥)
Z Z
p(✓, B) d✓ = p( , A) d
A B
AR algorithm:
MH algorithm:
e | ✓) = q(✓
• Proposal density: q(✓ e ✓), e.g. q(✓e ✓) ⌘ q(|✓
e ✓|) ) proposal
density is symmetric and gives the Metropolis algorithm
. Multivariate normal density: WinBUGS & SASr procedures
. Multivariate t-distribution: SASr PROC MCMC for long tailed posteriors
• Proposal density: does not depend on the position in the chain, e.g.
e | ✓) = Nd(✓
q(✓ e | µ, ⌃)
e when p(✓
• Similar to AR algorithm but accepts ✓ e | y)/q(✓)
e > p(✓ k | y)/q(✓ k )
• High acceptance rate is desirable when proposal density q(✓) is close to the
posterior density
• If p(✓ | y) A q(✓) for all ✓, then the Markov chain generated by the Independent
MH algorithm enjoys excellent convergence properties (Theorem 7.8) and that the
expected acceptance probability exceeds that of the AR algorithm (Lemma 7.9)
• WinBUGS: regression coefficients in one block (blocking option switched on) and
variance parameters in other block
• Theorem: (Markov Chain Law of Large Numbers) For an ergodic Markov chain
with a finite expected value for t(✓), tk converges to the true mean.
The MH algorithm creates a reversible Markov chain, i.e. a Markov chain that
satisfies the detailed balance condition.
Proof discrete case:
• ⇡j = p(✓ = xj )
• Q = (qij )ij : matrix that describes the move from xi to xj with probability qij
⇣ ⌘
⇡j qji
• Probability that a move from xi is made to (6=) xj = ↵ij = min 1, ⇡i qij
) ⇡ is stationary distribution
) MH algorithm creates a Markov chain where the target distribution is also the
stationary distribution
+ Extra verifications show that LLN and CLT for ergodic chains can be applied
Verifications show that LLN and CLT for ergodic chains can be applied
. Research questions:
Have girls a di↵erent risk for developing caries experience (CE ) than boys
(gender ) in the first year of primary school?
Is there an east-west gradient (x-coordinate) in CE?
. Bayesian model: logistic regression + N(0, 1002) priors for regression coefficients
. No standard full conditionals
. Three algorithms:
Self-written R program: evaluate full conditionals on a grid + ICDF-method
WinBUGS program: multivariate MH algorithm (blocking mode on)
SASr procedure MCMC: Random-Walk MH algorithm
• Posterior means/medians of the three samplers are close (to the MLE)
• Precision with which the posterior mean was determined (high precision = low
MCSE) di↵ers considerably
• Applications:
Mixtures with an unknown # of components and hidden Markov models
Change-point problems with an unknown # of change-points/locations
Model and variable selection problems
Analysis of quantitative trait locus (QTL) data
• Theory is complex:
Idea: create 1-to-1 function between the spaces of di↵erent dimensions
Construct a MH-algorithm that satisfies detailed-balance condition
Qn ⇣ ⌘y i
(1/+yi ) 1 1/
• Negative binomial model: L( , | y) = i=1 (1/) yi ! 1+ 1/+
Two models:
• Four settings
. Preference was measured by % of times the Markov chain was in model 2
(negative binomial): between 56% and 74%
. A suggested move from model 1 to model 2 was always accepted
. Percentage of trans-dimensional moves: between 32% and 55%
10
12
8
8
10
6
6
8
λ
κ
6
4
4
2
2
0
0
0
0 500 1500 2500 3500 0 1000 2000 3000 4000 0 1000 2000 3000 4000
Iteration Iteration Iteration
0.4
0.30
0.3
0.3
Density
Density
Density
0.20
0.2
0.2
0.10
0.1
0.1
0.00
0.0
0.0
0 2 4 6 8 10 0 2 4 6 8 10 12 14 0 2 4 6 8 10
λ λ κ