PEMBANGKIT VARIABEL RANDOM

May 1, 2019 | Author: Dinar Resita Cesilvrenia | Category: N/A
Share Embed Donate


Short Description

Download PEMBANGKIT VARIABEL RANDOM...

Description

BAB II LANDASAN TEORI

2.1

Definisi Program Yang Digunakan

Dalam mempelajari simulasi, sesuatu yang dibuthkan adalah kemampuan dalam membangkitkan bilangan random, dimana apabila merandom sebuah data, maka yang keluar adalah data berdistribusi uniform (0,1). Dalam pembahasan di bawah ini, akan dijelaskan mengenai bagaimana membangkitkan data variable random. Pemba embang ngki kita tan n

Bila Bilang ngan an

Acakcak-

Pseud seudor oran ando dom m

Numb Numbeer

Gene Genera rati tion on

Pseu Pseudo= do= semu semu seola seolah-o h-ola lah h apa apa yang yang dira dirando ndomk mkan an berd berdis istr tribu ibusi si unifor uniform m (0,1 (0,1)) Satu hal yang paling sering digunakan dalam pseudorandom generation yaitu dimulai dengan X0, sehingga nantinya akan didapatkan Xn, dimana Xn=aXn-1 modulo m Misalnya: a=2, m=5 , X0 = 3 X1= 2(1) modulo 5 =1 Xn=aXn-1 modulo m X2= 2(3) modulo 5 =2 u = Xn/m ~U (0,1) X3= 2(2) modulo 5 =4 X~U (a,b) X4= 2(4) modulo 5 =3  Note: modulo adalah adalah sisa sisa hasil bagi suatu suatu bilangan bilangan dengan dengan suatu nilai nilai (dalam kasus ini menggunakan nilai m) Misalkan ada suatu digit angka sebagai berikut:

I=1 II = 3  Modul II  Dinar Resita Cesilvrenia ( 0932010027 ) Senin I / Meja C

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

III = 7 . . . III … I = … unt untuk meng menget etah ahui ui bila bilang ngan an deng dengan an 32 digi digit, t, maka maka dapa dapatt dike diketa tahu huii deng dengan an:: 2k-1 dengan k=1,2,.. Sehingga didapatkan III … I(hingga 32 ) =232-1=4294967295 Contoh pembangkitan data variable Random: 1. Distribusi Uniform

Seca Secara ra rand random om dida didapa patk tkan an U~U U~U (0,1 (0,1). ). Apab Apabil ilaa dibe diberi ri bata batasa san n (a,b (a,b), ), maka maka menghasilkan

pembangkit

variabel

random

sebagai

berikut:

X = U(b-a)+a dengan a=batas atas dan b= batas bawah 2. Distribusi Exponensial

Dapat diketahui bahwa, f(x)= (1/β)e-x/ β F(x)= 1- e-x/ β, dengan β=1, maka menjadi F(x)= 1- e-x Apabila Apabila U adalah suatu bilangan random dari data berdistribusi berdistribusi uniform(0,1), uniform(0,1), maka  pembangkit  pembangkit variabel variabel randomnya randomnya adalah sebagai sebagai berikut: berikut: U = 1-e-x U-1 =- e-x

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

-x = ln U x =- ln U 2.1.1

Fungsi Fungsi Pembang Pembangkit kit Variabe Variabell Random Random berbag berbagai ai Distribusi Distribusi dengan dengan Pasca Pascall

Berikut Berikut Daftar Daftar Distri Distribus busii yang akan akan diberi diberikan kan fungsi fungsi pembang pembangkit kit variabe variabell randomnya : 1. Distribusi uniform 2. Distribusi Eksponensial 3. Distribusi Normal 4. Distribusi Lognormal 5. Distribuso Weibull 6. Distribusi t-student 7. Distribusi fisher  1) Fungsi Distribusi Uniform

Function Uniform (a,b : double) : double; Var u : double; Begin u := random; Uniform := (b-a) * u + a; End;

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

The world's largest digital library

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

Function Eksponensial (beta : double) : double; Var u : double; Begin u := random; Eksponensial := -beta * ln(u); End; 3) Fungsi Distribusi Normal

Procedure Normal (mean,variance : double ; Var z1,z2 : double); Var u1,u2,v1,v2,w,y,x1,x2 : double; Begin Repeat u1 := random; u2 := random; v1 := 2 * u1 – 1; v2 := 2 * u2 – 1; w := sqr(v1) + sqr(v2); if w
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF