FRM Exam Part I · Simulation and Bootstrapping
Random Number Generation for Monte Carlo Simulation
Updated 11 October 2026 · Fact-checked
Random number generation in simulation uses an algorithm to produce pseudo-random numbers that mimic independent U(0,1) draws. You transform them into other distributions, for example Z = N⁻¹(U) for a standard normal. A fixed seed repeats the same sequence, so results are reproducible.
Understand Random Number Generation
A Monte Carlo simulation needs random inputs. Computers are deterministic, so they cannot produce truly random numbers. They use an algorithm that starts from a number called the seed and produces a long sequence that looks random. These are pseudo-random numbers.
The base building block is the uniform draw on (0, 1). Every value in the interval is equally likely, and each draw is independent of the others. Good generators pass statistical tests for uniformity and independence, and they have a very long period before the sequence repeats.
To get other distributions, you transform uniform draws. The inverse transform method takes a uniform draw U and computes X = F⁻¹(U), where F is the cumulative distribution function (CDF) of the target. For a standard normal, Z = N⁻¹(U). In Excel this is NORM.S.INV(RAND()). Then X = μ + σZ gives a normal with mean μ and standard deviation σ.
The seed controls reproducibility. The same algorithm with the same seed gives exactly the same sequence, so you can rerun and audit a simulation. A different seed gives different draws and slightly different results. This is sampling variation, not an error. For correlated variables, you first generate independent standard normals and then combine them, for example with a Cholesky decomposition of the correlation matrix.
Pseudo-random numbers are not truly random. A poor generator, a short period or reuse of the same seed in the wrong place can bias results or hide sampling error.
Key formulas to remember
- Inverse transform method
- X = F⁻¹(U), where U ~ Uniform(0, 1)
- Works for any distribution whose CDF can be inverted. X then has CDF F.
- Standard normal from uniform
- Z = N⁻¹(U)
- Excel: NORM.S.INV(RAND()). U must lie strictly between 0 and 1.
- General normal draw
- X = μ + σ × Z
- Z is a standard normal draw. Use σ, not σ².
- Lognormal price draw
- S_T = S_0 × exp[(μ − σ²/2)T + σ√T × Z]
- Standard geometric Brownian motion over time T. Under risk-neutral pricing, use the risk-free rate (net of any yield) for μ.
- Correlated normals (two variables)
- Z₂ = ρ × ε₁ + √(1 − ρ²) × ε₂
- ε₁ and ε₂ are independent standard normals and Z₁ = ε₁. Then Corr(Z₁, Z₂) = ρ.
- Standard error of a simulation estimate
- SE = s ÷ √N
- s is the sample standard deviation of the outputs and N is the number of trials. Changing the seed does not change the expected SE.
How to solve Random Number Generation questions
Use this method for most questions on random draws, transformations and seeds.
- 1Identify the target distribution and its parameters (mean, standard deviation, time horizon).
- 2Check what you are given: a uniform draw U, a standard normal draw Z, or only a seed or generator description.
- 3If you have U, convert it to Z with the inverse normal CDF. Use the normal table: find the z whose cumulative probability equals U.
- 4Scale and shift: X = μ + σZ. For prices, plug Z into the lognormal formula instead.
- 5For correlated variables, build the second variable from independent draws using ρ and √(1 − ρ²).
- 6For seed questions, ask whether the algorithm and seed are the same. If yes, the output is identical. If the seed differs, the outputs differ.
- 7State the answer with the right units and check the sign and size against the tails of the distribution.
Quickest way: Table lookup and sign check
When to use it: When a question gives a uniform draw and asks for a normal value.
- Memorize key points: N(0) = 0.5, N(1) ≈ 0.8413, N(1.645) ≈ 0.95, N(1.96) ≈ 0.975, N(2.326) ≈ 0.99.
- If U = 0.5, then Z = 0. If U > 0.5, Z is positive. If U < 0.5, Z is negative.
- For U < 0.5, use symmetry: N⁻¹(U) = −N⁻¹(1 − U).
- Then compute μ + σZ and eliminate options that have the wrong sign or magnitude.
Common mistakes in Random Number Generation
Calling pseudo-random numbers truly random.
The output looks random, so the deterministic algorithm is forgotten.
Fix: Remember that the sequence is fully determined by the algorithm and the seed. That is why it is reproducible.
Thinking a different seed means the model is wrong when results differ slightly.
Students expect one exact answer from a simulation.
Fix: Different seeds give different samples. The gap reflects sampling error, which shrinks as N rises.
Plugging a uniform draw directly into a normal formula as if it were Z.
Both U and Z are called random draws.
Fix: Convert first: Z = N⁻¹(U). Only then compute μ + σZ.
Using the variance instead of the standard deviation when scaling.
The problem states σ² and students multiply by it.
Fix: Take the square root first. X = μ + σZ.
Using the wrong sign for Z when U is below 0.5.
Students read the table only for the upper half.
Fix: If U < 0.5, Z is negative. Use N⁻¹(U) = −N⁻¹(1 − U).
Thinking that reusing a fixed seed removes sampling error.
Identical results look precise.
Fix: A fixed seed gives repeatable results, not accurate ones. Accuracy depends on N and the variance of outputs.
Worked examples
Example 1
A simulation draws U = 0.8413 from a uniform (0, 1) generator. It converts this to a standard normal and then to a daily return with mean 0.05% and standard deviation 2%. What is the simulated return?
Show the solution
- Convert: Z = N⁻¹(0.8413) ≈ 1.00, since N(1) ≈ 0.8413.
- Apply X = μ + σZ.
- X = 0.05% + 2% × 1.00 = 2.05%.
Answer: The simulated daily return is about 2.05%.
Example 2
Two analysts run the same Monte Carlo VaR code on the same machine. Analyst A uses seed 123 and gets a 99% VaR of USD 4.20 million. Analyst B also uses seed 123 with the same number of trials. What should B expect, and what if B changes the seed to 456?
Show the solution
- The algorithm, seed and number of trials are identical for A and B.
- A deterministic generator then produces exactly the same draws, so B gets the same VaR of USD 4.20 million.
- With seed 456 the draws differ, so the VaR will differ slightly because of sampling error.
- The difference should shrink as the number of trials increases, since SE = s ÷ √N.
Answer: B gets USD 4.20 million with seed 123. With seed 456 the result will differ slightly, which is sampling variation and not a coding error.
Exam tips
- Know the chain: seed → pseudo-random uniform → inverse CDF → target distribution.
- If a question says the same seed and same code, the answer is identical results.
- Memorize N(1.645), N(1.96) and N(2.326), and use symmetry for the lower half.
- Distinguish reproducibility (seed) from accuracy (number of trials).
- Watch for σ versus σ² in the scaling step.
Practice questions from Simulation and Bootstrapping
- A bank uses a bootstrap with historical returns to estimate the standard error of a 99% VaR estimate. Which statement about the effect of th…
- A stock price follows geometric Brownian motion with S0 = 100, drift mu = 8% per year, volatility sigma = 20% and the simulation uses a one-…
- A risk manager simulates 10,000 independent one-day portfolio losses and estimates the mean loss as 2.0 with sample standard deviation 15.0.…
- A simulation of a portfolio's one-day loss uses 10,000 independent draws and estimates the mean loss as 2.0 million with sample standard dev…
- A sample has n = 5 observations: 2, 4, 6, 8, 10. A bootstrap resample of size 5 is drawn with replacement. What is the probability that a gi…
Random Number Generation in other exams
The same ground in other exams, if you are preparing for more than one or want another angle on it.
Random Number Generation: frequently asked questions
What is a pseudo-random number?
It is a number produced by a deterministic algorithm that behaves like a random draw. The sequence is fixed by the starting seed. It is good enough for simulation when the generator passes tests for uniformity and independence.
How do you generate a normal random variable from a uniform one?
Draw U from Uniform(0, 1) and compute Z = N⁻¹(U), the inverse of the standard normal CDF. Then use X = μ + σZ for a normal with mean μ and standard deviation σ.
Why does the random seed matter?
The seed sets the starting point of the sequence. Using the same seed with the same algorithm reproduces the same draws, which makes results repeatable and auditable. Changing the seed changes the sample.
Does a fixed seed make a simulation more accurate?
No. It only makes results repeatable. Accuracy depends on the number of trials and the variability of the outputs, since the standard error falls with √N.