STAT 380 Lecture 24
Simulation
Monte Carlo computation of expected value:
To compute : do experiment n times to generate n independent observations all with same distribution as X.
Get .
Use
as an estimate of
To estimate : use same and compute
Random Number Generation
In practice: random quantities are not used.
Use: pseudo-random uniform random numbers.
They ``behave like'' iid Uniform(0,1) variables.
Many, many generators. One standard kind: linear congruential generators.
Start with an integer in range . Compute
Here the mod means compute the remainder after division by m.
Integers a and b are chosen so that
fills up as much of the square .
Use
as Uniform(0,1) random numbers.
General Random Variables
We now pretend we can generate which are iid Uniform(0,1).
Monte Carlo methods for generating a sample: