Linear Congruential Generator (LCG)
Definition and Formula
Definition: Arithmetic generator that creates random numbers U(i); it is the most common random number generator (RNG)
Z(i+1) = (αZ(i) + c) mod m U(i+1) = Z(i+1)/m
Z(0) is the see
m = modulus
α = multiplier
c = shift (increment)
Full Period Theorem
A full period is when the period is equal to m
The LCG has a full period <=>
Requirements of a “Good” Random Number Generator (RNG)
Algorithm for Simulating Homogenous Poisson Process
Algorithm for simulating T time units of a Poisson process
I = # of events
S(I) = event time (in increasing order)
Thinning Algorithm
For Non-Homogenous Poisson Process
Batch Arrivals
At t(i) have B(i) events - B(i) is discrete r.v. IDD and independent of t(i)
Algorithm (get t(i) from t(i-1)):
Steps for Continuous Inverse Transform Method
Algorithm for Discrete Inverse Transform Method
Like how you coded the CDF in Assignment 2