# Research on M/M/1 Queue of Exponential Departure Intensity

Authors: Huan Yang
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

For the queuing model with a single service window in system, the length of a queue has a great influence on the service rate. Study on the M/M/1 queuing model with variable service has practical significance. Also, the study can provide the basis for improving both economic efficiency and service efficiency. So far, there is little discussion about the departure intensity of exponential form for M/M/1 queue. On the basis of the study of Singh and Kumar Acharya (2021), this thesis has established the M/M/1 impatient waiting queue of leaving intensity ofαk=kek. First, the systems’ condition shift chart of the waiting queue has been drawn. Then, we obtained the steady-state distribution and analyzed the system performance measure. We gave an example to show the application of the model finally.


---

## Body

## 1. Introduction

In the actual service system, customers unwilling to wait will leave the system. Such customers are defined as impatient customers in queuing theory. We will meet the impatient customers frequently in the queuing model which has only one service window. The service rate will vary according to the length of the waiting queue in real life. Ordinarily, the length of the waiting queue is longer, and the impatient customers shall leave the system more likely. If the length of the queue isk, the departure intensity of impatient customers which will be recorded as αk is related to k. Exponential distributions are often related to time, so they are widely used in stochastic service systems. Therefore, we could present a reasonable assumption of departure Intensity, which is αk=kek.


## 2. The M/M/1 Impatient Waiting Queue with Departure Intensity ofαk = kek

### 2.1. Model Hypothesis

The queue will abide by the first-come-first-serviced (FCFS) regulation which is given in [2]. M/M/1 queue indicates that both the arrival interval and service time will obey the negative exponential distribution. Also, the system with only one service desk has an unlimited number of customers. Every time it can serve only one customer. The interval of arrival time is independent of each other. The service time required for each customer does not affect each other. Arrival of customers follows the Poisson flow.Suppose the mean value of arrival rate isλ, λ>0. Service time should obey the exponential distribution whose parameter is μμ>0. Customers have to wait when service desk is busy. Some impatient customers will leave the system without receiving the service after waiting for long time. The above conclusion is given in reference [3].The state transition in stable conditions about above model is shown in Figure1. Numbers in the circle represent the length of the queue of the corresponding state. The arrow indicates that one state transfers to another one. For each state, the rate of inflow should be equal to the rate of outflow when the system is in a steady state. Assume that the queue length is K. We can reach the conclusion that α0=0. When k⟶∞, αk⟶∞.Figure 1
Steady-state transition.According to the assumptions, the graphical representation of queuing process for the model can be described as shown in Figure2.Figure 2
The queuing process.Theorem 1.1.
AssumeXt indicates the length of waiting queue when the time is t. So, Xt,t≥0 is the birth and death process in the state space of I=0,1,2⋯. Formula about the rate of birth is shown in the following equation:(1)λk=λ,k=0,1,2,⋯.Formula about the rate of death is shown in the following equation:(2)μk=μ+αk−1=μ+k−1ek−1,k=1,2,3,⋯.When the number of customers isk, the length of waiting queue will be (k-1). Customers will leave the queue in light of Poisson distribution for seeking other service. Suppose that departure intensity of impatient waiting customers αk is equivalent to kek.We give the state transition of the model in the steady state in Figure 3.Figure 3
Steady-state transition for theM/M1 impatient queue with departure intensity of αk=kek.


### 2.2. Stationary Distribution

Theorem 1.2.
.AssumeXt indicates the number of waiting customers when the time is t. Also, pk=∧limt⟶∞pkt=limt⟶∞pXt=k.Whenρ=λ/μ<1, the system can become a steady state, where ρ represents the service intensity.We will give stationary distribution as follows:(3)pk=ρk∏i=1k−11+iei/μp0,(4)p0=1+ρ+∑k=2∞ρk∏i=1k−11+iei/μ−1.p0 represents the probability of the system in the idle period.Statistical balance theory of birth and death process is given in reference [4]. On the basis of balance theory, we can reach the conclusion that inflow of each state should be equal to outflow in a steady condition.Proof.
Therefore, the following ’K’s equations are given according to statistical balance theory.
For O-state:λp0=μp1⇒(5)p1=λμp0=ρp0,ρ=λμ.
For 1-state:λp1=μ+ep2⇒(6)p2=λμ+ep1=ρ1+e/μp1=ρ21+e/μp0.
For 2-state:λp2=μ+2e2p3⇒(7)p3=λμ+2e2p2=ρ1+2e2/μp2=ρ31+e/μ1+2e2/μp0.
For (k-1)-state: λpk−1=μ+k−1ek−1pk⇒(8)pk=λμ+k−1ek−1pk−1=ρ1+k−1ek−1/μpk−1=ρk1+e/μ1+2e2/μ⋯1+k−1ek−1/μp0=ρk∏i=1k−11+iei/μp0.
Fork-state: λpk=μ+kekpk+1⇒(9)pk+1=λμ+kekpk=ρ1+kek/μpk=ρk+11+e/μ1+2e2/μ⋯1+kek/μp0=ρk+1∏i=1k1+iei/μp0.
According to normalizing condition in [5], the following result can be derived:(10)1=∑k=0∞pk=p0+ρp0+ρ21+e/μp0+⋯+ρk∏i=1k−11+iei/μp0+⋯=1+ρ+∑k=2∞ρk∏i=1k−11+iei/μp0,k=0,1,2⋯.
So, we reach the conclusions as follows:(11)p0=1+ρ+∑k=2∞ρk∏i=1k−11+iei/μ−1,pk=ρk∏i=1k−11+iei/μp0.


