The Distribution of Service Time of Patients

Ayotunde Samson Oladimeji1 and Olayemi Joshua Ibidoja2,*

1Department of Statistics, University of Ibadan, Nigeria

2Department of Mathematical Sciences, Federal University Gusau, Nigeria

E-mail: ojibidoja@fugusau.edu.ng

*Corresponding Author

Received 24 May 2019; Accepted 05 April 2020; Publication 13 October 2020

Abstract

The aim of this research was to study the distribution of service time of patients at the University of Ilorin Health Services Clinic. The distributions of patients’ arrival and their service time were studied. The system was treated as single, time-independent arrivals with multiple service points. Based on the histograms obtained on the arrival process and the service process, appropriate distributions were fitted and tested using Chi-squared goodness of fit test. It revealed that the arrival process follows a Poisson distribution with an arrival rate of 0.8 patient per 2 minutes while the service process follows a gamma distribution with shape and scale parameters equal to 6 and 0.1 respectively. The mean service time was also found to be around 63 minutes. The results of this study may be useful to understand the magnitude of the problem of queue, relationship between resources and waiting times and to find a solution for alleviating the problem.

Keywords: Queuing, arrival time, service time, patients, Chi-squared goodness of fit test

1 Introduction

Arrival events and service time are two things which are probabilistic in nature. In other words, there is a measure of uncertainty in their individual distributions. This idea of uncertainty confirms the need of probability and statistics in analyzing queuing circumstances or procedures. A queuing process is given birth when the arrival and the service processes are pooled.

The arrival process studies how events or individuals emanate to a point, usually a service facility. It is assumed to have a Poisson distribution. The service process on the other hand has to do with waiting in time while receiving a service. Service time is expected to have an exponential distribution or rather, modified form of it which may be the Gamma and Erlang distributions, depending on the service mechanism.

The term “patients” as used in this study strictly refers to out-patients and more precisely student out-patients. Also the terms “clients” and “customers” are used interchangeably, generally refer to persons who come to a service point to receive some service(s). According to Iversen (1993) waiting lists indicate loss of efficiency when the hospital’s resources are moved away from medical work. Cochran et al. (2009) developed an open queuing network model of an emergency department (ED) design purported to enhance the capacity of an ED to treat patients. The methodology is useful for detecting hospital-specific differences in patient acuity mix, arrival patterns, volumes and efficiencies of processes in a single common computational model. Bahadori et al. (2014) used a descriptive-analytical study carried out in a military hospital in Iran for a sample of 220 patients. The results showed that the average numbers of patients in the pharmacy was 19.21 in the morning and 14.66 in evening, whereas the average times spent in the system by clients in the morning and evening were 39 minutes and 35 minutes respectively. The respective system utilization in the morning and evening were 25% and 21%. Armony et al. (2015) used exploratory data analysis (EDA) in a large Israeli hospital exhibiting important features which are not readily explained by the existing models. Green (2002) examined data from New York State and estimated bed unavailability in intensive care units (ICUs) and obstetrics units by means of queuing analysis. He identified units which appear to have insufficient capacity using various patient delay standards. It was concluded that approximately 40% of all obstetrics units and 90% of ICUs do not have sufficient capacity to procure an appropriate bed whenever it isneeded.

1.1 General Queue Problem

Queuing theory is the scientific study of waiting in lines or queues. It is a requisite phase in the field of operations research. The theory started with research by Agner Krarup Erlang in 1908 who worked on the size of a telephone exchange that is needed to keep to a sensible value of the number of telephone calls not connected because of the busy system.

Queues come up as a result of limited resources available to serve a large mass of clients. A queue may be difficult to the client because they may feel their time is being wasted by having to wait for a particular duration before getting served. On the part of the organization, it makes economic sense to have queues since no organization would want to employ too many waiters who might turn out to be idle or might not have enough work to do to justify the emolument they receive.

The notion of queues is applied in the design of banks, hospitals, petrol stations, post offices, restaurants, supermarkets, telephone exchange rooms, public transport system and so on.

