Академический Документы
Профессиональный Документы
Культура Документы
MC Lecture 2 p. 1
MC Lecture 2 p. 4
MC Lecture 2 p. 5
MC Lecture 2 p. 6
MC Lecture 2 p. 7
Matlab information
www.mathworks.com/moler/random.pdf
Wikipedia information
en.wikipedia.org/wiki/Random number generation
en.wikipedia.org/wiki/List of random number generators
en.wikipedia.org/wiki/Mersenne Twister
MC Lecture 2 p. 8
MC Lecture 2 p. 9
MC Lecture 2 p. 10
N(x)
0.3
0.2
0.1
0
4
0
x
4
MC Lecture 2 p. 12
MC Lecture 2 p. 13
4
3
0.8
2
1
1
(x)
(x)
0.6
0.4
0
1
2
0.2
3
0
4
0
x
0.5
x
MC Lecture 2 p. 15
1
1
1
(x) = 2 + 2 erf(x/ 2) = (y) = 2 erf 1(2y1)
This is the function I use in Matlab code:
% x = ncfinv(y)
%
% inverse Normal CDF
function x = ncfinv(y)
x = sqrt(2)*erfinv(2*y-1);
MC Lecture 2 p. 17
MC Lecture 2 p. 18
MC Lecture 2 p. 19
U = U
then
= U U T = L LT
where
L = U 1/2 .
Final advice
always use mathematical libraries as much as
possible
usually they will give you uncorrelated Normals, and
you have to convert these into correlated Normals
later with stratified sampling and quasi-Monte Carlo
methods, we will use the inverse cumulative Normal
distribution to convert (quasi-)uniforms into
(quasi-)Normals
MC Lecture 2 p. 22