### 2.3. The Main Measures

We can obtain key performance indicators of the system as long as the stationary distribution has been obtained.


#### 2.3.1. Probabilities of the System

The probability that the service desk is idlep0 is given by equation (4).The probability that the service desk is busyPb is as follows:(12)Pb=1−p0=1−1+ρ+∑k=2∞ρk∏i=1k−11+iei/μ−1.


#### 2.3.2. System Length

According to the definition of mathematical expectation of discrete random variables in [5], we can give the following formulae by combining the distribution of system length.The average number of positive customers waiting in queueLq is(13)Lq=∑k=1∞kpk+1=∑k=1∞kρk+1∏i=1k1+iei/μp0.The average number of positive customers in queueLs is(14)Ls=∑k=0∞kpk=∑k=1∞kρk∏i=1k−11+iei/μp0.The mean number of the impatient customers who leave system in unit timeLb is(15)Lb=∑k=0∞αkpk+1=∑k=0∞kekρk+1∏i=1k1+iei/μp0.Lb is also the average number of lost customers in unit time obviously.So, the steady-state absolute availability of modelA is(16)A=λ−Lb.The relative availability of modelQ is(17)Q=Aλ=1−Lbλ.


#### 2.3.3. Research on Time

By multiple use of Little’s formula, we obtain the mean waiting time of customers in systemWq and the time of customers staying in system Ws, respectively.(18)Wq=Lqλ=∑k=1∞kρk+1∏i=1k1+iei/μλp0,(19)WS=Lsλ=Wq+1μ.


## 2.1. Model Hypothesis

The queue will abide by the first-come-first-serviced (FCFS) regulation which is given in [2]. M/M/1 queue indicates that both the arrival interval and service time will obey the negative exponential distribution. Also, the system with only one service desk has an unlimited number of customers. Every time it can serve only one customer. The interval of arrival time is independent of each other. The service time required for each customer does not affect each other. Arrival of customers follows the Poisson flow.Suppose the mean value of arrival rate isλ, λ>0. Service time should obey the exponential distribution whose parameter is μμ>0. Customers have to wait when service desk is busy. Some impatient customers will leave the system without receiving the service after waiting for long time. The above conclusion is given in reference [3].The state transition in stable conditions about above model is shown in Figure1. Numbers in the circle represent the length of the queue of the corresponding state. The arrow indicates that one state transfers to another one. For each state, the rate of inflow should be equal to the rate of outflow when the system is in a steady state. Assume that the queue length is K. We can reach the conclusion that α0=0. When k⟶∞, αk⟶∞.Figure 1
Steady-state transition.According to the assumptions, the graphical representation of queuing process for the model can be described as shown in Figure2.Figure 2
The queuing process.Theorem 1.1.
AssumeXt indicates the length of waiting queue when the time is t. So, Xt,t≥0 is the birth and death process in the state space of I=0,1,2⋯. Formula about the rate of birth is shown in the following equation:(1)λk=λ,k=0,1,2,⋯.Formula about the rate of death is shown in the following equation:(2)μk=μ+αk−1=μ+k−1ek−1,k=1,2,3,⋯.When the number of customers isk, the length of waiting queue will be (k-1). Customers will leave the queue in light of Poisson distribution for seeking other service. Suppose that departure intensity of impatient waiting customers αk is equivalent to kek.We give the state transition of the model in the steady state in Figure 3.Figure 3
Steady-state transition for theM/M1 impatient queue with departure intensity of αk=kek.


## 2.2. Stationary Distribution

