Application of Bivariate Conditional Erlang Distribution to
Sequential Medical Procedures
TOLUWANI J DARE1, OLUBUNMI T OLORUNPOMI2, ANSELM O OYEM3*
1,2Department of Statistics
Federal University Lokoja,
PMB 1154, Lokoja
NIGERIA
3Department of Mathematics
Busitema University
P.O. Box 236, Tororo
UGANDA
Abstract: - This investigation applied Bivariate Conditional Erlang Distribution (BCED) to model two key
sequential medical procedures: Time to Blood Glucose Monitoring (T1) and Time to Follow-Up Treatment
(T2). The findings estimated T1 to have a shape parameter of 24.14 and a scale parameter of 0.642, while
T2 had a shape parameter of 25.87 and a scale parameter of 0.847. The Goodness-of-fit tests using the
Kolmogorov-Smirnov method yielded p-values of 0.9129 for T1 and 0.9462 for T2, confirming that the
Erlang distribution adequately describes both processes. A strong positive correlation of 0.983 between T1
and T2, with a highly significant p-value of  , indicated a close relationship between the two
procedures. These outcomes confirmed that, when the time for blood glucose monitoring increases, the time
for follow-up treatment also rises proportionately. Visualizations using bivariate Gaussian kernel density
estimates further reinforced these findings by demonstrating the concentration of data points around the
joint mode of the two variables. This investigation illuminates the appropriateness of the BCED for
modelling real-world dependent stochastic processes, particularly in healthcare where interrelated tasks like
T1 and T2 can be adequately trapped. The analysis offers a solid foundation for using the Erlang distribution
in healthcare procedure modelling and offers insights for improving time efficiency in sequential medical
operations.
Key-Words: - Bivariate, Kolmogorov-Smirnov, Random Variable, Density Function, Distribution.
Received: March 19, 2024. Revised: October 14, 2024. Accepted: November 3, 2024. Published: December 20, 2024.
1 Introduction
Univariate distribution relationships, [8] delve
into the intricate connections between Erlang
distribution and other probability distributions,
[5], [12]. Lawrence’s work encompasses an
investigation of Erlang’s placement within the
family of exponential distributions and its ties to
the gamma distribution. Moreover, Saralees
noted in 2005 that there have been limited
proposals for bivariate gamma distributions
within statistical literature [13].
The Erlang distribution, pioneered by Erlang,
originally aimed to model the number of
telephone calls received simultaneously by an
operator at a switching station, [8]. This
distribution holds significant relevance in
telecommunications and queueing theory, [14].
Halliday in 1990 established the complementary
relationship between the Erlang and Poisson
EQUATIONS
DOI: 10.37394/232021.2024.4.10
Toluwani J Dare,
Olubunmi T Olorunpomi, Anselm O Oyem
E-ISSN: 2732-9976
83
Volume 4, 2024
distributions [6]. While the Poisson distribution
counts events occurring within a fixed time
frame, the Erlang distribution quantifies the time
until a fixed number of events occur, [3].
Consequently, the Poisson, Exponential, Erlang,
and Gamma distributions are closely intertwined,
[11]. The gamma distribution widely employed in
reliability analysis, queueing theory, and finance,
shares mathematical properties with the Erlang
distribution, [14], [1]. Specifically, the bivariate
gamma distribution is notably linked to the Erlang
distribution due to their shared underlying
mathematical characteristics, [10]. As we embark
on this study, our focus turns to the bivariate
conditional Erlang distribution. Building upon the
foundational research of Gongskin and Saporu [5]
and Saralees and Arjun [13], we aim to unravel
the complexities and implications of this bivariate
conditional extension.
2 Problem Formulation
The method of extending family of distributions
for added flexibility and potentiality is a familiar
technique in the literature. In random phenomena,
modeling and analyzing lifetime data are very
essential in the fields of sciences and applied
sciences such medicine, engineering, finance,
economics, biomedical sciences, public health,
among others. Several lifetime distributions have
been used to analyze such kinds of data in
practice, but the quality of the procedure used in
statistical study depends on the assumed
probability model [8].
2.1 Bivariate conditional Erlang
distribution model
The Erlang distribution is a continuous
probability distribution that is widely used in
various fields such as queueing theory,
telecommunications, and reliability engineering
[2] [14] [7]. It is a special case of the Gamma
distribution, specifically designed for modeling
the sum of several exponential variables, where
the shape parameter α is an integer ( ) and
the rate parameter is equal to .
The Gamma distribution’s PDF is given by:
(1)
where Γ(α) is the Gamma function, which
generalizes the factorial function to real and
complex numbers.
In this article, we will explore the Erlang
distribution and its connection to the exponential
family of distributions. The Erlang distribution is
parameterized by two values: k, a positive integer,
and λ, a positive real number. The probability
density function (PDF) for ,
(positive integers), and of an Erlang
distributed random variable X is given by:
(2)
Given a random variable that depends on
another random variable , where the distribution
of given follows an Erlang distribution
with scale parameter and shape parameter , we
can express the probability density function
(PDF) of  .
Recall that the PDF of an Erlang distributed
random variable with shape parameter (which
is an integer) and rate parameter is given by:
(3)
Note that x must be a positive integer for this
distribution to be an Erlang distribution, as the
shape parameter of the Erlang distribution is
defined as a positive integer. In this scenario,
since  follows an Erlang distribution with
shape parameter and rate parameter .
Therefore; for , the probability density
function of Y given is
(4)
This PDF characterizes the conditional
distribution of Y given the value of X, showing
that Y follows an Erlang distribution whose shape
parameter is determined by the realization of X
and whose scale parameter is . To derive the
joint probability density function known as the
bivariate conditional Erlang distribution (BCED)
for and in terms of the marginal and
conditional density functions, we can utilize the
concept of conditional probability. Given that
follows an Erlang distribution conditional on the
realization of , we can express the joint PDF of
and using the conditional PDF of given
and the marginal PDF of .
EQUATIONS
DOI: 10.37394/232021.2024.4.10
Toluwani J Dare,
Olubunmi T Olorunpomi, Anselm O Oyem
E-ISSN: 2732-9976
84
Let
X
fx
denote the marginal PDF of X, and
YX
f y x
denote the conditional PDF of Y given
. Then, the joint PDF of X and Y, denoted
as
,
XY
f x y
can be derived using the conditional
PDF and the marginal PDF as given in Equation
(5) where,
,
XY X
YX
f x y f y x f x
,
and the BCED for , , and is
then given by:
(5)
(6)
Theorem 1:
If 󰇛 󰇜 is a true bivariate probability density
function for  󰇛 󰇜 then,
(7)
Proof:
Let
Since 󰇛󰇜 , the integrand can
be separated:
Evaluating the inner integral with respect to , we
have
The inner integral is the Gamma function,
Γ(x) for 
Substitute the result back into the integral
Since Γ󰇛󰇜 󰇛 󰇜, then
Again,
Therefore,
Since Γ󰇛󰇜 󰇛 󰇜, the expression simplifies
to
Thus, the given integral evaluates to 1, which
verifies the normalization condition for the
bivariate conditional Erlang distribution is
Since , it indicates that Equation (7) is a
true bivariate probability density function and
represented in Fig. 1 for different values of λ and
k.
Fig 1: Density curves of the bivariate conditional
Erlang distribution for various parameter values
2.2 Generalization
Let Erlang density defined as in Equation (3) and
the conditional Erlang density function of
 , for be given by
