Slide set 20 Stat 330 (Spring 2015) Last update: March 23, 2015

advertisement
Slide set 20
Stat 330 (Spring 2015)
Last update: March 23, 2015
Stat 330 (Spring 2015): slide set 20
Balance equations:
Balance equations: In the context of physical-chemistry, it is called the
master equation.
Flows: The Flow-In = Flow-Out Principle provides us with the means to
derive equations between the steady state probabilities.
State 0:
µ1p1 = λ0p0
i.e. p1 =
λ0
µ1 p0 .
1
Stat 330 (Spring 2015): slide set 20
Balance equations (cont’d)
State 1:
µ 1 p1 + λ 1 p1 = λ0 p0 + µ 2 p2
i.e. p2 =
State 2:
λ1
µ2 p1
=
λ0 λ1
µ1 µ2 p0 .
µ 2 p2 + λ2 p2 = λ1 p1 + µ 3 p3
i.e. p3 =
λ2
µ3 p2
=
λ0 λ1 λ2
µ1 µ2 µ3 p0 .
2
Stat 330 (Spring 2015): slide set 20
for state k we get:
pk =
λ0λ1λ2 · . . . · λk−1
p0.
µ1 µ2 µ3 · . . . · µk
♥ ok, so now we know all the steady state probabilities depending on p0.
But what use has that, if we don’t know p0?
♣ Here, we need another trick: we know, that the steady state probabilities
are the probability mass function for the state X. Their sum must therefore
be 1!
♥ Hence:
1 = p0 + p1 + p2 + . . .
λ0 λ0 λ1
= p0 1 +
+
+ ...
µ 1 µ1 µ2
|
{z
}
:=S
3
Stat 330 (Spring 2015): slide set 20
Balance equations (cont’d)
♥ If this sum S converges, we get p0 = S −1. If it doesn’t converge,
we know that we don’t have any steady state probabilities, i.e. the B+D
process never reaches an equilibrium. The analysis of S is crucial!
♠ If S exists, p0 does, and with p0 all pk , which implies, that the Birth &
Death process is stable.
♦ If S does not exist, then the B & D process is unstable, i.e. it does not
have an equilibrium and no steady state probabilities.
♦ The steady state of the B & D process is an alternative to studying
the steady state ofthe associated stochastic differential equation dX =
f (X, t)dt + σ(X, t)dW where dW is the infinitesimal dynamic of birth and
death, i.e. Brownian motion.
4
Stat 330 (Spring 2015): slide set 20
Special Case: constant birth and death rates
Traffic intensity:
If all birth rates λk = λ, a constant birth rate, and µk = µ for all k > 0,
the ratio between birth and death rates is constant, too:
a :=
λ
µ
a is called the traffic intensity (in the context of transport theory, this is
referred to as wave velocity).
1. In order to decide, whether a specific B & D process is stable or not, we
have to look at S. For constant traffic intensities, S can be written as:
∞
X
λ0 λ 0 λ1
2
3
ak
S =1+
+
+ . . . = 1 + a + a + a + ... =
µ1 µ 1 µ2
k=0
This sum is called a geometric series.
5
Stat 330 (Spring 2015): slide set 20
2. If 0 < a < 1 the series converges:
1
S=
1−a
for 0 < a < 1.
Then:
p0 = S −1 = 1 − a
pk
= ak · (1 − a) = P (X(t) = k), i.e.
X(t) therefore has a Geometric distribution for large t:
X(t) ∼ Geo(1 − a)
for large t and 0 < a < 1.
♣ Review of geometric distributions
6
Stat 330 (Spring 2015): slide set 20
Printer queue (continued)
Example 1:
♦ A certain printer in the Stat Lab gets jobs with a rate of 3 per hour. On
average, the printer needs 15 min to finish a job.
♠ Let X(t) be the number of jobs in the printer and its queue at time t.
♥ X(t) is a Birth & Death Process with constant arrival rate λ = 3 and
constant death rate µ = 4.
1. Draw a state diagram for X(t) - the (technically possible) number of
jobs in the printer (and its queue).
7
Stat 330 (Spring 2015): slide set 20
2. What is the (true) probability that at some time t the printer is idle?
P (X(t) = 0) = p0 = 1 −
3
= 0.25.
4
3. What is the probability that there arrive more than 7 jobs during one
hour?
Let Y be the number of arrivals. Y is a Poisson Process with arrival rate
λ = 3. Thus Y (t) ∼ P oisson(λ · t)
P (Y (1) > 7) = 1 − P (Y (1) ≤ 7) = 1 − P o3·1(7) = 1 − 0.949 = 0.051.
4. What is the probability that the printer is idle for more than 1 hour at a
time? (Hint: this is the probability that X(t) = 0 and - at the same time no job arrives for more than one hour.)
Let Z be the time until the next arrival, then Z ∼ Exp(3).
8
Stat 330 (Spring 2015): slide set 20
P (X(t) = 0 ∩ Z > 1)
X(t),Z independent
=
P (X(t) = 0) · P (Z > 1)
= p0 · (1 − Exp3(1)) = 0.25 · e−3 = 0.0124
5. What is the probability that there are 3 jobs in the printer queue at time
t (including the job printing at the moment)?
P (X(t) = 3) = p3 = .753 · .25 = 0.10
6. What is the difference between the true and the empirical probability of
exactly 5 jobs in the printer system?
p5 = 0.755 · 0.25 = 0.05933
Recall pb5 = 0.04125
Given that we observed only two instances of 5 jobs in our queue, the
estimate is close - which means that we can model this particular printer
queue as a Birth & Death process.
9
Stat 330 (Spring 2015): slide set 20
Example 2:
ICB-International Campus Bank of Ames
The ICB Ames employs three tellers. Customers arrive according to a
Poisson process with a mean rate of 1 per minute. If a customer finds
all tellers busy, he or she joins a queue that is serviced by all tellers.
Transaction times are independent and have exponential distributions with
mean 2 minutes.
1. Sketch an appropriate state diagram for this queueing system.
As it turns out, the large t probability that there are no customers in the
system is p0 = 1/9. (Show this).
10
Stat 330 (Spring 2015): slide set 20
2. What is the probability that a customer entering the bank must enter
the queue and wait for service?
A person entering the bank must queue for services, if at least three people
are in the bank (not including the one who enters at the same moment).
We are therefore looking for the large t probability, that X(t) is at least 3:
P (X(t) ≥ 3) = 1 − P (X(t) < 3) = 1 − P (X(t) ≤ 2) = 1 − (p0 + p1 + p2)
where
p0 + p1 + p2 = 1/9 + 2 · 1/9 + 2 · 1/9 = 5/9
so
P (X(t) ≥ 3) = 4/9.
11
Download