Theorem 1.2.
.AssumeXt indicates the number of waiting customers when the time is t. Also, pk=∧limt⟶∞pkt=limt⟶∞pXt=k.Whenρ=λ/μ<1, the system can become a steady state, where ρ represents the service intensity.We will give stationary distribution as follows:(3)pk=ρk∏i=1k−11+iei/μp0,(4)p0=1+ρ+∑k=2∞ρk∏i=1k−11+iei/μ−1.p0 represents the probability of the system in the idle period.Statistical balance theory of birth and death process is given in reference [4]. On the basis of balance theory, we can reach the conclusion that inflow of each state should be equal to outflow in a steady condition.Proof.
Therefore, the following ’K’s equations are given according to statistical balance theory.
For O-state:λp0=μp1⇒(5)p1=λμp0=ρp0,ρ=λμ.
For 1-state:λp1=μ+ep2⇒(6)p2=λμ+ep1=ρ1+e/μp1=ρ21+e/μp0.
For 2-state:λp2=μ+2e2p3⇒(7)p3=λμ+2e2p2=ρ1+2e2/μp2=ρ31+e/μ1+2e2/μp0.
For (k-1)-state: λpk−1=μ+k−1ek−1pk⇒(8)pk=λμ+k−1ek−1pk−1=ρ1+k−1ek−1/μpk−1=ρk1+e/μ1+2e2/μ⋯1+k−1ek−1/μp0=ρk∏i=1k−11+iei/μp0.
Fork-state: λpk=μ+kekpk+1⇒(9)pk+1=λμ+kekpk=ρ1+kek/μpk=ρk+11+e/μ1+2e2/μ⋯1+kek/μp0=ρk+1∏i=1k1+iei/μp0.
According to normalizing condition in [5], the following result can be derived:(10)1=∑k=0∞pk=p0+ρp0+ρ21+e/μp0+⋯+ρk∏i=1k−11+iei/μp0+⋯=1+ρ+∑k=2∞ρk∏i=1k−11+iei/μp0,k=0,1,2⋯.
So, we reach the conclusions as follows:(11)p0=1+ρ+∑k=2∞ρk∏i=1k−11+iei/μ−1,pk=ρk∏i=1k−11+iei/μp0.


## 2.3. The Main Measures

We can obtain key performance indicators of the system as long as the stationary distribution has been obtained.


### 2.3.1. Probabilities of the System

The probability that the service desk is idlep0 is given by equation (4).The probability that the service desk is busyPb is as follows:(12)Pb=1−p0=1−1+ρ+∑k=2∞ρk∏i=1k−11+iei/μ−1.


### 2.3.2. System Length

According to the definition of mathematical expectation of discrete random variables in [5], we can give the following formulae by combining the distribution of system length.The average number of positive customers waiting in queueLq is(13)Lq=∑k=1∞kpk+1=∑k=1∞kρk+1∏i=1k1+iei/μp0.The average number of positive customers in queueLs is(14)Ls=∑k=0∞kpk=∑k=1∞kρk∏i=1k−11+iei/μp0.The mean number of the impatient customers who leave system in unit timeLb is(15)Lb=∑k=0∞αkpk+1=∑k=0∞kekρk+1∏i=1k1+iei/μp0.Lb is also the average number of lost customers in unit time obviously.So, the steady-state absolute availability of modelA is(16)A=λ−Lb.The relative availability of modelQ is(17)Q=Aλ=1−Lbλ.


### 2.3.3. Research on Time

By multiple use of Little’s formula, we obtain the mean waiting time of customers in systemWq and the time of customers staying in system Ws, respectively.(18)Wq=Lqλ=∑k=1∞kρk+1∏i=1k1+iei/μλp0,(19)WS=Lsλ=Wq+1μ.


## 2.3.1. Probabilities of the System

The probability that the service desk is idlep0 is given by equation (4).The probability that the service desk is busyPb is as follows:(12)Pb=1−p0=1−1+ρ+∑k=2∞ρk∏i=1k−11+iei/μ−1.


## 2.3.2. System Length

According to the definition of mathematical expectation of discrete random variables in [5], we can give the following formulae by combining the distribution of system length.The average number of positive customers waiting in queueLq is(13)Lq=∑k=1∞kpk+1=∑k=1∞kρk+1∏i=1k1+iei/μp0.The average number of positive customers in queueLs is(14)Ls=∑k=0∞kpk=∑k=1∞kρk∏i=1k−11+iei/μp0.The mean number of the impatient customers who leave system in unit timeLb is(15)Lb=∑k=0∞αkpk+1=∑k=0∞kekρk+1∏i=1k1+iei/μp0.Lb is also the average number of lost customers in unit time obviously.So, the steady-state absolute availability of modelA is(16)A=λ−Lb.The relative availability of modelQ is(17)Q=Aλ=1−Lbλ.


## 2.3.3. Research on Time

By multiple use of Little’s formula, we obtain the mean waiting time of customers in systemWq and the time of customers staying in system Ws, respectively.(18)Wq=Lqλ=∑k=1∞kρk+1∏i=1k1+iei/μλp0,(19)WS=Lsλ=Wq+1μ.


## 3. Application

Patients who go to the clinics can be regarded as customers receiving services in the waiting queue. Also, the doctors can be considered as servers. We conducted a study on “Wang Hai Clinic” which is located in Shapingba District of Chongqing. Because there is only one doctor in clinic, he can treat only one patient every time. Patients are independent of each other. They will arrive at clinic randomly and independently. The number of patients is unlimited.


### 3.1. Collection of Data

Business hours of this clinic are from 9 a.m. to 9 p.m. So, we divided the business hours into 12 time frames. Suppose the unit time of survey is an hour. The data about the frequencies of patients’ arrival within eight consecutive days of 2022 are recorded in Table1. Apparently they are discrete random variables. Data were obtained from outpatient records of “Wang Hai Clinic.” Results of collation are presented in Table 2.Table 1
Arrival of patients.
Time frames dateJan.20Jan.21Jan.22Jan.23Jan.24Jan.25Jan.26Jan.279:00-10:005736533010:00-11:003365345411:00-12:001033101412:00-13:000321211013:00-14:001221221114:00-15:002232205315:00-16:007122032116:00-17:003420342117:00-18:000232210218:00-19:002011131119:00-20:001101122120:00-21:0013201120Table 2
Collation of data
Arrival of patientsi0123More than 4TotalFrequencyfi142824181296


### 3.2. Analysis of Results of Actual Application

#### 3.2.1. Study on Arrival of Patients

Then, we will study the arrival of patients. We use Pearson’s chi-squared test (see [6]) to check whether the number of arriving patients in an hour recorded in Table 2 obeys the Poisson distribution or not. Let the mean value of arrival rate be λ, λ>0.We use maximum likelihood estimation to estimate the unknown parameterλ in the Poisson distribution.Step1.
Let us calculate the average arrival rateλ.
SupposeX obeys the Poisson distribution(20)H0:PX=k=λkk!e−λ,k=0,1,2⋯.
The likelihood function ofλ is(21)Lλ=∏i=1nPX=xi=∏i=1nλxixi!e−λ=λi∑i=1nxix1!⋯x2!e−nλ.
We can get the following result after taking logarithms on both sides:(22)lnLλ=−nλ+∑i=1nxilnλ−∑i=1nlnxi!.
At last, we can have the likelihood equation.(23)dlnLλdλ=−n+1λ∑i=1nxi=0.
By solving the above equation, maximum likelihood estimator ofλ is given by(24)λ∧=1n∑i=1nxi=x¯,d2lnLλdλ2|λ∧=x¯=−nx¯λ2|λ∧=x¯=−nx¯<0.
So, we get the result of average arrival rate of the system.
λ∧=x¯=∑ifi/∑fi=0×14+1×28+2×24+3×18+4×12/96=1.854 person/hour. When the arrival number of patients is more than 4, i  = 4.Step2.
Let us conduct Pearson’s chi-squared test.
Probability that the random variable takes a value in group I is given by the following equation:(25)pi=1.854ii!e−1.854.
Equation (26) for Pearson chi-square fitting test can be obtained.(26)χ2=∑i=04fi−npi2npiwheren=96.
The record of Pearson chi-square fitting test for patients’ arrival numbers is as follows. Results of collation are presented in Table3.
We can easily haveχ2=3.2934 by means of equation (26), where the judgment criterion is given as α=0.05. Degree of freedom is 5-1-1 = 3.
By reading the chi-square distribution from Table3, we find that the critical value is χ0.0523=7.815. Because χ2<χ0.0523, the 5% level critical value, we accept null hypothesis. Therefore, it is believed that patients’ arriving number in an hour follows the Poisson distribution with λ=1.854 person/hour.Table 3
Chi-square test of Poisson distribution.
Number of patientsiActual frequencyftProbability of Poisson distribution (pi)Theoretical frequency (npi)fi−npi2npi0140.156615.03450.04651280.290427.84700.00062240.269225.83920.13093180.166315.96860.2584More than 4120.07717.40152.8570Total96χ2=3.2934


#### 3.2.2. Study on Service Time

