Week 6 Notes
Week 6 Notes
Week 6 Notes
A stochastic process in which the inter arrival times between the events follow exponential distribution is said to be
a Poisson Stochastic Process. Poisson stochastic process is the basic ingredient for the queuing theory. In Figure 8, we
show a sample arrival process. Here X1 is the time of arrival of the first customer (occurrence of the first event). Xi is
the time between the arrival of i − 1th and ith customers. In a Poisson stochastic process, X1 , X2 , . . . are independent
and identical random variables following an exponential distribution. N (t) is the number of arrivals until time t. N (t)
is a non-decreasing function.
Examples of Poisson Stochastic Processes:
• In a large city, homing millions of people, the passengers in a railway station gets service to book train tickets.
The arrival of passengers to the booking counter is a Poisson stochastic process.Here each customer arrives to
the counter independently.
• N (t) is a discrete state and continuous time stochastic process. It is also known as a counting process.
The number of events occurred in the interval (s, t], where s ≤ t, is given by N (t) − N (s).
In addition, we can keep more structure to it. The number of events in the non-overlapping intervals (t1 , t2 ] and
(t3 , t4 ]. where t1 ≤ t2 ≤ t3 ≤ t4 , are independent to each other.
45
July, 2021 EE 6150: Stochastic Processes and Theory of Queues Instructor: TG Venkatesh
Independent Increment Process and Poisson Stochastic Process Scribe: Navya
Let Pn (t + h) = P(N (t + h) = n). i.e., in an interval (t+h) they are n events. The different ways in which this
can occur is,
1. There can be n events in (0, t) and no events in (t, t + h)
2. There can be (n − 1) events in (0, t) and 1 event in (t, t + h)
3. There can be (n − 2) events in (0, t) and 2 events in (t, t + h)
4. There can be (n − 3) events in (0, t) and 3 events in (t, t + h)
5. . . .
Therefore by including all the above mentioned different cases, we get,
Pn (t + h) = Pn (t)[1 − λh + O(h)] + Pn−1 (t)(λh + O(h)) + Pn−2 (h)(O(h)) + Pn−3 (h)(O(h)) + . . . (11)
However, the above equation is not true for the case of n = 0, as n − 1 is invalid while computing the above equation.
Therefore assuming Pn−1 (t) = 0 for the initial condition, we get,
�
P0 (t + h) = P0 (t)[1 − λh + O(h)] =⇒ P0 (t) = −λP0 (t) (15)
The solution for the above ordinary differential equations given in (14) with the initial conditions of (15) can be
−λt n
found out as P(N (t) = n) = e n!(λt) .
47
Stochastic Modelling T G Venkatesh
1. Sum of two independent Poisson processes:
Let N1 (t) and N2 (t) be two independent Poisson processes with rates λ1 and λ2 . Now we want to model the combined
process N (t) = N1 (t) + N2 (t) which captures the number of events in interval (0, t) and these events can be either
of N1 (t) or N2 (t) type. Example:Router in a communication network which multiplexes two incoming links which
are joined at the router to form a single outgoing link. In this case, the router acts as a statistical multiplexer for these
two independent incoming links. Further the packet arrivals at each of these links are assumed to be Poisson arrivals.
Therefore,
�n r n−r
e−λ1 t (λ1 t) e−λ2 t (λ2 t)
P(N (t) = n) = (16)
r=0
r! (n − r)!
Further simplifying the above expression, we get,
e−(λ1 +λ2 )t n
P(N (t) = n) = [(λ1 + λ2 )t] (17)
n!
Thus from the above equation, we observe that the combined process is also a Poisson process with rate λ = λ1 + λ2
Another way to prove the above property is by using the Moment generating Functions(MGF). The MGF of the
Poisson process G(s) is calculated as,
∞
� n
e−λt (λt)
G(S) = E[sN (t) ] = sn P(N (t) = n)where P(N (t) = n) =
n=0
n!
∞
(18)
� n
e−λt (λt) n
=⇒ G(s) = E[sN (t) ] = s = e−λt(s+1)
n=0
n!
Applying MGF to the two independent Poisson processes we get, G1 (s) = e−λ1 t(s+1) and G2 (s) = e−λ2 t(s+1) .
Further the MGF of the combined process N (t) = N1 (t) + N2 (t) can be found out as,
G(s) = E[sN (t) ] = E[sN1 (t)+N2 (t) ] = E[sN1 (t) ]E[sN2 (t) ] = G1 (s)G2 (s) = e−(λ1 +λ2 )t(1+s) (19)
We can observe that G(s) is the MGF of the combined Poisson process whose pmf can be calculated as P(N (t) =
−(λ1 +λ2 )t n
n) = e n! [(λ1 + λ2 )t] which is same as (17).
48
Stochastic Modelling T G Venkatesh
Further simplifying the above equation, we get,
n
(λpt) −λpt
P(M (t) = n|N (t) = n + r) = e (21)
n!
49
July, 2021 EE 6150: Stochastic Processes and Theory of Queues Instructor: TG Venkatesh
Poisson Process Scribe: Aparna
Therefore the density function of Sn (t) is calculated by differentiating FSn (t) w.r.t t
n−1
(λt)
fSn (t) = λe−tλ (23)
(n − 1)!
Thus from the above, we observe that the density function for the random variable Sn , which denotes the time of
occurrence of the nth Poisson event is nothing but the Gamma distribution which is the sum of n exponential random
variables.
The above result can be generalized further, but before proceeding, we first discuss important results regarding the
order statistics.
Order Statistics
Assume X1 , X2 , . . . , Xn as uniformly distributed random variables distributed between (0, 1). The first minimum
of X1 , X2 , . . . , Xn be represented as X(1) . Similarly the ith minimum of X1 , X2 , . . . , Xn be represented as X(i) .
We say that X(1) , X(2) , X(3) , . . . , X(n) are the order statistics of X1 , X2 , . . . , Xn . Then the joint density function of
X(1) , X(2) , X(3) , . . . , X(n) for uniformly distributed random variables is given as,
n!
FX(1) ,X(2) ,X(3) ,...,X(n) (x1 , x2 , . . . , xn ) = P(X(1) ≤ x1 , X(2) ≤ x2 , . . . , X(n) ≤ xn ) = (27)
tn
51
Stochastic Modelling T G Venkatesh
Generalisation for the Conditional Distribution of arrival times
Now assume that by the time doctor has arrived at 8 : 30, they are 5 patients waiting. i.e., N (t) = 5. We want to find
the joint PDF of the waiting time of these 5 patients?
Let S1 , S2 , . . . , Sn be the arrival times of the n Poisson events. Now we need to find fS1 ,S2 ,...,Sn (s1 , s2 , . . . , sn |N (t) =
n) i.e., at time t we know only n events have occurred i.e., N (t) = n and we also know that s1 ≤ s2 ≤ s3 ≤ . . . sn ≤ t.
The above equations are further solved by assuming that between the time 0 and s1 , an event occurs with a rate of λ
and the probability of such an event to occur is λe−λs1 . Similarly the probability for another event to occur between
the time instants s1 and s2 is given as, λe−λ(s2 −s1 ) . Further all the above events are assumed to be independent events
occurring over non-overlapping intervals. Therefore,
P(s1 , s2 , s3 , . . . , sn ; N (t) = n)
fS1 ,S2 ,S3 ,...,Sn (s1 , s2 , s3 , . . . , sn |N (t) = n) =
P(N (t) = n)
(28)
λs1 e−λs1 λ(s2 − s1 )e−λ(s2 −s1 ) . . . λ(sn − sn−1 )e−λ(sn −sn−1 ) e−λ(t−sn )
= n = n! /tn
e−λt (λt) /n!
Therefore given that N (t) = n, the n arrival times S1 , ..., Sn have the same distribution as the order statistics
corresponding to n independent random variables that are uniformly distributed on the interval (0, t).
Now lets analyse 2 independent Poisson processes {N1 (t)|t ≥ 0} with parameter λ1 and the other process be
{N2 (t)|t ≥ 0} with parameter λ2 . Lets consider few examples based on these independent Poisson processes.
1. What is the probability that event 1 (E1 ) occur before event 2 (E2 )?
Solution: Let T1 and T2 be the time of occurrence of the two events.
� ∞ � ∞
λ1
P(E1 < E2 ) = P(T1 < T2 ) = P(T1 < T2 |T1 = x)λ1 e−λ1 x dx = P{x < T2 }λ1 e−λ1 x dx =
0 0 λ1 + λ2
(29)
2. Similarly, what is the probability that two events of the first process occur before the second process?
Solution: Let Sji represents theith event of the j th process. Therefore using memory-less property, we need to
calculate,
λ1 λ2
P(S21 < S12 ) = P(S11 < S12 ).P(S21 < S12 |S11 < S12 ) = (30)
λ1 + λ2 λ 1 + λ2
λ2
3. Similarly, the probability that the second event occurs before the first event is given by λ1 +λ2 .
This is analogous to the Bernoulli trial. Let the occurrence of an event from process 1 behead (H) and event
from process 2 be tail (T). Then what is the probability of HTHHT?
PH PT PH PH PT
(31)
PH + PT PH + PT PH + PT PH + PT PH + PT
λ1 λ2
where PH = λ1 +λ2 and PT = λ1 +λ2
� �
m+n−1 �
m + n − 1 � λ1 �r � λ2 �m+n−r−1
(32)
r=n
r λ1 + λ2 λ1 + λ2
52
Stochastic Modelling T G Venkatesh
Generalisation of Poisson Process to Higher dimensional
A process consisting of randomly occurring points in the plane is said to constitute a two-dimensional Poisson process
having rate λ. There can be two indices i, j as {Ni,j |i, j = 1, 2, . . . } is known as Bidirectional Stochastic Process
where i, j can be either continuous or discrete.
Example Problems
Now let us consider few more examples.
Example 1: Customers arrive at a store at the rate of 10 per hour. Each customer is either male or female with a
probability of 1/2 . Assume that we know that exactly 10 women entered within a given hour (say, 10 to 11 am). (a)
Compute the probability that exactly 10 men also entered.
Solution: Male and female arrivals are independent Poisson processes, with parameter is (1/2)10 = 5, therefore the
10
probability that exactly 10 men also entered is e−5 510!
Example 2: Assume that cars arrive at a rate 10 per hour. Assume each car will pick up a hitchhiker with a probability
of 1/10. You are second in line. What is the probability that you’ll have to wait for more than 2 hours?
Solution: Cars that pick up hitchhikers are a Poisson process with rate 10
1
10 = 1. For this process P(T1 + T2 > 2) =
P(N (2) ≤ 1) = 3e−2
Example 3: Order of events in independent Poisson processes: Assume that you have two independent Poisson
processes, N1(t) with rate λ1 and N2(t) with rate λ2 . What is the probability that n events occur in the first process
before m events occur in the second process?
Solution: The probability that n events occur in the first process before m events occur in the second process is,
� �
n+m−1 �
n + m − 1 � λ1 �k � λ2 �n+m−k−1
(35)
k λ1 + λ2 λ1 + λ2
k=n
5
Example 4: Assume that λ1 = 5, λ2 = 1. (a) Then P(5 events in the first process before 1 in the second) = ( 56 ) .
�6 � �� �k � 1 �6−k 11.55
(b) P(5 events in the first process before 2 in the second) = k=5 k6 56 6 = 66
53
Stochastic Modelling T G Venkatesh
Example 5: You have three friends, A, B, and C. Each will call you after an Exponential amount of time with the
expectation of 30 minutes, 1 hour, and 2.5 hours respectively. You will go out with the first friend that calls. What is
the probability that you go out with A?
Solution: Interpret each call as the first event in the appropriate one of three Poisson processes with rates 2, 1, and 2/5,
assuming the time unit to be one hour. (Recall that the rates are inverses of the expectations.)Probability of A calling
first is then clearly λ1λ+λ
1
2
= 2+1+(2/5)
2
17 .
= 10
Example 6: An office has two clerks, and three people, A, B, and C, enter simultaneously. A and B begin service at the
two clerks while C waits for the first available clerk. Assume that the service time is Exponential(λ). (a) Compute the
probability that A is the last to finish the service. (b) Compute the expected time before C is done (i.e., C’s combined
waiting and service time).
Solution: This is the probability that two events happen in a rate Poisson process before a single one in an indepen-
dent rate process, that is, 1/4
(b) First C has to wait for the first event in two combined Poisson processes, which is a single process with rate 2λ,
and then for the service time;
Solution: The answer is 2λ 1
+ λ1 = 2λ3
Example 7: A car wash has two stations, 1 and 2, with Exponential(λ1 ) and Exponential(λ2 ) service times. A car
enters station 1. Upon completing the service at station 1, the car then proceeds to station 2, provided station 2 is free;
otherwise, the car has to wait at station 1, blocking the entrance of other cars. The car exits the wash after service at
station 2 is completed. When you arrive at the wash, there is a single car at station 1. Compute your expected time
before you exit?
Solution: Your total time is (time the other car spends at station 1) + (time you spend at the station 2)+(maximum of
the time the other car spends at station 2 and the time you spend at the station 1). If T1 and T2 are Exponential(λ1 )
and Exponential(λ2 ), then we need to compute
where
max{T1 , T2 } = T1 + T2 − min{T1 , T2 } (37)
and min{T1 , T2 } is Exponential(λ1 + λ2 ). Therefore,
2 2 1
E(T1 ) + E(T2 ) + E(max{T1 , T2 }) = + − (38)
λ1 λ2 λ1 + λ2
54