Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Pertemuan #5 Generating Random Variates

Presentasi serupa


Presentasi berjudul: "Pertemuan #5 Generating Random Variates"— Transcript presentasi:

1 Pertemuan #5 Generating Random Variates
Matakuliah : H0332/Simulasi dan Permodelan Tahun : 2005 Versi : 1/1 Pertemuan #5 Generating Random Variates

2 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : Generating Random Variates

3 Generating Random Variates
Outline Materi Generating Random Variates

4 Random-Number Generator and Generating Random Variates

5 1. General Approaches Inverse Transforms Algorithms:
Generate U ~ U(0,1) Return X = F-1(U) Kekurangan inverse transform method adalah: Tidak semua distribusi memiliki fungsi F-1, contoh distribusi normal dan gamma Fungs F-1 tidak sederhana sehingga lambat membangkitkan random variate

6 1. General Approaches (cont.)
Inverse Transforms Algorithms: Generate U ~ U(0,1) V = F(a) + [F(b) – F(a)] U Return X = F-1(U)

7 1. General Approaches (cont.)
Composition Algorithms: Generate a positive random interger J P(J = j) = pj for j = 1, 2, … Return X with distribution function FJ

8 1. General Approaches (cont.)
Convolution Algorithms: Generate Y1, Y2, …, Ym IID each with distribution function G Return X = Y1, Y2, …, Ym

9 1. General Approaches (cont.)
Acceptance-Rejection Algorithms: Generate Y having density r Generate U ~ U(0,1), independent of Y If return X = Y

10 1. General Approaches (cont.)
Special Properties case by case

11 2. Generating Random Variates
Uniform Algorithms: Generate U ~ U(0,1) Return

12 2. Generating Random Variates (cont.)
Exponential Algorithms: Generate U ~ U(0,1) Return x = - b ln u

13 2. Generating Random Variates (cont.)
Normal The given X ~ N(0,1), we obtain X’ ~ N(m, s) by setting X’ = m + sX Algorithms: Generate U1 and U2 as IID U(0,1), let Vi = 2 Ui – 1 for i = 1, 2, and let W = V12 + V22 If W > 1, go back to step 1. Otherwise, let Then X1 and X2 are IID N(0,1).

14 2. Generating Random Variates (cont.)
Poisson Algorithms Poisson Processes: Generate U ~ U(0,1) Return ti = ti-1 – (1/l) ln U Algorithms Nonstationary Poisson Process: l*= max {l(t)} Set t = ti-1 Generate U1 and U2 as IID U(0,1) Replace t by t – (1/l*) ln U1 If return ti = t. Otherwise go back to step 2

15 2. Generating Random Variates (cont.)
Poisson Algorithms Nonstationary Poisson Process: Generate U ~ U(0,1) Set t’i = t’i-1 – (1/l) ln U Return ti = L-1(t’i)


Download ppt "Pertemuan #5 Generating Random Variates"

Presentasi serupa


Iklan oleh Google