In order to study probability distribution of the service time, we conducted a questionnaire survey for patients attending the Wang Hai Clinic from 20 January 2022 to 27 January 2022. The questionnaire mainly included the duration of visit, satisfaction level, and relevant suggestions. During this period, we distributed 105 questionnaires and recovered 100 questionnaires, including 96 valid questionnaires with an effective rate of 91.4%. Also, the survey data were checked with the help of monitoring system in Wang Hai Clinic. The actual service records which were derived from the questionnaire survey are shown in Table4.Table 4
The data about service time.
Service timeT (minutes)Actual frequencyft0∼153015∼303530∼452145∼608More than 602Total96Mean service time of patients can be given byt¯=∑mi¯fi/60∑fi=0.4172h. Also, m¯ is the midvalue of class m1¯=8,m2¯=23,m3¯=38,m4¯=53. When service time is more than 60 minutes, m5¯=68.By using SPSS software (see [7]), we did KS test to check whether service time obeys exponential distribution (see [8]) or not. The test result is shown in Table 5. Give the significance level α=0.05. Because 0.05 < 0.863, two-sided asymptotic significance level, we accept null hypothesis.Table 5
One-sample Kolmogorov–Smirnov test.
Actual frequencyN sample size5Exponential parameterMean19.00Most extreme differencesAbsolute0.269Positive0.158Negative−0.269Kolmogorov–SmirnovZ0.601Asymp. Sig. (2-tailed)0.863Instruction: test distribution is exponentialBoth the exponential P-P plot (Figure4) and detrended exponential P-P plot of service time (Figure 5) are plotted with the help of SPSS software.Figure 4
The exponential P-P plot.Figure 5
The detrended exponential P-P plot.In Figure4, most points are near the straight line. These points fall randomly around the 0-scale line in detrended exponential P-P plot in Figure 5. Both the plots indicated that the service time follows an exponential distribution.Then, we use maximum likelihood estimation to estimate the unknown parameterμ in exponential distribution.SupposeT obeys the exponential distribution(27)H0:φt=μe−μt,t>0,0,t≤0,μ>0.The likelihood function ofμ is(28)Lμ=∏i=1nφti=∏i=1nμe−μti=μne−μ∑i=1nti.We can get the following result after taking logarithms on both sides:(29)lnLμ=nlnμ+∑i=1ntiμ=nlnμ−t¯μ.We find(30)dlnLμdμ=n1μ−t¯=0.By solving the above equation, maximum likelihood estimator ofμ is given by(31)μ∧=1t¯,d2lnLμdμ2|μ∧=1t¯=−nμ2|μ∧=1t¯=−nμ2|μ∧=1t¯<0.The maximum release estimator ofμ can be denoted as(32)μ∧=1T¯.In conclusion, service time follows the exponential distribution of the parameterμ=1/t¯=2.3969 person/hour.


### 3.3. Calculation of Main Measures

The clinic system is theM/M/1 impatient waiting queue which follows the first-come-first-serviced (FCFS) regulation, where λ=1.854 and μ=1/t¯=2.3969.Main measures of the model with departure intensity ofαk=kek can be calculated from equations (3)–(12). Calculating formulae can be easily obtained:(33)ρ=λμ=1.8542.3969=0.7735,p0=1+0.7735+∑k=2∞0.7735k∏i=1k−11+iei/2.3969−1,Pm=1−p0,Lq=∑k=1∞k0.7735k+1∏i=1k1+iei/2.3969p0,Ls=∑k=1∞k0.7735k∏i=1k−11+iei/2.3969p0,Lb=∑k=0∞kek0.7735k+1∏i=1k1+iei/2.3969p0,A=λ−Lb,Q=Aλ,Wq=Lqλ,Ws=Lsλ.With the help of Maple software (see [9]), we can get results of main indexes recorded in Table 6.Table 6
The results of main indexes.
p0PmLqLsLbAQWqWs0.47960.52040.22880.68520.60671.24730.67280.12340.3696


## 3.1. Collection of Data

Business hours of this clinic are from 9 a.m. to 9 p.m. So, we divided the business hours into 12 time frames. Suppose the unit time of survey is an hour. The data about the frequencies of patients’ arrival within eight consecutive days of 2022 are recorded in Table1. Apparently they are discrete random variables. Data were obtained from outpatient records of “Wang Hai Clinic.” Results of collation are presented in Table 2.Table 1
Arrival of patients.
Time frames dateJan.20Jan.21Jan.22Jan.23Jan.24Jan.25Jan.26Jan.279:00-10:005736533010:00-11:003365345411:00-12:001033101412:00-13:000321211013:00-14:001221221114:00-15:002232205315:00-16:007122032116:00-17:003420342117:00-18:000232210218:00-19:002011131119:00-20:001101122120:00-21:0013201120Table 2
Collation of data
Arrival of patientsi0123More than 4TotalFrequencyfi142824181296


