Stat 451 Lecture Notes 0512 Simulating Random Variables
Ryan Martin UIC www.math.uic.edu/~rgmartin
1Based on Chapter 6 in Givens & Hoeting, Chapter 22 in Lange, and
Chapter 2 in Robert & Casella
2Updated: March 7, 2016 1 / 47
Simulating Random Variables Ryan Martin UIC - - PowerPoint PPT Presentation
Stat 451 Lecture Notes 05 12 Simulating Random Variables Ryan Martin UIC www.math.uic.edu/~rgmartin 1 Based on Chapter 6 in Givens & Hoeting, Chapter 22 in Lange, and Chapter 2 in Robert & Casella 2 Updated: March 7, 2016 1 / 47
1Based on Chapter 6 in Givens & Hoeting, Chapter 22 in Lange, and
2Updated: March 7, 2016 1 / 47
2 / 47
3 / 47
4 / 47
5 / 47
6 / 47
7 / 47
8 / 47
9 / 47
10 / 47
11 / 47
12 / 47
13 / 47
14 / 47
15 / 47
16 / 47
17 / 47
1 + · · · + Z 2 n .
18 / 47
19 / 47
20 / 47
21 / 47
22 / 47
3Not actually silly, it’s used in the accept–reject method... 23 / 47
24 / 47
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.5 1.0 1.5 2.0 2.5 Z U X Density 0.0 0.2 0.4 0.6 0.0 0.5 1.0 1.5 2.0 2.5
25 / 47
26 / 47
27 / 47
28 / 47
29 / 47
2 4 1 2 3 4 5 xx f(xx) X Density
1 2 3 0.0 0.2 0.4 0.6 0.8
30 / 47
31 / 47
1 2 3 4 5 6 1 2 3 4 5 6 7 x (Un-normalized) Density True Majorant x Density 1 2 3 4 5 6 0.0 0.1 0.2 0.3 0.4 0.5
4For some reason, majorant construction in my code only works for κ > 1... 32 / 47
33 / 47
−0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 0.0 0.2 0.4 0.6 0.8 1.0 z hα(z) 0.00 0.02 0.04 0.06 0.08 0.10 0.92 0.94 0.96 0.98 1.00 α Acceptance Rate
Ahrens−Dieter Best Kundu−Gupta rgamss
34 / 47
35 / 47
36 / 47
37 / 47
38 / 47
x Density 5 10 15 20 0.00 0.05 0.10 0.15
39 / 47
40 / 47
41 / 47
42 / 47
43 / 47
44 / 47
w Density 0.00000 0.00002 0.00004 0.00006 0.00008 0.00010 0.00012 50000 100000 150000 θ Density
0.0 0.5 1.0 1.5 0.0 0.5 1.0 1.5
45 / 47
46 / 47
47 / 47