In: Operations Management
explain the 5 steps of conducting a Monte Carlo simulation? Thank You
Quantitative Analysis
The five steps of conducting Monte Carlo Simulation are:
1. Establishing probability distribution
2. Cumulative probability distribution
3. Selecting random number intervals
4. Getting random numbers
5. Finding answer of the question using the above four steps
Suppose we take a case of physician who schedule his patients for more or less 30 minutes depending on the type of ailment. The following table shows the category of ailment, probability and actual time needed to complete the work.
Here in this table we find probability i.e. Step 1
probability = no. of patients / Total patient (i.e. 100)
Table 1
Category ailment |
Time required |
No. of patients |
Probability |
Gastric |
45 |
40 |
0.4 |
muscular |
60 |
15 |
0.15 |
skin |
15 |
10 |
0.1 |
allergy |
45 |
15 |
0.15 |
Throat |
15 |
20 |
0.2 |
Sum of all patient (100) |
Situation
Now I want to simulate the physician’s clinic for four hours and find out the average waiting time for the patients and as well as the idleness of physician. We assume all patient reach the clinic at their designated time, and the arrival starts at 9 a.m.
Now we make another table to explain Step 2 and Step 3
Table 2
Category ailment |
Probability |
cumulative probability |
Random number interval |
Gastric |
0.4 |
0.4 |
0-39 |
muscular |
0.15 |
0.55 |
40-54 |
skin |
0.1 |
0.65 |
55-64 |
allergy |
0.15 |
0.8 |
65-79 |
Throat |
0.2 |
1 |
80-99 |
Step 2
Cumulative probability of gastric = 0.4
Cumulative probability of gastric = 0.4 + 0.15 = 0.55
Cumulative probability of gastric = 0.55 + 0.1 = 0.65
Cumulative probability of gastric = 0.65 + 0.15 = 0.8
Cumulative probability of gastric = 0.8 + 0.2 = 1
Step 3
Rule for selecting random number interval
Like in Gastric ailment (probability = 0.4), here we start interval from 0 till (0.4 – 0.01) *100
To make it double digit number in interval i.e. 39
0.01 value will remain same in all cases
So, range for Gastric = 0 – 39
Range for muscular = 40 – 54
Range for skin = 55 – 64
Range for allergy = 65 - 79
Range for throat = 80 - 99
Here in the above situation physician takes approximately 30 mins for 1 patient. Hence in four hours the physician will be able to attend 8 patients. (i.e. 2 patients in 1 hour so, 8 patients in 4 hrs.)
Step 4
Now, we take 8 random numbers to remove any sort of biasedness.
We can generate random numbers in excel by using randbetween(1-100).
I choose 8 random numbers as 40, 82, 11, 34, 25, 66, 17, 79 generated by excel.
Table 3
Patient |
scheduled arrival |
random number |
category |
service time needed |
1 |
9:00 |
40 |
muscular |
60 |
2 |
9:30 |
82 |
throat |
15 |
3 |
10:00 |
11 |
gastric |
45 |
4 |
10:30 |
34 |
gastric |
45 |
5 |
11:00 |
25 |
gastric |
45 |
6 |
11:30 |
66 |
allergy |
45 |
7 |
12:00 |
17 |
gastric |
45 |
8 |
12:30 |
79 |
allergy |
45 |
Now I use the generated random number in sequence of the first come and first serve to the patients.
So, I assign 40 to 1st, 82 to 2nd patient and so on.
Now, we see the random number 40 comes in the range of 40 – 54 which belongs to muscular, hence we fill muscular in the 1st row of category
Then, we see the random number 82 comes in the range of 80 – 99 which belongs to throat; hence we fill throat in the 2nd row of category.
And likewise, we will the category column.
Service time needed the last column can be filled by referring the Table 1.
Table 4
Patient |
scheduled arrival |
service start time |
service end time |
patient waiting time (in minutes) |
Physician's idle time |
1 |
9:00 |
9:00 |
10 |
0 |
0 |
2 |
9:30 |
10 |
10:15 |
30 |
0 |
3 |
10:00 |
10:15 |
11 |
15 |
0 |
4 |
10:30 |
11 |
11:45 |
30 |
0 |
5 |
11:00 |
11:45 |
12:30 |
45 |
0 |
6 |
11:30 |
12:30 |
13:15 |
60 |
0 |
7 |
12:00 |
13:15 |
14:00 |
75 |
0 |
8 |
12:30 |
14:00 |
14:45 |
90 |
0 |
Note: Time denoted in 24 hrs. format
Now, we have assumed that all patient comes on time starting from 9 a.m.
From Table 3 we see, 1st patient was muscular ailment category hence it needs 60 minutes (refer table 1). And hence service time ends after 60 minutes (10 a.m.) and first patient obviously doesn’t have to wait.
And the physician gets no idle time since all the patient are reaching clinic after half an hour. Hence idle time of physician is zero.
Now, for second patient the service time starts after the 1st patient leaves i.e. at 10 a.m. hence the 2nd patient has to wait for 30 minutes and since the second patient is of category throat, he just takes 15 minutes of service time and leaves clinic at 10:15 a.m. And again, the physician gets no idle time.
And likewise, we populate the whole table 4 for all the eight patients.
Step 5
Finding answer of the question using the above four steps
Average waiting time of patients = (sum of all patient’s waiting time / number of patient)
= 345 / 8
= 43.125 minutes
Average idle time of Physician = 0 /8
= 0 minutes