Cost & Management Accounting Home Page

Monte Carlo Simulation:

The Case of the Hospital Outpatients Department

 

Based on the example to be found in Moore (1980), the following is a Monte Carlo Simulation of an Outpatients’ Department in a Hospital.  The basic scenario is that the Outpatient day starts at 9 am; and a consultation with the Doctor can last for 5 minutes, 9 minutes or 15 minutes.  The respective probabilities for these times are 20%, 50% and 30%.  That is, for example, a 5 minute consultation has a 20% chance of occurring, whereas there is a 50% chance of a 9 minute consultation taking place.

 

Patients’ appointments are set at 10 minute intervals and initially we will assume that all patients arrive on time.  Patient one arrives at 9 am and is seen immediately.  Patients not seen by 12:30 must make an alternative appointment: they will not be seen that day.

 

Consultation times in the simulation are set by random numbers.  That is, a number is drawn at random that is associated with the probability of consultation duration, hence a patient’s consultation duration is set at random and this then affects the possible waiting time both of the doctor and the other patients. I've included a web link at the end of this page to a site I've found useful as a potential starting point for anyone wanting to use Monte Carlo Simulations on their PC.

 

This is a spreadsheet model

 

The simulation you are about to see was carried out on (or is it in?) a spreadsheet.  On this occasion I used Lotus 1-2-3; but MS Excel would do it just as well.  In fact, any spreadsheet, or other software, that can handle random number generation and that can handle tables and relationships such as those you are about to see will be useful for Monte Carlo Simulations.

 

This problem is relatively simple, however, I should stress that programming a spreadsheet for it is not as simple as it might appear.  If you are of the order of an experienced, but not necessarily advanced, spreadsheet programmer, you'll be fine, otherwise be ready for a few hours' worth of work!  It's not the complications of the formulae and functions that will cause any problems; but the need accurately and fully to represent all of the relationships in the model.

 

Simulation one: The Basic situation

 

 

 

consultation

 

 

 

 

 

random no

arrival time

 duration

start

end

Doctor wait

Patient wait

 

 

 

(mins) 

 

 

(mins) 

(mins)

1

 8

9:00

 15

9:00

9:15

 0

0

2

 3

9:10

 9

9:15

9:24

 0

 5

3

 3

9:20

 9

9:24

9:33

 0

 04

20

 6

12:10

 9

12:21

12:30

 0

 11

21

 8

12:20

 15

Cancel

Cancel

 0

 10

 

 

 

 

 

TOTALS

 26

 1:12

 

To keep this page more manageable, I have eliminated most of this table!  You should be able to tell from the rows that I’ve left in it how the model works.

 

Here we see that the Doctor has had waiting time of 26 minutes in his schedule: this is wasted time for him and his potential patients, especially the patient at the end of the morning who had to be sent home unseen by the Doctor.  The patients had to wait a total of 1 hour and 12 minutes. 

 

o        Are you sure can you see how the random numbers are used to set the consultation duration, by the way?

                                                                                               

Simulation two: Variation 1

 

As with the basic situation except that now the Doctor feels that if two patients arrive at 9 am, there may be a better chance of wasting none of his time and reducing the overall time that his patients wait too: other constraints remain the same.

 

Note, the random numbers and thus the consultation times are set at exactly the same for both simulations so that it is only the change to there being two arrivals at 9 am that affects any variation as between the two simulation runs.

 

 

 

 

consultation

 

 

 

 

 

random no

arrival time

 duration

start

end

Doctor wait

Patient wait

 

 

 

(mins) 

 

 

(mins) 

(mins)

1

 8

9:00

15

9:00

9:15

0

0

2

 3

9:00

 9

9:15

9:24

0

5

...

20

 6

12:00

 9

12:11

12:20

0

 1

21

 8

12:10

 15

12:20

12:35

0

0

 

 

 

 

 

TOTALS

 16

15

 

For presentation purposes, I have deleted most of this table.

 

