Professional Documents
Culture Documents
Monte Carlo Simulation in Excel: Jake Blanchard Spring 2010
Monte Carlo Simulation in Excel: Jake Blanchard Spring 2010
Excel
Jake Blanchard
Spring 2010
Filling Cells
Advantages
Slow
Cumbersome if you need many
samples
Not many built-in distributions
Uncertainty Analysis for Engineers
Typical Sheet
Formulas
Scripting in VBA
Start
The Script
Function dice(N, above)
Count = 0
For i = 1 To N
roll1 = Ceil(6 * Rnd)
roll2 = Ceil(6 * Rnd)
tot = roll1 + roll2
If tot > above Then
Count = Count + 1
End If
Next
dice = Count / N
End Function
Public Function Ceil(ByVal X As Double) As Double
Ceil = (Int(X) - (X - Int(X) > 0))
End Function
Uncertainty Analysis for Engineers
Built-In Tools
Crystal