On a Queue with Correlated Arrivals

In this note we analyze the performance measures of a one server queue when arrivals are not independent. The analysis is based on the correlated Poisson distribution for customers arrival. Service may have any distribution. This type of queue is defined as M C /G/1. The formulas for the performance measures of the queue are derived without any approximation. Surprisingly, these formulas are very simple.


Introduction
The standard M/G/1 queue assumes Poisson arrival and general service distribution.Correlated arrival patterns are analyzed mainly as "batch arrivals" i.e. when an arrival occurs, there is a finite probability for an arrival of more than one customer at the same time.In this note we provide the basic queuing formulas for dependent arrivals with a given correlation factor θ. Exact formulas are developed for the performance measures of the queue.They are based on the mean and variance of the arrival rate.These formulas are simple and easy to use.

The GBD and CPD Distributions
The correlated Poisson distribution (CPD) (Drezner and Farnum, 1994) defines the probability of observing r events during time period t for a given arrival rate λ and a correlation factor θ. The CPD is the limit of the generalized binomial distribution(GBD) (Drezner and Farnum, 1993) with n trials, initial probability of success p, and correlation factor θ as p → 0 and n → ∞ while np remains constant.
We briefly describe these distributions.The GBD is based on a correlated Bernoulli process.An initial probability of success p is given.The probability of success changes with each additional trial.Suppose that r successes were observed in k trials.The "rate of success" is r k .The probability of success in trial k + 1 depends on the rate of success so far and is: (1 − θ)p + θ r k where θ is the correlation factor.When θ = 0, the probability of success remains at p and thus the distribution is the standard binomial distribution.The probability of success changes each trial when θ > 0. For large values of θ the probability distribution may be bi-modal.

Z. DREZNER
The limit of the GBD as n → ∞ for p = λ n (λ is the arrival rate), is the CPD.For θ = 0 the CPD is the standard Poisson distribution.For positive θ it is more likely that an event occurs right after another event because the recent "rate of success" is increased.After a dormant period, the recent rate of success is lower and the likelihood of an event occuring is reduced compared with that of the standard Poisson distribution.For θ > 0 the distribution has a thicker tail, and a higher probability of zero events than the standard Poisson distribution.The mean of the CPD is λ and its variance is λ 1−2θ for θ < 0.5.For θ ≥ 0.5 the variance of the CPD is infinite (Drezner and Farnum, 1994).The probability of r successes in any time period t is (Drezner and Farnum, 1994): where a 00 = 1, a rk = 0 if either r = −1 or k = −1 or k > r. a rk is calculated by the following recursive relation: , and so on.The arrival process is in batches.The batch arrivals are independent events according to a Poisson arrival with an arrival rate of (1 − θ)λ.While in the standard Poisson distribution, each batch has a size of one, in the CPD each batch may have one, two, or more events.The probabilities, p r , for r = 1, 2, . . . of getting a "batch" of r arrivals when an arrival of at least one customer occurs define a probability distribution.This probability distribution is termed the Arrival Probability Distribution (APD).In the next section we develop the properties of the APD.

The Arrival Probability Distribution
For the analysis in this section we need the Gamma function (Abramowitz and Stegun, 1972) and the Beta Function (Abramowitz and Stegun, 1972) For integer n Γ(n) = (n − 1)!.Also, the recursive relation Γ(n) = nΓ(n − 1) is useful.
Consider a short period of time t.We find the probability p r of a batch of r arrival if an arrival occurs at this time period t.The Arrival Probability Distribution (APD) defined by p r for r = 1, 2, . . . is the probability distribution of the number of events in one batch.
Proof: First we prove that for r ≥ 1: . By equation (2) a r0 = 0 for r ≥ 1.Also, a 11 = λt 1−θ 1+θ .For r > 1, a r1 = (r−1)θ 1+rθ a r−1,1 and therefore By a multiple mathematical induction on k and r it is easy to show that a rk consists of (λt) k multiplied by a function of r and θ.The property is true for k = 1 and every r by (5).Assume that it is true for k − 1 and every r.By equation (2) it is also true for k and r = 1.Now, holding k constant we prove it for every r by mathematical induction on r.This is clearly true by equation (2).Since a rk consists of (λt) k multiplied by a function of r and θ, lim Define: By equation ( 1) the Theorem follows. 2 Theorem 2 Proof: By (4): We now find the mean and variance of the Arrival Probability Distribution (APD).
Theorem 3 The mean of the APD is Proof: Theorem 4 The variance of the APD is , for θ < 0.5.
Proof: Similar to the proof of Theorem 3 we get: The variance is therefore: .2 Note that the series converge only for θ < 0.5.The variance of the APD is infinite for θ ≥ 0.5.

