Simulation and ModelingTU Board 2080
Explain Monte Carlo simulation method with example.
5Answer
Monte Carlo simulation solves problems by repeated random sampling. It builds a model with random inputs drawn from probability distributions, runs the model many times, and uses the results to estimate the answer. It is useful when a problem is too complex to solve analytically, or involves uncertainty.
Steps
- Define the problem and the model (inputs, outputs and relationships).
- Give each uncertain input a probability distribution.
- Generate random numbers and convert them to input values.
- Run the model for those inputs and record the output.
- Repeat many times (thousands of trials).
- Analyse the outputs: mean, variance, probabilities and confidence intervals.
Example 1: estimating π
Throw random points uniformly into a square of side 1 that contains a quarter circle of radius 1. The fraction of points inside the quarter circle approaches its area, π/4.
- Generate random x, y in [0, 1].
- Count the point as a hit if x² + y² ≤ 1.
- π ≈ 4 × (hits / total points).
With 10,000 points, if 7,850 land inside, π ≈ 4 × 0.785 = 3.14.
Example 2: daily demand
A shop's daily demand is 10, 20 or 30 units with probabilities 0.2, 0.5 and 0.3. Assign random-number ranges 00–19 → 10, 20–69 → 20, 70–99 → 30. Draw random numbers for many days, read off the demand, and average the results to estimate expected demand and stock-outs.
Uses: risk analysis in finance, queueing systems, reliability studies, project scheduling (PERT) and numerical integration.
Discussion
Loading…