Download as pdf or txt
Download as pdf or txt
You are on page 1of 52

Stat H-307:Simulation 2 Credits

Introductory Examples or Simulation, Estimation, and Graphics: Simulating randomsamplesfrom


fimte populations, Coverage probabilities of binomial confidence intervals
Generators: Introductory comments on random numbers, Linear congruential generators. Validating
desirable properties ora generator, Transformations of uniform random variables
Generating random samples: Transformationsinvolving normal random variables using Box-Muller
method, Marsaglia method, Direct method, Indirect method, Acccpt/Reject algorithm, Generating data
from different distributions such as Binomial. Poisson, Exponential, Gamma. Beta etc.
Monte Carlo methods: Buffon•s needle experiment. Monte Carlo integration and limit theorems, Law Of
Large Numbers. Central Limit Theorem
Variance reduction techniques: Antithetic sampling. Stratifiedsampling. Importance sampling and
Control variates methods
Screening Tests: Prevalence. Sensitivity, and Specificity, Estimation of Prevalence, Predictive values,
Bayes' theorem for events
Metropolis algorithm: The Metropolis algorithm, Mathematicalformulation and Hastings's
generalization, Some special algorithms such as Random-walk Metropolis. Metropolized independence
sampler. Configurational bias Monte Carlo.
Markov chains and Gibbs sampler: The Markov property,transition matrices, Limiting behavior of a
2-state chatn. Idea of the Gibbs sampler, A simple Gibbs sampler. Gibbs sampling algorithm with
Illustrativeexamples.

Text
Suess. E.A. and Trumbo. B.E. (2010). Introductionto Probability Simulation and Gibbs Sampling with
R. Springer, New York.

References

Ross, S. M. (2012). Simulation, 5thedition, Acadcmic Press, London.


2. Casella. G. and Berger, R.I. (2002). Statistical Inference, 2nded. Duxbury press, CA.
3. Dunn, W.L. and Shultis. J.K. (2012). Exploring Monte Carlo Methods. Elsevier, Oxford.
4. Glasserman, P. (2004). Monte Carlo Methods in Financial Engineering. Springer, New York.
5. Jones, 0., Maillardet, R., and Robinson, A. (2009). Introduction to Scientific Programming and
simulation using R. Chapman & Hall/CRC, London.
6. Liu. J.S. (2001 Monte Carlo Strategies in ScientificComputing. Springer, New York.
7. Ross, S-M. (2007). Introduction to ProbabilityModels, 9thed. Elsevier, Oxford
-lhe 'trr%Gon -Ihno h
prč6QQős
—I-hQ—
nQ QnG-Gon

ORen hôt-o
mary madr
ôy±Qrn Is on
be dan rous

us n 0Qô6ion modeL,

Me.l-hod L p Q

, qus-Bon mtLK& t-oorckô

ôi , weQ-on-Rňd .
onsu3Qrô

QOIIQ

qeneĺca±--ln

dm.Äla-bon,

simu la-Gon
1
Ph oical
et- col obdQåö art-c sub5Khrtrl
-these ph 6ic«l
Qh06enWoaug• *hey ane 6
A-hon A-he—

00

--—-rOoodzn meQhan;caC ub0Å—


oortld C.
ROQk5 u.4Q& dßenodas

hQrnan .

00

--3 6imuIa-hon

Osm
'16 an DQQ\—
e-Hcol Gmub-fion compo-Orö
o s-l-em aonR5
hoo —Y-he_
00 O@en
anal
4011.cGonsart-a. no-E ahen an
3>11-R-Hong eompt±ør-c

Mlor{c Oar-cb Me-Vhod3•o

Oar-zlo mel-bods m Olass


on ru?ea-bQ-cL
random ampli'
TTC-B-•odsheavi Uso— rcandorrf orc pseudo
random number-ø-b
6 o.rTI sc- OlccBons
heeds —10 be-MQTT}-RCA—.

x N exp
2

aru

401-0-—
orc ac —L
一ㄈ 0一c
一M
— -1-
IOU-ccQ) 104(2-)

Aldord±hrn Cartlo Mel-hod)


oagæ, Montc —Vhc

domato S--
(G) randomlÅ—ßorn -4-hc dome-fin
bÆon .
EsGmaGon

Di amaep

an GF

1 auaru— 6Q<) on 4E uncL,


t09Q_ròìbQ— QiròolL
Q) borne- off unGrn
6'IEQ.- --1-hròotk "u.ar-t.Q__

no. -4-hQaQìròQl-L b

YCe.—oan
numbQFQ
dn , —Che- cal ts—10 an

prcaŒbl dl
Qom --1-hqe
@ 1--6codo Y-fQ-obea?n I¯e-oodomnuobnrz_ò ?