Consider random variables
such that
 and
 ,  ,
EQUATIONS
DOI: 10.37394/232021.2024.4.10
Toluwani J Dare,
Olubunmi T Olorunpomi, Anselm O Oyem
E-ISSN: 2732-9976
85
, are independent. It is easy to show that the
joint density of 

is given by
11
, , , p
pi
i
f x y y f x f y X x

(8)
2.3 Properties of BCED (Marginal
distribution of Y)
Theorem 2:
The random variable Y in the joint density (6) has
a marginal distribution, given by:
where X follows a Poisson distribution with
parameter λ, i.e.,
, 0,1,2,...
!
x
Xe
f x x
x

0
,
Y
f y f x y dx
Proof:
11
1
01 ! ! 1 ! !
x x y x x x y x
x
y e e y e e
dx
x x x x

1
11 ! 1 !
x x y x
Yx
y e e
fy x x x


21
2
11!
x x y x
Yx
y e e
fy xx


21
1
2
11!
xx
y
x
y
exx


(9)
Given that Y given X follows an Erlang
distribution and X follows a Poisson distribution,
we can identify that the marginal distribution of Y
(which is the sum of X exponential random
variables) follows a Gamma distribution
󰇛󰇜
, , which is the form of an
exponential distribution with rate λ.
2.4 Moments of BCED (Joint Moment)
The ( )th joint moments for X and Y can be
derived as follows:
Simplifying
Combining the exponential terms, we have
Separating the integral gives
Therefore,
Substitute this result becomes
Simplifying further
(10)
2.5 Marginal moments and covariance
matrix
The marginal moments of X and Y can be derived
from the joint moment in Equation (10) by
appropriate substitution. When , we obtain
the rth marginal moment of X given by
(11)
Similarly, when , we obtain the th marginal
moment of Y as
(12)
while, the covariance between X and Y is defined
by:
󰇛 󰇜 󰇛󰇜 󰇛󰇜󰇛󰇜
From Equation (9),
Then,
EQUATIONS
DOI: 10.37394/232021.2024.4.10
Toluwani J Dare,
Olubunmi T Olorunpomi, Anselm O Oyem
E-ISSN: 2732-9976
86
Thus, a random vector 󰇛 󰇜 having the
bivariate conditional Erlang distribution has the
mean vector:
1
0
1!
1!
k
sx
ks
rk
k
kt dt