1.2 Classification of Queuing Systems

Classification of types of queuing systems are:

(a) Single or Simple Queue System
This refers to a system where customers join a single waiting line on a single service point. Example is a withdrawal point in a bank.

ArrivalQueueServicepointExit

(b) Parallel Queue System
This is a queuing system in which there are several waiting lines each having its own server. This can be found in a in a post office.

(c) Series Queue System
A system in which queues are in stages. It can also be described as a system with a single queue and several servers. This system is applicable in supermarkets, hospitals, restaurants etc.

1.3 Description of the University of Ilorin Health Services Clinic

The University Health Services Clinic is located within the school premises. It is one of the significant units in the University because it attends to the basic health complaints of students and staff of the University.

At the time of this research, there exists up to seven service points in the clinic. These do not include the wards. The service points are described below:

1. Records Section: This is where patients drop their clinic cards especially at commencement of treatment. The details on the cards will be used to trace patient’s clinic files. Afterwards each patient will be directed to next required service channel; typically one of the doctors.

2. Consulting Rooms (Doctors): There are three checking rooms. Inside each of them is a doctor who interviews the patient, diagnoses his/her ailment(s) and also directs them to the next required service node by recommending drugs and/or injection.

3. Injection Rooms: In these rooms, injection is given to patients.
Injection rooms are two in number.

4. Pharmacy: This is the room where drugs are given to patients according to what is written on prescription forms by the doctors who must have been consulted earlier.

2 Objectives of the Study

1. To show that service time is not always exponential.

2. To fit a suitable probability distribution to the arrival of patients at the Clinic.

3. To fit a suitable probability distribution to the service time at the Clinic.

2.1 Scope of the Analysis

This research was based on the service time of patients that arrive between 12 noon and 03: 00 pm at the University of Ilorin Health Services Clinic. This is the time that is officially devoted to students and as such the analysis shall be particularly concerned with students.

2.2 Chi Squared Goodness of Fit Test

The Chi Square test as a goodness of fit test is a peculiar method for testing whether the observed sample distribution data are representative of a specific distribution. The real frequencies are compared with the frequencies that hypothetically would be expected to happen if the data followed the exact distribution of interest.

The test statistic is given as

X2=i=1n(Oi-Ei)2Eiχk-p-12degreesoffreedom.

Where

   O=i Observed frequency

   E=i Expected frequency

   P = Number parameters estimated

   K = Number of groups or categories

Decision Rule: Reject H0 if X2>χk-p-1,α2 or if P-value <α otherwise do not reject.

2.3 Source of Data

The data used for this research were collected from the University of Ilorin Health Services Clinic.

3 Results and Discussion

Table 1 exhibits the data of service time of 35 patients of the University of Ilorin Health Service clinic observed on 7 days.

Table 1 Data presentation for the service time of patients in minutes

S/N Day 1 Day 2 Day 3 Day 4 Day 5 Day 6 Day 7
1 95 55 92 49 53 61 48
2 115 54 89 53 56 66 51
3 136 30 100 46 51 70 48
4 125 62 88 50 62 65 40
5 93 65 70 41 52 179 40
6 133 52 52 39 53 64 45
7 132 49 92 38 55 74 43
8 92 133 86 44 80 76 38
9 106 57 109 43 60 59 36
10 105 88 103 51 59 69 49
11 84 83 108 41 58 55 48
12 98 85 97 30 60 62 59
13 95 89 101 119 74 79 56
14 68 52 67 40 82 56 36
15 75 147 94 37 67 64 52
16 75 51 98 32 172 56 48
17 82 83 87 41 61 63 37
18 81 56 78 32 64 54 46
19 81 62 75 45 49 65 34
20 72 60 91 40 17 57 43
21 98 59 41 27 43 70 52
22 96 58 82 36 46 168 34
23 97 62 83 36 33 185 46
24 36 76 70 82 42 55 59
25 55 78 74 91 37 51 68
26 54 71 80 70 33 39 56
27 16 65 76 83 40 45 68
28 51 58 81 82 67 33 53
29 29 56 66 79 20 42 50
30 24 82 66 69 28 32 61
31 42 114 65 76 29 30 66
32 38 72 71 84 33 40 49
33 73 79 79 73 47 46 49
34 75 94 63 61 65 49 111
35 73 12 61 74 48 61 83
. . . . . . . .
. . . . . . . .