## 3.2. Analysis of Results of Actual Application

### 3.2.1. Study on Arrival of Patients

Then, we will study the arrival of patients. We use Pearson’s chi-squared test (see [6]) to check whether the number of arriving patients in an hour recorded in Table 2 obeys the Poisson distribution or not. Let the mean value of arrival rate be λ, λ>0.We use maximum likelihood estimation to estimate the unknown parameterλ in the Poisson distribution.Step1.
Let us calculate the average arrival rateλ.
SupposeX obeys the Poisson distribution(20)H0:PX=k=λkk!e−λ,k=0,1,2⋯.
The likelihood function ofλ is(21)Lλ=∏i=1nPX=xi=∏i=1nλxixi!e−λ=λi∑i=1nxix1!⋯x2!e−nλ.
We can get the following result after taking logarithms on both sides:(22)lnLλ=−nλ+∑i=1nxilnλ−∑i=1nlnxi!.
At last, we can have the likelihood equation.(23)dlnLλdλ=−n+1λ∑i=1nxi=0.
By solving the above equation, maximum likelihood estimator ofλ is given by(24)λ∧=1n∑i=1nxi=x¯,d2lnLλdλ2|λ∧=x¯=−nx¯λ2|λ∧=x¯=−nx¯<0.
So, we get the result of average arrival rate of the system.
λ∧=x¯=∑ifi/∑fi=0×14+1×28+2×24+3×18+4×12/96=1.854 person/hour. When the arrival number of patients is more than 4, i  = 4.Step2.
Let us conduct Pearson’s chi-squared test.
Probability that the random variable takes a value in group I is given by the following equation:(25)pi=1.854ii!e−1.854.
Equation (26) for Pearson chi-square fitting test can be obtained.(26)χ2=∑i=04fi−npi2npiwheren=96.
The record of Pearson chi-square fitting test for patients’ arrival numbers is as follows. Results of collation are presented in Table3.
We can easily haveχ2=3.2934 by means of equation (26), where the judgment criterion is given as α=0.05. Degree of freedom is 5-1-1 = 3.
By reading the chi-square distribution from Table3, we find that the critical value is χ0.0523=7.815. Because χ2<χ0.0523, the 5% level critical value, we accept null hypothesis. Therefore, it is believed that patients’ arriving number in an hour follows the Poisson distribution with λ=1.854 person/hour.Table 3
Chi-square test of Poisson distribution.
Number of patientsiActual frequencyftProbability of Poisson distribution (pi)Theoretical frequency (npi)fi−npi2npi0140.156615.03450.04651280.290427.84700.00062240.269225.83920.13093180.166315.96860.2584More than 4120.07717.40152.8570Total96χ2=3.2934


### 3.2.2. Study on Service Time

In order to study probability distribution of the service time, we conducted a questionnaire survey for patients attending the Wang Hai Clinic from 20 January 2022 to 27 January 2022. The questionnaire mainly included the duration of visit, satisfaction level, and relevant suggestions. During this period, we distributed 105 questionnaires and recovered 100 questionnaires, including 96 valid questionnaires with an effective rate of 91.4%. Also, the survey data were checked with the help of monitoring system in Wang Hai Clinic. The actual service records which were derived from the questionnaire survey are shown in Table4.Table 4
The data about service time.
Service timeT (minutes)Actual frequencyft0∼153015∼303530∼452145∼608More than 602Total96Mean service time of patients can be given byt¯=∑mi¯fi/60∑fi=0.4172h. Also, m¯ is the midvalue of class m1¯=8,m2¯=23,m3¯=38,m4¯=53. When service time is more than 60 minutes, m5¯=68.By using SPSS software (see [7]), we did KS test to check whether service time obeys exponential distribution (see [8]) or not. The test result is shown in Table 5. Give the significance level α=0.05. Because 0.05 < 0.863, two-sided asymptotic significance level, we accept null hypothesis.Table 5
One-sample Kolmogorov–Smirnov test.
Actual frequencyN sample size5Exponential parameterMean19.00Most extreme differencesAbsolute0.269Positive0.158Negative−0.269Kolmogorov–SmirnovZ0.601Asymp. Sig. (2-tailed)0.863Instruction: test distribution is exponentialBoth the exponential P-P plot (Figure4) and detrended exponential P-P plot of service time (Figure 5) are plotted with the help of SPSS software.Figure 4
The exponential P-P plot.Figure 5
The detrended exponential P-P plot.In Figure4, most points are near the straight line. These points fall randomly around the 0-scale line in detrended exponential P-P plot in Figure 5. Both the plots indicated that the service time follows an exponential distribution.Then, we use maximum likelihood estimation to estimate the unknown parameterμ in exponential distribution.SupposeT obeys the exponential distribution(27)H0:φt=μe−μt,t>0,0,t≤0,μ>0.The likelihood function ofμ is(28)Lμ=∏i=1nφti=∏i=1nμe−μti=μne−μ∑i=1nti.We can get the following result after taking logarithms on both sides:(29)lnLμ=nlnμ+∑i=1ntiμ=nlnμ−t¯μ.We find(30)dlnLμdμ=n1μ−t¯=0.By solving the above equation, maximum likelihood estimator ofμ is given by(31)μ∧=1t¯,d2lnLμdμ2|μ∧=1t¯=−nμ2|μ∧=1t¯=−nμ2|μ∧=1t¯<0.The maximum release estimator ofμ can be denoted as(32)μ∧=1T¯.In conclusion, service time follows the exponential distribution of the parameterμ=1/t¯=2.3969 person/hour.