Performance Measures of the M C /G/1 Queue
The M C /G/1 queue is defined by a CPD arrival with an average rate of λ and a correlation factor θ. The service time has a general distribution with mean 1 µ and standard deviation σ.The average waiting time in line, W q , for batch arrivals is (Cox and Smith, 1961): Substituting the mean and variance of the APD (Theorem 3 and Theorem 4) leads to: Algebraic manipulations simplify (10) to: Other performance measures of the queue are:

Implementation
Assume that arrivals are distributed by a correlated Poisson distribution with a mean of λ and variance of σ 2 λ .When arrivals are independent, σ 2 λ = λ.However, if arrivals are not independent, then according to the CPD the probability of zero events in a given time interval t is greater than in the corresponding Poisson distribution, and so are the probabilities of large number of arrivals (tail probabilities).Therefore, a correlated arrival process leads to a variance greater than that of the Poisson distribution, namely, σ 2 λ > λ.Note that by assuming a finite variance of arrivals we implicitly assume that θ < 0.5.Otherwise, the variance of the arrivals is infinite.Service is distributed according to a general distribution with a mean of 1 µ and variance of σ 2 .These four values can be estimated from the data.
By the properties of the CPD (Drezner and Farnum, 1994), for θ, substituting in (11), and multiplying by λ to get L q , yields (note that the factor of λ is actually a product of the arrival rate of batches λ(1 − θ) and the average size of batches 1 1−θ ): and the other performance measures L, W q , and W may be directly calculated.

Z. DREZNER
The queue performance measures are functions of the four values λ, µ, σ 2 , σ 2 λ .Note how simple is the change from the M/G/1 formula to the M C /G/1 one: just adding µ(σ 2 λ − λ) in the numerator!In practical situations, it is recommended that the arrival process be analyzed, and its mean and variance be estimated.Unless arrivals are independent, the variance of the arrival process would exceed its mean.The performance measures of the M C /G/1 queue can be calculated by ( 12), taking into consideration dependency in the arrival process.

Simulating the Queuing Process
In order to simulate the correlated queue process with exponential service time, we use small time intervals ∆t and generated the number of arrivals and departures in that time interval.We keep a running record of L, the total number of customers in the system.Suppose that there were A arrivals and D departures during ∆t.The numbers are generated using the correlated Poisson distribution and the Poisson distribution, respectively.The number of customers, L, should be updated to max{L + A − D, 0} if the arrivals occurred before the departures, and max{L − D, 0} + A if the departures occurred prior to the arrivals.In most cases these two values are identical.It is possible to get any number between these two values if arrivals and departures are intermingled.If the values are different, we selected one of these two values with a probability of 0.5 for each.
It should be noted that no batch arrival process is assumed.The number of arriving customers A is drawn from the correlated Poisson distribution (1) which is calculated once at the begining of the simulation.This probability is true for any time period ∆t.The time does not have to be small.The simulations were performed for µ = 1, 2, . . ., 5 and integer λ < µ leading to ten different sets of arrival and service rates.For each set we tried θ = 0, which is M/M/1, and θ = 0.1, 0.2, 0.3, 0.4.We used ∆t = 0.01 and ran the simulation for 10, 000∆t to get to a steady state.The result of the simulation is L q at the last ∆t.Each simulation was repeated 10,000 times for a total of 100 million time periods per case.This procedure is ideal for a spreadsheet.We first tried the Excel add-on @risk but found that a simple Fortran program is more than two orders of magnitude faster.Therefore, we report the results obtained by a Fortran program even though the same results can be obtained by a standard simulation package such as @risk.
We observed that good results were obtained for θ ≤ 0.3 but the results for θ = 0.4 are too low.We first report in Table 1 results for θ ≤ 0.3 and then analyze in more detail the case θ = 0.4.
The z-scores reported in Table 1 have a mean of -0.04 and sum of squares 43.94 in perfect correspondence with expected mean of 0 and sum of squares 40.