The effect of having two patients arriving at 9 am has been to reduce the Doctor’s wasted waiting time by 10 minutes to 16 minutes; and the patient waiting time is now only 15 minutes, not 1 hour 12 minutes.  Finally, all patients were seen this time.

 

Simulation three: Variation 2

 

Now we look at the situation that is almost the same as the basic situation except that now patients may arrive, more realistically, on time, late or early according to the following schedule of times and probabilities.  Again, to keep the simulations comparable from variation to variation, note that the consultation times are held constant as between all variations.  The random numbers in this table, therefore, relate to the arrival times of the patients only.

 

 

time

Pr

 

(mins) 

(%)  

 early by

5

20

 on time

0

60

 late by

5

10

 late by

10

10

Where Pr = probability

 

 

 

scheduled

actual

consultation

 

 

 

 

 

random no

arrival time

arrival time

 duration

start

end

Doctor wait

Patient wait

 

 

 

 

(mins) 

 

 

(mins) 

(mins)

1

 3

9:00

 9:00

15

9:00

9:15

0

0

2

 10

9:10

 9:20

9

9:20

9:29

5

 0

...

20

 2

12:10

 12:05

 9

12:26

12:35

 0

21

21

 1

12:20

 12:15

 15

Cancel

Cancel

 0

 0

 

 

 

 

 

 

TOTALS

 31

2:01

 

Again, for presentation purposes, I have deleted most of this table.

 

Now, the Doctor wastes a total of 31 minutes of his time waiting for patients to arrive; and patients are back to having to wait for considerable lengths of time: a total of just over 2 hours, in fact.  Furthermore, one patient is sent home having been unable to have his appointment honoured by the Doctor.

 

Note: in this case, if you were to replicate this simulation, you could find that the first patient might arrive at 8:55 am rather than 9 am.  I have assumed in my model that if the first patient does arrive early, the Doctor is ready for consultation.

 

This simulation and accounting

 

You might have been asking yourself what all of this has to do with accounting.  In some cases, such simulations can be made absolutely independent of accounting: they can be scientific, engineering or done just purely for personal interest.  In this case, we have modelled a system: a patient seeing his doctor.  The doctor has a high salary and a backup staff; there is also an infrastructure involved together with consumables ... the patient has an opportunity cost associated with his health and his waiting time.

 

Put some monetary values on such simulations and you will see the link between this paper and accounting.

 

Conclusions and further questions for analysis

 

o        From a decision making point of view, what conclusions can we draw from these simulations?

o        What should the Doctor do now to improve the situation for all concerned?: does he have any alternatives?

o        How can we adjust the model further to model reality more closely/improve the situation for all concerned?

 

If you look at Moore pp323 – 329, you will see that his results are radically different to those presented here:

 

o        Why is this?

o        Who is right/wrong?

 

Carry out the simulations yourself: check your results again mine and Professor Moore’s … what now.

 

Summary of findings

Williamson

Moore

 

 Dr wait

 Patient wait

 Dr wait

 Patient wait

 

mins

mins

mins

mins

Basic

26

72

29

51

Variation 1

16

15

19

125

Variation 2

31

121

29

119

 

You will find that there are potentially major differences between simulations: as you should expect of a model based on random numbers.  Consequently, you will find that the Doctor's waiting time varies from zero to over an hour; and Patient waiting time can vary from just a few minutes to over 7 hours.  All variations on these data are possible.

 

The answers to all of these questions help to confirm why simulations can be so interesting to get involved in!

 

Reference

 

Moore Peter G (1980) Reason by Numbers Penguin

 

 


Web Link Simple Monte Carlo studies on a spreadsheet by Guy Judge University of Portsmouth. This is a well written piece that can take you on to trying out Monte Carlo Simulations on your own PC. The page also contains some useful cross references to other Simulations and papers that you might find interesting.

 

©  Duncan Williamson

July, 1999 modified July 2001 and May 2003

Write to me at any time

 
© Webmaster Duncan Williamson 2002