## 3.2.1. Study on Arrival of Patients

Then, we will study the arrival of patients. We use Pearson’s chi-squared test (see [6]) to check whether the number of arriving patients in an hour recorded in Table 2 obeys the Poisson distribution or not. Let the mean value of arrival rate be λ, λ>0.We use maximum likelihood estimation to estimate the unknown parameterλ in the Poisson distribution.Step1.
Let us calculate the average arrival rateλ.
SupposeX obeys the Poisson distribution(20)H0:PX=k=λkk!e−λ,k=0,1,2⋯.
The likelihood function ofλ is(21)Lλ=∏i=1nPX=xi=∏i=1nλxixi!e−λ=λi∑i=1nxix1!⋯x2!e−nλ.
We can get the following result after taking logarithms on both sides:(22)lnLλ=−nλ+∑i=1nxilnλ−∑i=1nlnxi!.
At last, we can have the likelihood equation.(23)dlnLλdλ=−n+1λ∑i=1nxi=0.
By solving the above equation, maximum likelihood estimator ofλ is given by(24)λ∧=1n∑i=1nxi=x¯,d2lnLλdλ2|λ∧=x¯=−nx¯λ2|λ∧=x¯=−nx¯<0.
So, we get the result of average arrival rate of the system.
λ∧=x¯=∑ifi/∑fi=0×14+1×28+2×24+3×18+4×12/96=1.854 person/hour. When the arrival number of patients is more than 4, i  = 4.Step2.
Let us conduct Pearson’s chi-squared test.
Probability that the random variable takes a value in group I is given by the following equation:(25)pi=1.854ii!e−1.854.
Equation (26) for Pearson chi-square fitting test can be obtained.(26)χ2=∑i=04fi−npi2npiwheren=96.
The record of Pearson chi-square fitting test for patients’ arrival numbers is as follows. Results of collation are presented in Table3.
We can easily haveχ2=3.2934 by means of equation (26), where the judgment criterion is given as α=0.05. Degree of freedom is 5-1-1 = 3.
By reading the chi-square distribution from Table3, we find that the critical value is χ0.0523=7.815. Because χ2<χ0.0523, the 5% level critical value, we accept null hypothesis. Therefore, it is believed that patients’ arriving number in an hour follows the Poisson distribution with λ=1.854 person/hour.Table 3
Chi-square test of Poisson distribution.
Number of patientsiActual frequencyftProbability of Poisson distribution (pi)Theoretical frequency (npi)fi−npi2npi0140.156615.03450.04651280.290427.84700.00062240.269225.83920.13093180.166315.96860.2584More than 4120.07717.40152.8570Total96χ2=3.2934


## 3.2.2. Study on Service Time

