RANDOM NUMBER GENERATION - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

RANDOM NUMBER GENERATION

Description:

Generating Random Numbers. LCG (linear congruential generators) Zi = (a Zi-1 c) mod (m) ... Random Number Generators. Will the following LCG work? Zi = (12Zi-1 ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 10
Provided by: kump
Category:

less

Transcript and Presenter's Notes

Title: RANDOM NUMBER GENERATION


1
RANDOM NUMBER GENERATION
  • Week 3
  • Kelton text (Ch. 12)
  • GE-703 Kumpaty

2
Generating Random Numbers
  • LCG (linear congruential generators) Zi
    (a Zi-1 c) mod (m)
  • Mixed (above) Multiplicative when c0.
  • Seed value Z0
  • Maximum cycle length achieved is m.
  • Promodel uses a630360016 c0 and m231-1 prime
    modulus multiplicative LCG
  • Arena (used to have same m, c, a16807)
  • Cycle length in 100 unique streams

3
Generating Random Numbers
  • Zi (a Zi-1 c) mod (m) Guidelines for selection
    of m,a and c.

4
Random Number Generators
  • Will the following LCG work?
  • Zi (12Zi-15) mod (32) with Z0 29
  • i Zi
  • 0 29
  • 1 1
  • 2 17
  • 3 17
  • 4 17
  • 5 17
  • It wont work because a4k1 is violated.

5
Testing Random Number Generators
  • 1. Testing for independence
  • Hypothesis
  • H0 Ui values from the generator are
    independent (Ui for uniform distr. Zi/m)
  • H1 Ui values from the generator are not
    independent
  • Specified significance level a
  • The Runs test
  • The Runs Above and Below the Median Test
  • The Runs Up and Runs Down Test

6
Testing Random Number Generators
  • 2. Testing for uniformity/homogeneity
  • Hypothesis
  • H0 Ui values are uniform
  • H1 Ui values are not uniform
  • Specified significance level a
  • The Kolmogorov-Smirnov test
  • The Chi-Square test
  • Will do in Chapter 6

7
Generating Random Variates
  • Inverse Transformation Method
  • CONTINOUS Distributions
  • f(x) probability distribution function
  • F(x) cumulative distribution function, F(x)
    P(Xltx)
  • Set U F(x) where U is uniform (0,1) and solve
    for x.
  • x F-1(U) x is the random variate

8
Cumulative Distribution function for Uniform
Distribution
  • Pr (0 ? x ? x0) F(x0) a? x0 1/(b-a) dx
  • F(x0) (x0-a)/(b-a)
  • Also if the cumulative probability F(x0) is known
    we can also determine x0 as
  • x0 a(b-a) F(x0)
  • Example b7 a4 given F(x0)0.53, x0 5.59

9
Cumulative Distribution function for Exponential
Distribution
  • Pr (0 ? x ? x0) F(x0) 0? x0 b e-bx dx
  • F(x0) - e-bx 0x0 1 - e-bx0
  • Also if the cumulative probability F(x0) is known
    we can also determine x0 as
  • x0 (-1/b) ln(1 F(x0))
  • Please note (1/b) is the mean of the exponential
    distribution.
Write a Comment
User Comments (0)
About PowerShow.com