images

Figure 1 Distribution of service time of patients.

The histogram is skewed to the right which suggests that the service time of patients has a distribution that belongs to the gamma family.

Let S be a random variable representing the service time (in minutes) of patients. An exponential distribution is fitted to the data as follows:

3.1 Exponential Distribution

H0:Sexp(μ) that is service time follows exponential distribution.

H1:S does not exp(μ) that is service time does not follow exponential   distribution.

The probability density function for the exponential distribution is

f(s)=μe-μs,μ>0.

where

μ= mean service time  =62.6687

The mean of exponential distribution is 1μ, therefore

1μ =62.6687
μ =0.016
P(a<s<b) =ab0.016e-0.016s
=e-0.016a-e-0.016b
χ2K-p-1,α=χ28-1-1,0.05=χ26,0.05=12.59

Conclusion: Since X2=401.8904>χ26,0.05=12.59, we reject H0 and conclude that the service time of patients does not have an exponential distribution.

3.2 Gamma Distribution

H0: S is gamma (α1,β) i.e. service time has a gamma distribution

Vs.

H1: S is not gamma (α1,β) i.e. service time does not have a gamma distribution α=0.05 level of significance

The probability density function is given as

f(s,α,β)=βαsα-1e-βsΓα

where α and β are the shape and scale parameters respectively.

meanservicetime=E(S)=αβ
variance=V(S)=αβ2

The evaluation of 𝛂 and 𝛃
From Table 2, the mean service time = 62.6687 and the variance is 722.270

E(s) = αβ=62.6687 (1)
Var(s) = αβ2=722.270 (2)

From Equation (1) α=62.6687β

Table 2 Summary statistics of the data

N 504
Mean 62.6688
Median 58
Mode 49
Std. Deviation 26.87510
Variance 722.270
Minimum 2
Maximum 185

Table 3 Computation of expected frequencies for exponential distribution

Interval of Class Observed Expected
Service Time Mark Frequency Probability Frequency
in Minutes (s) (Oi) f(s) (Ei) X2=i=1n(Oi-Ei)2Ei
0<t20 10 13 0.2753 138.7512 113.9692
20<t40 30 92 0.1995 100.5534 0.7276
40<t60 50 161 0.1446 72.8784 106.5531
60<t80 70 121 0.1048 52.8197 88.0100
80<t100 90 80 0.0759 38.2536 45.5581
100<t120 110 20 0.0550 27.7200 2.1500
120<t140 130 10 0.0399 20.1096 5.0823
>140 150 7 0.1050 52.9141 39.8401
Total 504 504.0000 401.8904

Substituting in Equation (2)

62.6687ββ2=722.270=>β2=62.6687722.270=0.0868=>β0.1

From Equation (2)

α =62.6687(0.1)=6.26687
α 6

This implies that S gamma (6,0.1)

That is

f(s,6,0.1)=(0.1)6s6-1e-0.1sΓ6
=(0.1)6s5e-0.1s(6-1)!=8.3×10-9[s5e-0.1s]
P(a<s<b)=8.3×10-9abs5e-0.1s

Table 4 Computation of expected frequencies for gamma distribution