In order to study probability distribution of the service time, we conducted a questionnaire survey for patients attending the Wang Hai Clinic from 20 January 2022 to 27 January 2022. The questionnaire mainly included the duration of visit, satisfaction level, and relevant suggestions. During this period, we distributed 105 questionnaires and recovered 100 questionnaires, including 96 valid questionnaires with an effective rate of 91.4%. Also, the survey data were checked with the help of monitoring system in Wang Hai Clinic. The actual service records which were derived from the questionnaire survey are shown in Table4.Table 4
The data about service time.
Service timeT (minutes)Actual frequencyft0∼153015∼303530∼452145∼608More than 602Total96Mean service time of patients can be given byt¯=∑mi¯fi/60∑fi=0.4172h. Also, m¯ is the midvalue of class m1¯=8,m2¯=23,m3¯=38,m4¯=53. When service time is more than 60 minutes, m5¯=68.By using SPSS software (see [7]), we did KS test to check whether service time obeys exponential distribution (see [8]) or not. The test result is shown in Table 5. Give the significance level α=0.05. Because 0.05 < 0.863, two-sided asymptotic significance level, we accept null hypothesis.Table 5
One-sample Kolmogorov–Smirnov test.
Actual frequencyN sample size5Exponential parameterMean19.00Most extreme differencesAbsolute0.269Positive0.158Negative−0.269Kolmogorov–SmirnovZ0.601Asymp. Sig. (2-tailed)0.863Instruction: test distribution is exponentialBoth the exponential P-P plot (Figure4) and detrended exponential P-P plot of service time (Figure 5) are plotted with the help of SPSS software.Figure 4
The exponential P-P plot.Figure 5
The detrended exponential P-P plot.In Figure4, most points are near the straight line. These points fall randomly around the 0-scale line in detrended exponential P-P plot in Figure 5. Both the plots indicated that the service time follows an exponential distribution.Then, we use maximum likelihood estimation to estimate the unknown parameterμ in exponential distribution.SupposeT obeys the exponential distribution(27)H0:φt=μe−μt,t>0,0,t≤0,μ>0.The likelihood function ofμ is(28)Lμ=∏i=1nφti=∏i=1nμe−μti=μne−μ∑i=1nti.We can get the following result after taking logarithms on both sides:(29)lnLμ=nlnμ+∑i=1ntiμ=nlnμ−t¯μ.We find(30)dlnLμdμ=n1μ−t¯=0.By solving the above equation, maximum likelihood estimator ofμ is given by(31)μ∧=1t¯,d2lnLμdμ2|μ∧=1t¯=−nμ2|μ∧=1t¯=−nμ2|μ∧=1t¯<0.The maximum release estimator ofμ can be denoted as(32)μ∧=1T¯.In conclusion, service time follows the exponential distribution of the parameterμ=1/t¯=2.3969 person/hour.


## 3.3. Calculation of Main Measures

The clinic system is theM/M/1 impatient waiting queue which follows the first-come-first-serviced (FCFS) regulation, where λ=1.854 and μ=1/t¯=2.3969.Main measures of the model with departure intensity ofαk=kek can be calculated from equations (3)–(12). Calculating formulae can be easily obtained:(33)ρ=λμ=1.8542.3969=0.7735,p0=1+0.7735+∑k=2∞0.7735k∏i=1k−11+iei/2.3969−1,Pm=1−p0,Lq=∑k=1∞k0.7735k+1∏i=1k1+iei/2.3969p0,Ls=∑k=1∞k0.7735k∏i=1k−11+iei/2.3969p0,Lb=∑k=0∞kek0.7735k+1∏i=1k1+iei/2.3969p0,A=λ−Lb,Q=Aλ,Wq=Lqλ,Ws=Lsλ.With the help of Maple software (see [9]), we can get results of main indexes recorded in Table 6.Table 6
The results of main indexes.
p0PmLqLsLbAQWqWs0.47960.52040.22880.68520.60671.24730.67280.12340.3696


## 4. Suggestions and Conclusions

The service intensity of clinicρ is 77.35%. That is to say, workload of the doctor was saturated. The average number of waiting patients in the system is 0.2288. The relative passing capacity of the system is 67.28% which is relatively high. Therefore, we only need one doctor for the clinic.We noticed that the average waiting time for the service has reached seven minutes. So we will suggest to add a service desk when the system is busy. 9:00–11:00 is the peak period of the clinic queue on weekdays. Also, 9:00–12:00 is the peak period of the queue on the weekend. For example, it can be advised that the nurse can complete other work other than diagnosis during 9:00–11:00. System is busy in only 52.04% of the time which was known byPm. The doctor in the clinic has relatively more leisure time. It is recommended that doctor reduce his working hours appropriately during the low peak period of queuing. Working hours on both weekends and weekdays are recommended to be changed as 9:00–12:00 and 14:00–19:00 uniformly.We have studied the M/M/1 model with leaving intensity ofαk=kek. Both the stationary distribution and main measures of system have been obtained and analyzed. The most important contribution of this study is its application in medical industry. Verification of effectiveness for the model has practical significance. The M/M/1 queuing model of other leaving intensity can be further researched to broaden the field of application of the model. Systems may find widespread use in the catering industry, hairdressing, and retailing.



---

*Source: 6139847-2022-08-19.xml*