Simulation for Large θ's
The results in Table 1 indicate that for θ ≤ 0.3 the simulation confirms the theoretical formula (12).However, for θ = 0.4 the same simulation provided L q values which are much lower than the theoretical ones.Initially, we truncated the correlated Poisson probabilities to 50.Then, we extended the probabilities list up to 100.This improved the results but still resulted in z-scores between -4 and -12, which are unacceptable.Even extending the probability list to 1,000 did not resolve this issue (for results with a list of 1,000 probabilities see Table 2).The maximum observed number of arrivals throughout the simulations was 281, so increasing the list of probabilities beyond this number would not improve the results beyond those reported in Table 2.
It turns out that the correlated Poisson distribution with a large θ has a very significant tail.This tends to underestimate the number of customers in line because part of the theoretical L q originates with a large number of arrivals which are not encountered in the simulation.When the probability list is truncated (it is effectively truncated at 281), the remaining probability (for arrivals of more than 281) is not negligible, and the variance of the truncted probability distribution is significantly lower than its theoretical value without any truncation.See these values in Table 3 In order to be able to simulate effectively with θ = 0.4 one must increase the number of simulations to such an extent that arrivals in the thousands will be encountered.Also, the random number generator used in our simulation provides for differences of 2 −31 which are not small enough to generate thousands of arrivals.It is important to note that increasing the number of time periods in each simulation to more than 10, 000∆t did not improve the results.In short, it seems that simulating large values of θ successfully is intractable using this approach.
Finally, we compared the simulation results in Table 2 with equation (12) using σ λ as the variance calculated for the truncated distribution (truncated at max{A}) which is reported in Table 3.This is not a simulation with correlated Poisson ar- rivals.Rather, it is a simulation using the truncated Correlated Poisson arrival.The results are summarized in Table 4.The results confirm that our process simulates the truncated distribution arrival process.The sum of the z-scores is 0.05 and their sum of squares is 8.96 as compared with the expected values of 0 and 10.

Call for Papers
As a multidisciplinary field, financial engineering is becoming increasingly important in today's economic and financial world, especially in areas such as portfolio management, asset valuation and prediction, fraud detection, and credit risk management.For example, in a credit risk context, the recently approved Basel II guidelines advise financial institutions to build comprehensible credit risk models in order to optimize their capital allocation policy.Computational methods are being intensively studied and applied to improve the quality of the financial decisions that need to be made.Until now, computational methods and models are central to the analysis of economic and financial decisions.
However, more and more researchers have found that the financial environment is not ruled by mathematical distributions or statistical models.In such situations, some attempts have also been made to develop financial engineering models using intelligent computing approaches.For example, an artificial neural network (ANN) is a nonparametric estimation technique which does not make any distributional assumptions regarding the underlying asset.Instead, ANN approach develops a model using sets of unknown parameters and lets the optimization routine seek the best fitting parameters to obtain the desired results.The main aim of this special issue is not to merely illustrate the superior performance of a new intelligent computational method, but also to demonstrate how it can be used effectively in a financial engineering environment to improve and facilitate financial decision making.In this sense, the submissions should especially address how the results of estimated computational models (e.g., ANN, support vector machines, evolutionary algorithm, and fuzzy models) can be used to develop intelligent, easy-to-use, and/or comprehensible computational systems (e.g., decision support systems, agent-based system, and web-based systems) This special issue will include (but not be limited to) the following topics: • Computational methods: artificial intelligence, neural networks, evolutionary algorithms, fuzzy inference, hybrid learning, ensemble learning, cooperative learning, multiagent learning t→0

Table 3 .
The Truncated Correlated Poisson Distribution

•
Application fields: asset valuation and prediction, asset allocation and portfolio selection, bankruptcy prediction, fraud detection, credit risk management • Implementation aspects: decision support systems, expert systems, information systems, intelligent agents, web service, monitoring, deployment, implementation