QOìT)

I's Cheo.&)
Hòodc.xus as
numbaos A-hrò h

man dom 4-

hund,t-uas
millions Fr-zondom nt.«mberò
60 abo
--400 prurdl'cnl
Qanbu Œ)mea
T-candom rumber-t_lb
心調。
心x ~十 朝,り

) 供= 0, b 亠
x ~从
いCo , り
Pd+: 子(リ= 生) 。くく仁ー


d =。 イく上
① 歸ー ~。
四。昨un 、髓 ー

ーaび.
0くく


FYIV=PCY&&D
び分. ーaRd 乢


生ー2
「p Ce¯ay
-rhus, y

enerccł-î d% an
unłânm
re-rcăŕ daă —frčorn
bŕŕon . —Iha-
șcarubblQ —ł-he-&• dmslrtQ-d- .

@ hava——boo dęnertal mełhodn

4hQ- a
-+dc UCU
has --ł-be-dedpcd dig-łaîb&îon ohen C)
s-ce—Qan qpp& d; rĂQ-țE-rndhțd—•

exponefił-$aLdle :
ILE—X e--x_p ;
atx---.
k xto
4 (u) = L ) 04 UZ L

PCI—Vf)

L) VI , OL, ) on

arte
@ EGOS

0ㄑ乂罓


Ohen

x。+ Y +Y
•hen ~ ammaCQ'Ä)

n = 00

~0 00
ammo Ca , h o--

ohen a , arnrnæ
random TavGablQ— *he- Surn of- cm ;n8npendtöC
W
eaQh €0F±hparamo€era h . S
-Ihm-El

coherto-.Y)'cvO(PCfi) fndqoendkÆt
•hen amrnaca,fi)

Cnener-c+ UI •

f) 5{eps n-fimes
n —tooo
tarnrna( Q=-v)
YL@KP) YL(ekP

100b 100 D 1000


Chi squarer di'fni bur4=iøn%
@ Pela-Hon be-heen
(DC2A , (6 on

parcar-spbrö
ammo Random
CIn+Q-dert)and B —hQ i.e. mean
random df Qa

t) &
meao=
-Leu a Cheru mean =--

Vj , L) , 'Indo-pen
-T%en

: is eves
9 Cqenot-ca€
, VL,
Q) Tao nGør-n

b 2 , '3 + ener--cæn oboorva$ons.

We— t1ÖQ_
{he above 01
OC rondom vat-ciab(Q
-föom 4 above

肀K =
用 0 ロ庇ト

つ2n0 ロ。
を一(I) l)の ・
On

のE い
り朷

廴の
2ち

の確 ロ 。・ レ、
言 m レ%、
田ろ怦一:
0くをく〆
0くく

の し・
な れ廴 ー
0 & b&b) 。 。
od. pe & 廴

+プ
スっX+ー
ト ソ~ pe心


ma ( ~
on an 土Y .
0rG4hm

: 0、
000

3
n= ー
000
=ら
区 , p , 牛ー
n = -ユ000 / 十 -ー イ・
肝 --ー80
g00 2D0
の式刈=

止, p墜 勾

子 d久n
⑨ 。 レ
しら。cm まm ー

3つワ

物ワ
me
enet-töte
b tRh'on Q

Box orGEbm:
Ibe- '16
alUor-GEbm Ttardom
number-c 6ampli%- ma-bhod----föröQnertct-G pains
, 6-bndar&cl-, non ma
Random rumben6, Yen Ld-—
random numbe-r¯QS •

nororn«C
X andY
•ear-GabUö .—thc and is,
y) = and y

rye

Wc Oilt —Ebe d\3fröiblßon R


b 000b; on

ace)
Nーd (り

2m
, 0く&ぐ乂
亠 -ー
0く0 く2 ---
丁ト
をma

亠-c

0くdく
久.- 27i¯
亠ー ー
ら0 くく 3 入ー

しE208

d = ro -乂 -びd =羂 ユ

y =、ーs;n9



。n hoa
ぼ:

?
2の

亠・) 0くく

ク= ら
じコ

。 → 。毬
, 廿6 pつ m。-廴

つ下。
ぃも d

Y引 れ生
今し R 以の
&プ

ラ= 2 廾--ユ
0
@ &enęr--tcĄ• d Îsor•zdî d Î5fr$btkËory
Fon (ena-ta-G Gom dî3%îbđ-Îoo,wc havc
+0 denet-tŕ —âm un6ŕtrn
—ł-hehdp
—Gn&łîon
borne-înequalł-łîes 0$ unÎÔnrn
dÎ5ŁÂ 3 an
pcłr-(GcuIcxrr •m)u-Q-
dîscr-cd:c dż5hĐîbtĂkÎon

exarnŕc t.xŁ—wg
eonsîOr-c a dî3%ÎbaGoruag

poc) 00
țC-ț) O'Q—

