This preview shows pages 1–3. Sign up to view the full content.
Elementary Simulation
Idea:
Numerical simulation allows us to get approximate results to all kinds
of probability problems, that can’t be solved or diﬃcult to solve analytically.
Basic problem:
1.
X,Y,
···
,Z
are independent random variables
2.
g
(
x, y,
,z
)
,
is an arbitrary function deFned on
R
k
3.
V
=
is a random variable of interest, e.g.
X
−
Y
or
/
(sin(
Z
)+1)
etc
We are interested in evaluating
P
(13
<V <
17)
E
,Var
etc.
Unless
is simple,
is small, and we are LUCKY, we may not be able to
solve these problem analytically or explicitly.
How to obtain these via simulation?
1
Simulation Framework
±ramework of simulation:
1. Generate some large number (say
n
)ofvaluesforeachofthe
variables
. We then have a set of
nk
tuples of the form
i
,Y
,i
=1
,n
Plug each
into function
and evaluate
for each
tuple:
3. Then:
(a)
a
≤
b
is approximated by
±V
:
∈
[
a, b
]
2
(b)
∑
.
e
)=
¯
(c) Var
Example:
Estimate the expected value of the mean of a sample of size
(say, 100) from an Erlang distribution
Erlang
(4
2)
, i.e., want
μ
where
+
...
100
and
,X
,...,X
iid
∼
To do this using simulation, we need to genearate
N
samples each of
size 100 from the
distribution, calculate the average from
each sample, then average them over the
samples. i.e.
,...,
istheaverageofthe
th
sample. The
larger
is, the more accurate this estimate as the standard error is reduced.
3
Random Number Generators
All of you will be familiar with those questions from an IQ test, where you
are supposed to Fnd the next number in a sequence. Possible sequences
could be:
1. 1,3,5,7,9, .
..
2. 1,4,9,16, 25, .
3. 1,4,1,5,9,2,6, .
4. 4, 1, 5, 3, 9, .
Can you guess the rules of them?
4
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document Random Number Generators (Cont’d)
♣
The rules behind the frst two sequences are trivial
♦
The third one is tricky. OF course, there are infnite many possibilities to
produce the same fnite stream oF numbers.
♠
The Fourth sequence was produced by the Function
x
i
+1
=(2
+3) mod10
i.e. take the last number, multiply it by 2, add 3 and take only the last digit
to get the next number in the sequence. The next number would thereFore
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 02/01/2012 for the course STAT 330B taught by Professor Zhou during the Spring '11 term at Iowa State.
 Spring '11
 Zhou
 Standard Error

Click to edit the document details