Week 1 Flashcards

1
Q

What is a Random Number Generator?

A

A deterministic algorithm that generates numbers U1, U2, U3, …, which appear to be random (independent) numbers from U(0, 1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the properties of a RNG?

A
  1. U1, U2, … should pass the hypothesis test of being i.i.d. U(0, 1)
  2. It should be sufficiently fast, e.g. 1 million numbers within a second
  3. You are able to recover the same sequence
  4. You are able to get the same numbers on different computers (with same programming language)
  5. A good RNG should have a long period
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the Linear congruential random number generator?

A
  • modulus m in {2, 3, 4, …}
  • multiplier a in {1, …, m -1}
  • increment c in {0, 1, …, m - 1}
  • initial value Y0 in {0, 1, …, m -1}

Then Yi+1= (aYi + c), and Ui = Yi / m

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the Lewis-Goodman-Miller generator?

A

It’s a Linear Congruential RNG with values:

a = 75 (= 16807)

c = 0

m = 231 - 1 (≈ 2.14 * 109)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to simulate random X using CDF FX(x)?

A
  1. Simulate U from U(0, 1)
  2. X = FX-1(U)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the advantages and disadvantages of the inverse CDF?

A

Pro:

  • Conceptually simple

Cons:

  • Only available if FX-1 can be derived analytically
  • Risc of numerical problems is large
  • It is usually to slow
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does the Acceptance-rejection method work?

A
  1. Simulate Y from proposal distribution gY(y)
  2. Simulate U distributed U(0, 1)
  3. Check if U ≤ fX(Y)/(M gY(Y)), where M = maxy fX(y)/gY(y)

If yes, X = Y, else reject Y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly