1

 MathCAD
 Modelling with Random Numbers
Monte Carlo methods

2

 Real world problems have ‘range’ of inputs
 Infinite possible inputs
 Use random numbers to explore a representative sample

3

 Unit Circle (r=1)
 Area = p
 Unit Square
 p/4 of unit circle falls within unit square

4

 Pick 2 random numbers, X & Y in range 0..1 (uniform distribution)
 If X^{2} + Y^{2} < 1 then inside circle
 Calculate proportion inside after N tries
 p/4 = Proportion

5

 Model 2D System
 Photons travel through medium
 Scatter through random angle after random distance
 Repeat until photon leaves simulation area

6