(13)
And the variance–covariance matrix of X is given
by:
2
2
2
11
20
2
11
200
1
1 ! 1 1 ! 1 !
1 ! 1 ! 1
1!
k s k k sx
ks
ks x s x
k s k s
r k r k r k k
et dt
k s x k k
r k k k
et dt e t dt
k


 










 











(14)
The correlation between X and Y is defined by
(15)
2.5 Method of Parameter Estimation
The maximum likelihood method of estimation of
the parameter of BCED can be obtained as
follow:
(16)
The derivatives of the log likelihood function (16)
with respect to λ is given below
(17)
Set the Derivative to Zero and Solve for λ
where
and
Thus, the maximum likelihood estimate for λ is:
(18)
3 Problem Solution
In this study, the time required for two sequential
medical procedures in diabetes management,
modeled using a bivariate Erlang distribution was
analyzed. The dataset comprises measurement of
the time to complete blood glucose monitoring
(T1) and the time to finalize follow-up treatment
based on monitoring results (T2).
The estimated Erlang distribution parameters
for the Time to Blood Glucose Monitoring (T1)
were a shape parameter of 24.14 and a scale
parameter of 0.642. While, for the Time to
Follow-Up Treatment (T2), the parameters were
a shape parameter of 25.87 and a scale parameter
of 0.847.
The Kolmogorov-Smirnov tests for both T1
and T2 produced high p-values (0.9129 for T1
and 0.9462 for T2). These results suggested that
the Erlang model provides a good fit for both
procedures, capturing their distributional
characteristics effectively.
A strong positive correlation of 0.983 between
T1 and T2 with a highly significant p-value of
  also indicates that the times for