Rdorâ+n
6Tęner-cđb7UN

On
c x=l.
NE', X —o Îff 0<0' Q—

Cnenęrołîdîba-îom bQr-moullł•dÎ6łDîbcaĂon
tLł-»
Ă (

L) Csłenęrzfr qn;-ŕCo, 9

elSQ-, X= L

¯îom bÔnomî"

K= c Fô bąrcnoullî±îals)
=0 6UQQŔ9BP
Qrd
o
o

—Gom biro
n ob6Q1•-cVäGon

¯Then X i —Gttoas b)nomta

dioIr{bÆon
X = No. F calls

&115in Cho
K Ce) = NO • o-•e omur-ŔrąnQ_Q_ bą-bąen C ô)+-D
X (+) po;sson (

= amatxTțE —łîme__bołtmen o

Zn d cĄn&

po;son C aș

pec(9

Noa, p
pQXĐ=ô

5mÎLor(l) o

e-xŕ Ca)
一。poLson
-

サ走ー
第。amoun
d這4 ト缺込n .

土 ~ い son( a)

ウxー
。工

0亠
0 0当1 生
-7x +プ
匹く上ソ 習パも生

6Kく生。融5k 嗣汐ム
+ なキ- ー+ プロ
匸6K = プ・

X—
—Gom anfrco,L) ,
61 —

62 to (Ol) t04

and k
and- (b) —Hm
es
Ort

52 (09
の5
110 PO

500n

走 小 。amoun ー辷ー —Gme 4い



吐十。0 〇。ロ尺0--
n。 0、 as &5 炻 「。n.

し土 ~ い 5 。。( a丿
0亠

ウ x ー。子 工
ウ 生手 く上 and ソ、
~ プ~ ン ム
0 0生 1生
、プ匹く 上 。
ソ・ ソ、 パ も 生


爪止 立,
ー--
X—R 6Kく生。融 5
匸6k = + 立キ- ー+ プロ
訪h ー
m四ノ
( (0 01
0
2
10 CO

リ 分 「 ン上 一 , ,亠 ,

Ortノ

ちと 2
and
5-1 D on: ×~
,V=0

~ or-uehm

is drfneÅ
5 " no. of 廴一 ~4 彐 " p
:
numbQ-r(ô
?sec.k40-rondom numge-câs OF--Q—
nurnbe.Rô-f-hâŕ behąyą,
pose, 0$

Lirparc Con
Qomroon rnełho&
condom numberc_șon Îș tine-orc
QO raua%l . lihnur--c ągn roven-hQl
Țôî QQQora.În
małhe-mcEQoJ

-ară în-ł-e
H-Q_ru.-, -±he.. b
ana 03—+he •

e-*.ampCQ-,
0
modâ. 3

-The— 6-ł-ąrr}ș ÎtmłQ--đ

dąnerc-a%r-c Q.an
O, 1,2-
9) op b denârza+oft Îs
And- Pî Qannoe- volu-ą_o.

ĐForč b -f-hą_ SQąULOQA— of—


--1he_oąrercă+or-c fis 5ł-araefQ&
same
rnucórcs be- belpGl 40

shuffu_-b-he— FL
în a , -Forc QonYąnł•ąnQQ_)
numberc
-łhem l, L, • . Qpnôîd.Q-țQ—łhe
b d î 'B =2aŕôOb-łaîn •r-ł3
Co rondom nuumbęr-c$

-Yb (nod

59Y-flQ-o
QLOD mod
P = Q20) CE)-ł-o mod 2G 53
C2-940 ma
4 50
QQO) 5B IQ—
= mod 28
= mod 00
mod =I
(20) (Qq)-ł-ô mod 5B
(20) ( 2L)ż-p 53 IG
59 = Q-
00) (L) +0

(20) c
CQo)(4+-0 rnrd
66 (Co) CY)-t-o mod 2-6

QQo)(Oo)-to mod 'Η

...-7 , QÎn ,

--7 r-čuns -łhnowoh 52_ numurcs


bcâA._ PQ.peo±s

—-7 Can SQe- +hQ— nepeołs OE ta


60 -ibe- perub& *his îB 52—
pen-iod er finea-t--ceonar-ctag-n-fial 4haE
producgæ all brae
hayc .2
pot-doe
--7 h06 beuugc onl aru
poas')blm o.- deneru-boo@Vbh ryvdu)v'

@ No-b all met-cnioros per-God_,

= 2g , d ,s *hen +he

= mod
= Cæg)C9+0

——@g) mod =
, off per-cjcd .

@ Qus-bma -I-o pest-ulc-\he- valuas rot ot.ftd--


oonuröu-cnffal A-he

wc Can eon6)tder-c- of Talu-Qs


orc —
破x ~ヂ区
) weの。ー52 伏い 。一
江 1 s

same 翡" 。 Qan 2。。 。。。几


0ヒ・

m久
廴呶

円rGEhrn

りu く亠 五 ソ 6士 X= プ 。色 。
市 (リ

亠-傘 プ 丿ニ0緲・
5。
, Seb-x 一りu く。・
)らコ
=p 4 引 u くユー
Uノ .-、

坦ー
p0 刄く 丿
p( しく- ツ = PChag
dCV

NoO'

Pい- ) Uくー

so + h・ &し 遯 。の ソ


8 つ=諏わー

d

d
M (

Pはリ =

~ 血 ー0の パ Al5 com 辷 @釞の の 、


? =pc。
く繹丿 ー
0廴2 ㄢ
0 ,丄

eon、
d :
0 '29 0 · 0 , 26

。 0 丄 02

一7
一40 …7
乃0 ソ ) 一
生く乂
く生

H= り仁
例 。に吐トm :

「Uく
りで 一
(、 七トを。 1ぐ もり
つ, ぅ
プ ・

市 も: ー
2メ ・
0く
く 0

P( 6 =リ

生 , 村Q-で訃 matimum
阯ー nむ
Q—
4に 破 ー, H = 2色
00

Y epQa —L) , v N'

10dU'

04-hg-toise—
7

(1) and (2) as r-u-tu-i


3)

goal I ,—I-oob4uin appt


e) Olener±
Cb) , if 04her-tobC
⑩ イe勾= -] 。くく

ー- ) 土く乂くグー

ン- rcの0

0[ : んロ0く
ら 乂イ)
を)= を = をた
0・


生く乂くQ—

屮ー
の 」 子。

0くし
ぐー

' YニQu

ェくく亠
ーO

fo
Ator-t ikhrn :
un+(o,
Q- V< 0.5 -hoanfr-crn X = LU

909 2—

Emplain hoo eneröä€&

@CerTböaL 4heorum 00 CC LTD


X an orc 000-h%uoug
. Then ,

ohen n IQ

Eocornptz:Mme A-aken b 40
on-rd-a;o -Gr--crn has
no 01 di6{nibuEon mean
10m7r-) ood SD Q-rr$n
(a) 4he —I-b&—Ebe or-nouæ
—GrneHake" b t-candornl applicanE
TOC
ヨ he斗
止ー he
一 --
・ ken 7れ
rno


- 。
止 翡 日m

。 : , =-Hme +0

PQæ三 一
0 , の)

0の一
0

= p(を生ロり

42
OLT • usi
us QhQ@k Poisson (a ,
QôQ- dîfrr--cę_n-ł— n —ł-0
î5 ciQTTE- -60 4h%s 6?moto-l-îon

—ŁhÎs o -łhrčo
pr-co&6ô
Ci) poîsson ca—Q)
CÎÎ_) , mean n
Q0Ț4-îenuQ --ł-he-prčoQASS b

o ,
CΫ) O-hż@k

hÎs+o orn OB

-łhîs PnoQAôS
cv) Qhe-Qk n 10, LO) go, 9-0, 50 .

con QLȚ.

4-3
us QhQ@k QL¯r- -60 Poisson (a Qan
QôQ- dÎfrr-tQ_țł— 6-e n --ł-0 6,QQ oha-v-
n îs 6gffi ciQTTE- 4h%s

--&ÎĐ hQYe-- —-ł-odo --łhrčOtÂt) --ł-h@---âlloôind—


prą0QL6ô
Ci) n poîsson Ca—L)
,2...b.
mean n
Q0ț-ț-ÎOtI Q *he— prooQA-SS b .
and.

mem
Cî«) Cheok Ohe&her-c = o,
fDMară ,

-łhÎ5 ProoQASS--Gb n
'cv) QheQY— LO, LO) , , 50

4-3
rtoAu04ion cordilloni
We- V.mo,V ( y) —E
VCE(YIP) < v (7)
ILE,

-the -tlÒ0 $ )
morQ

Es-hr-ncrçon
Q-XQ-

oirò&_

p oj@QlL)
knoO 丿

4
, —hhc

Il tQ2du@Q-a

can -Ri,--éha-c t--tQ&L-4 --he-


ort-Q
-m. SincL U
n one hQMQ— Ahe- 6Äme-
YfQ—can oos :
--611

You might also like