Simulation - Random Number


A simulation is not real but it can represent the real. It’s because a simulation is an imitation of real situation - it can’t be exact but it can be approximate.

Most of simulation models are strated from generating random number because randomness creates value on a simulation modeling. It is really important to give an algorithm that produces a sequence of pseudo-random number (PRNs) $R_1, R_2,…$ that “appear” to be iid Unif(0,1). There are many different Uniform(0,1) Generators.

Output of random device

  • Nice randomness properties. However, Unif(0,1) sequence storage difficult, sot it’s tough to repeat experiment
  • Examples:
    • flip a coin
    • particle count by Geiger coutner
    • least significant digits of atomic clock

Table of random numbers

  • List of digits supplied in tables - A Million random Digits with 100,00 Normal Deviates.
  • Cumbersome, slow, table too small - not very useful

Mid-Square

  • Idea - Take the middle part of square of the previous random number. John von Neumann was a brilliant and fun-loving guy, but method is terrible
  • Example: Take $R_i = X_i/10000$, ∀i, where the Xi’s are positive
    integers < 10000.
  • Set seed $X_0 = 6642$; then $6632^2$ = 43983424
  • so $X_1 = 9834$; then $9834^2$ - 96707556
  • so $X_2$ = 7075, etc,…
  • Unfortunately, positive serial correlation in $R_i$’s. Also, occasionally degenerates; eg., consider $X_i$ = 0003

Fibonacci

  • These methods are also no good!!
  • Take $X_i = (X_{i-1} + X_{i-2})mod(m), i = 1,2,…,$ where $R_i = X_i/m$ ,$m$ is the modulus, $X_01,X_0$ are seeds, and $a = b mod m$ if $a$ is the remainer of $b/m$
  • Problem: small numbers follow small numbers
  • Also, it’s not possible to get $X_{i-1} < X_{i+1} < X_i$ or
  • $X_i < X_{i+1} < X_{i-1} $ (which should occur w.p 1/3)
  • $X_{i+1}$

Linear congruential (most commonly used in practice

  • LCGs are the most widely used generators. These are pretty good when implemented properly.
  • $X_i = (aX_{i-1} + c) mod(m)$, where $X_0$ is the seed.
  • $R_i = X_i/m, i = 1,2,…$
  • Choose a,c,m carefully to get good stastistical quality and long period or cycle length, i.e., time until LCG starts to repeat itself.
  • If $c = 0$, LCG is called a multiplicative generator

Tausworthe (linear recursion mod 2)

  • Tausworthe Generator is a kind of multicative recursive generator.

  • $X_{i+1} = (aX_{i-1} + c) mod(2)$, where $X_0$ is the seed.

Reference

Georgia Tech’s ISYE6644 class content

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×