Interval of Class Observed Expected
Service Time Mark Frequency Probability Frequency
in Minutes (s) (Oi) f(s) (Ei) X2=i=1n(Oi-Ei)2Ei
0<t20 10 13 0.0165 8.3160 2.6383
20<t40 30 92 0.1975 99.5400 0.5711
40<t60 50 161 0.3381 170.4024 0.5188
60<t80 70 121 0.2534 127.7136 0.3529
80<t100 90 80 0.1237 62.3448 4.9997
100<t120 110 20 0.0465 23.4360 0.5038
120<t140 130 10 0.0148 7.4592 0.8655
>140 150 7 0.0095 4.7880 1.0219
Total 504 504.0000 11.4720

Since P-value =0.12>α=0.05, we do not reject H0 and we therefore conclude that the service time of patients has a gamma distribution.

images

Figure 2 Q-Q Plot of service time in minutes

Table 5 Estimated distribution parameters (Large sample was used)

Gamma Distribution Service Time in Minutes
Shape 6.000
Scale 0.100

4 Summary

Analysis has shown that the service time at the University of Ilorin Health Services Clinic has a gamma distribution with α=6 minutes and β=0.1 minutes.

5 Conclusion

This study has shown that the distribution of service time is not always exponential.

References

[1] Armony, M., Israelit, S., Mandelbaum, A., Marmor, Y. N., Tseytlin, Y. and Yom-Tov, G. B. (2015). On patient flow in hospitals: A data-based queueing-science perspective, Stochastic systems, 5(1), pp. 146–194.

[2] Bahadori, M., Mohammadnejhad, S. M., Ravangard, R. and Teymourzadeh, E. (2014). Using queuing theory and simulation model to optimize hospital pharmacy performance, Iranian Red Crescent Medical Journal, 16(3), e16807, doi:10.5812/ircmj.16807.Epub 2014 Mar 5.

[3] Bailey, N. T. J. (1964). The Elements of Stochastic Processes. John Wiley and Sons, New York. Benes, V.E. (1963), General Stochastic Processes in the Theory of Queues. Addison Wesley, Reading, PA.

[4] Bertsekas, D. (1987). Dymamic Programming: Deterministic and Stochastic Models, Prentice- Hall, Englewood Cliffs, NJ.

[5] Cochran, J. K. and Roche, K. T. (2009). A multi-class queuing network analysis methodology for improving hospital emergency department performance, Computers & Operations Research, 36(5), pp. 1497–1512.

[6] Green, L. V. (2002). How many hospital beds?, INQUIRY: The Journal of Health Care Organization, Provision, and Financing, 39(4),pp. 400–412.

[7] Iversen, T. (1993). A theory of hospital waiting lists, Journal of Health Economics, 12(1), pp. 55–71.

[8] Vandijk, Nicom (1993). Queueing Networks And Product Forms - A Systems Approach, John Wiley & Sons.

[9] Yao, David, D. (1994). Stochastic Modelling and Analysis of Manufacturing Systems, Springer-Verlag.

Biographies

images

Ayotunde Samson Oladimeji is a young researcher and studied at the University of Ilorin Nigeria where he obtained B.Sc. Statistics in 2013. He later proceeded to University of Ibadan Nigeria for his M.Sc. in Statistics. He has good research experience and has a good knowledge of different statistical packages. He is a data scientist and a trained statistician with passion for quality research.

images

Olayemi Joshua Ibidoja is currently a Ph.D. student at the Universiti Sains Malaysia. He attended the University of Ilorin Nigeria where he obtained B.Sc. Statistics in 2013 and MSc. Statistics in 2016 respectively. He served his country at Obafemi Awolowo University Nigeria and currently an academic staff at the Department of Mathematics, Federal University Gusau Nigeria. He has published articles in reputable journals and in addition to a book titled “Introductory Statistics”.

Abstract

1 Introduction

1.1 General Queue Problem

1.2 Classification of Queuing Systems

1.3 Description of the University of Ilorin Health Services Clinic

2 Objectives of the Study

2.1 Scope of the Analysis

2.2 Chi Squared Goodness of Fit Test

2.3 Source of Data

3 Results and Discussion

3.1 Exponential Distribution

3.2 Gamma Distribution

images

images

4 Summary

5 Conclusion

References

Biographies