Note: If x and y are uncorrelated then their covariance and the correlation coefficient is zero, hence
E[xy] = E[x]E[y]. “Statistically independent random variables are always uncorrelated, but uncorre-
lated random variables can be dependent. Let x be uniformly distributed over [−1, 1] and let y = x
2
.
The two random variables are uncorrelated but are clearly not independent” [
8].
3 Generate Random Variables
The “Monte Carlo” name is derived from the city, with the same name, in the Pr incipality of Monaco,
well k nown for its casinos. This was because the roulette wheel was th e simplest mechanical device
for generating random numbers [
10].
“A sequence of truly random numbers is unpredictable and therefore unreproducible. Such a se-
quence can only be generated by a random physical process” [
7]. Practically it is very difficult to
construct such a physical generator, which has to be fast enough, and to connect it to a computer. To
overcome this problem one can use pseudo-random numbers, which are computed according to a
mathematical formulation, hence are reproducible and appear random to someone who does not know
the algorithm [12].
John von Neumann has constructed the first pseu dorandom generator called mid-square method.
Suppose we have a 4-digit number x
1
= 0.9876. We s q uare it, x
2
1
= 0.97535376, obtaining this way a
8-digit number. We obtain x
2
by taking out the middle four digits, hence x
2
= 0.5353. Now square
x
2
and so on. Unfortunately, the algorithm tends to produce disproportionate frequency of small
numbers [
10].
One popular algorithm is the multiplicative congruential method suggested by D.H. Lehmer
in 1949. Given a modulus m, a multiplier a and a starting point x
1
, the method generates successive
pseudo-random numbers by the formula [
7]:
x
i
= ax
i−1
Mod(m) (9)
4 MC integration
Let f (x) be an arbitrary continuous function and y = f (x) the new random variable. Then the
expected value and the variance of y:
E[y] = E[f (x)] =
Z
b
a
f(x)p(x)dx (10)
V ar[y] = V ar[f(x)] =
Z
b
a
(f (x) −E[f(x)])
2
p(x)dx (11)
Note: E[f(x)] 6= f(E[x]).
Our goal is to calculate th e expectation of f(x) without computing the integral. Th is can be achieved
by using a MC simulation.
3
评论0
最新资源