Lectures 6
Lectures 6
6-1
Monte Carlo Integration
6-2
Monte Carlo Integration
6-3
Generating Uniform Random Variates
6-4
Generating Non-Uniform Random Numbers
Y = F −1(U )
has a distribution with cdf F .
6-5
Generating Discrete Random Variates
6-6
Special Methods
6-7
Accept/Reject Algorithm
6-8
Accept/Reject Algorithm
3. If
fY (V )
U <
M fV (V )
then set Y = V . Otherwise discard U and V and return to
step 2.
6-9
Markov Chain Monte Carlo Methods
∗ Many of the methods described so far are not very useful for
generating multivariate random variates.
6-10
Markov Chain Monte Carlo Methods
∗ These algorithms start with some initial value for the random
variable of interest.
6-11
Metropolis–Hastings Algorithm
6-12
Metropolis–Hastings Algorithm
6-13
Independence Metropolis–Hastings Algorithm
6-14
Random Walk Metropolis–Hastings Algorithm
6-15
Gibbs Sampler
6-16
Gibbs Sampler
(0) (0)
Initialise the chain to some value Y (0) = Y1 , . . . , Yd .
For t = 1, 2, . . .
(t) (t−1) (t−1)
1 Generate Y1 from f1 y1 | Y2 , . . . , Yd .
(t) (t) (t−1) (t−1)
2 Generate Y2 from f2 y2 | Y1 , Y3 , . . . , Yd .
...
(t) (t) (t) (t−1) (t−1)
j Generate Yj from fj yj | Y1 , . . . , Yj−1, Yj+1 , . . . , Yd .
...
(t) (t) (t)
d Generate Yd from fd yd | Y1 , . . . , Yd−1 .
(t) (t)
Then we set Y (t) = Y1 , . . . , Yd .
6-17