these two sequential medical procedures are
closely related. The plots in Figs. 2, 3, 4 and 5
strengthens the statistical outcomes. The contour
lines in Fig. 2 represent the bivariate Gaussian
kernel density estimate (KDE).
EQUATIONS
DOI: 10.37394/232021.2024.4.10
Toluwani J Dare,
Olubunmi T Olorunpomi, Anselm O Oyem
E-ISSN: 2732-9976
87
Fig 2: The contour plot overlaid with a scatter plot
of T1 (Time to Blood Glucose Monitoring) versus
T2 (Time to Follow-Up Treatment).
Fig 3: The histograms for T1 (Time to Blood
Glucose Monitoring) and T2 (Time to Follow-Up
Treatment), each overlaid with the fitted Gamma
(Erlang) distribution curve.
Fig 4: Bivariate Cumulative Exponential
Distribution (BCED) Plot for T1 and T2.
The BCED plot of Fig 4, typically show a
smooth gradient from lower to higher cumulative
probabilities as both T1 and T2 increase.
Fig 5: Density plot of Y for varying λ and k.
The results of numerical integration of the
area under curve of the marginal distribution y are
given as publicized in Table 1 to Table 4.
Table 1. The results of numerical integration of
the area under curve of the marginal distribution
y for Fig. 1
Parameter value
a
b
c
Numerical Integration
0.5
0.5
0.5
0.999926060672114
1
1
1
1.000000000002793
1.5
1.5
1.5
1.000000000004236
2.5
2.5
2.5
1.000000000006227
3.5
3.5
3.5
1.000000000179541
4.5
4.5
4.5
1.000000000237848
5.5
5.5
5.5
1.000000000007505
7.5
7.5
7.5
0.999999999989926
Table 2. The results of numerical integration of
the area under curve of the marginal distribution
y for Fig. 2.
Parameter
value
a
b
c
Numerical Integration
0.5
0.5
0.5
0.999977140718329
1
1
1
1.0000000000007145
1.5
1.5
1.5
1.0000000000000645
2.5
2.5
2.5
1.0000000000008510
3.5
3.5
3.5
1.0000000000015686
EQUATIONS
DOI: 10.37394/232021.2024.4.10
Toluwani J Dare,
Olubunmi T Olorunpomi, Anselm O Oyem
E-ISSN: 2732-9976
88
4.5
4.5
4.5
1.0000000000045356
5.5
5.5
5.5
0.9999999999967937
7.5
7.5
7.5
0.9999999999878894
Table 3. The results of numerical integration of
the area under curve of the marginal distribution
y for Fig. 3.
Parameter
value
a
b
c
Numerical Integration
0.5
0.5
0.5
1.0000000000019935
1
1
1
1.0000000000006379
1.5
1.5
1.5
1.0000000000003677
2.5
2.5
2.5
1.0000000000004343
3.5
3.5
3.5
1.0000000000288260
4.5
4.5
4.5
0.9999999999961643
5.5
5.5
5.5
0.9999999999979663
7.5
7.5
7.5
1.0000000000012034
Table 4. The results of numerical integration of
the area under curve of the marginal distribution
y for Fig. 4.
Parameter
value
a
b
c
Numerical Integration
0.5
0.5
0.5
0.9999999999122686
1
1
1
1.0000000000016196
1.5
1.5
1.5
0.9999999999999252
2.5
2.5
2.5
1.0000000000027870
3.5
3.5
3.5
1.0000000000003789
4.5
4.5
4.5
1.0000000000046242
5.5
5.5
5.5
1.0000000000047694
7.5
7.5
7.5
0.9999999999894141
4 Conclusion
In this paper, Bivariate Conditional Erlang
Distribution was introduced with properties such
as moments, generating functions, quantile
function, random number generation, and other
statistics, were extensively considered and
analyzed. The analysis of the time to blood
glucose monitoring (T1) and the time to follow-
up treatment (T2) was conducted using the
bivariate Erlang distribution, demonstrating a
significant relationship between these two
sequential medical procedures. Through
parameter estimation and goodness-of-fit tests,
the individual distributions of T1 and T2 were
confirmed to align well with the Erlang
distribution, as evidenced by the Kolmogorov-
Smirnov test results. The high Pearson correlation
coefficient further supported the positive
dependency between T1 and T2, indicating that
as the time for one procedure increases, the other
is likely to follow suit. Visualizations, including
scatter plots and BCED contour plots, provided a
clear depiction of this relationship, which
showcase the joint cumulative probabilities of the
two times. The marginal density plots of T1 and
T2 confirmed the consistency of the data with the
assumed distribution, justifying the use of the
bivariate Erlang model in this context.
Acknowledgement:
It is an optional section where the authors may
write a short text on what should be
acknowledged regarding their manuscript.
References:
[1] Abdul Haq, S., & Dey, S., Bayesian
estimation of Erlang distribution under
different prior distributions, Journal of
Reliability and Statistical Studies, Vol.4,
No.1, 2021, pp. 130.
[2] Balakrishnan, N., & Lai, C. D., Continuous
Bivariate Distributions (2nd Ed.). Springer,
2009.
[3] Belikov, A. V., Vyatkin, A., & Leonov, S.
V. , The Erlang distribution approximates
the age distribution of incidence of
childhood and young adulthood cancers,
Peer Journal, Vol.9, 2021, e11976.
[4] Bhattacharya, S. K., & Tiwari, R. C.,
Hierarchical Bayesian Reliability Analysis
using Erlang Families of Priors and
Hyperpriors, Microelectronics Reliability,
Vol.32, No.1–2, 1992, pp. 241–247.
https://doi.org/10.1016/0026-
2714(92)90102-Q
[5] Esbond, G., & Saporu, F. A., Bivariate
Conditional Weibull Distribution with
Application, Afrika Matematika, Vol.31,
2019. https://doi.org/10.1007/s13370-019-
00742-8.
[6] Halliday, R., Gregory, K., Naylor, H.,
Callaway, E., & Yano, L., Beyond drug
EQUATIONS
DOI: 10.37394/232021.2024.4.10
Toluwani J Dare,
Olubunmi T Olorunpomi, Anselm O Oyem
E-ISSN: 2732-9976
89
effects and dependent variables: the use of
the Poisson-Erlang model to assess the
effects of D-amphetamine on information
processing, Acta Psychologica, Vol.73,
No.1, 1990, pp. 35-54.
[7] Kaminsky, F. C., & Kirchoff, R. H.,
Bivariate probability models for the
description of average wind speeds at two
heights, Solar Energy, Vol.40, 1988, pp.
49–56.
[8] Kim, K., & Thomas, N. A., Fitting method
with generalized Erlang distributions,
Simulation Modelling Practice and Theory,
Vol.19, No.7, 2011, pp. 1507-1517.
[9] Leemis, L. M., & McQueston, J. T.,
Univariate distribution relationships, The
American Statistician, Vol.62, No.1, 2008,
pp. 4553.
https://doi.org/10.1198/000313008X27044
8.
[10] Nadarajah, S., & Gupta, A. K., Some
bivariate gamma distributions, Applied
Mathematics Letters, Vol.19, 2005, pp.
767774.
[11] Naji, L. F., & Rasheed, H. A., Bayesian
estimation for two parameters of gamma
distribution under generalized weighted
loss function, Iraqi Journal of Science,
Vol.60, No.5, 2019, pp. 11611171.
https://doi.org/10.24996/ijs.2019.60.5.24
[12] Okasha, H. M., & Mustafa, A. E., Bayesian
estimation for the Weibull distribution
under adaptive type-I progressive hybrid
censored competing risks data, Entropy,
Vol.22, No.8, 2020, pp. 903.
https://doi.org/10.3390/e22080903.
[13] Saralees, N., & Arjun, K. G., Some
bivariate gamma distributions, Applied
Mathematics Letters, Vol.19, No.6, 2006,
pp. 767774.
[14] Yamaguchi, Y., Okamura, H., & Dohi, T.,
A variational Bayesian approach for
estimating parameters of a mixture of
Erlang distribution, Communications in
Statistics Theory and Methods, Vol.39,
No.13, 2010, pp. 2333-2350.
Contribution of Individual Authors to the
Creation of a Scientific Article (Ghostwriting
Policy)
Toluwani John Dare carried out the data
acquisition, interpretation, simulation, and
safeguards the validity, creativity and reliability
of the article content.
Olubunmi Temitope Olorunpomi organized the
manuscript for publication, making sure the
manuscript is logically structured, with coherent
arguments, a smooth flow of ideas and following
the specific formatting and submission guidelines
provided by the journal.
Anselm Onyekachukwu Oyem is the
corresponding author and carried out the
proofreading of the text and ensured that the
editorial policies on authorship and principles of
publishing ethic are implemented.
Sources of Funding for Research Presented in
a Scientific Article or Scientific Article Itself
No funding was received for conducting this
study.
Conflict of Interest
The authors have no conflicts of interest to
declare that are relevant to the content of this
article.
Creative Commons Attribution License 4.0
(Attribution 4.0 International, CC BY 4.0)
This article is published under the terms of the
Creative Commons Attribution License 4.0
https://creativecommons.org/licenses/by/4.0/dee
d.en_US
EQUATIONS
DOI: 10.37394/232021.2024.4.10
Toluwani J Dare,
Olubunmi T Olorunpomi, Anselm O Oyem
E-ISSN: 2732-9976
90