equations: Balance

advertisement
State 2:
State 1:
λ1
μ 2 p1
=
λ0 λ1
μ 1 μ 2 p0 .
i.e. p3 =
λ2
μ 3 p2
=
λ0 λ1 λ2
μ 1 μ 2 μ 3 p0 .
μ 2 p2 + λ 2 p2 = λ 1 p1 + μ 3 p 3
i.e. p2 =
μ 1 p1 + λ 1 p1 = λ 0 p0 + μ 2 p 2
2
Stat 330 (Spring 2015): slide set 20
Balance equations (cont’d)
Last update: March 23, 2015
Stat 330 (Spring 2015)
Slide set 20
Stat 330 (Spring 2015): slide set 20
λ0
μ 1 p0 .
pk =
λ0λ1λ2 · . . . · λk−1
p0 .
μ1 μ2 μ3 · . . . · μk
Stat 330 (Spring 2015): slide set 20
1
♥ Hence:
:=S
1 = p0 + p 1 + p 2 + . . .
λ0 λ0 λ1
+
+ ...
= p0 1 +
μ1 μ1 μ2
3
♣ 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!
♥ ok, so now we know all the steady state probabilities depending on p0.
But what use has that, if we don’t know p0?
for state k we get:
i.e. p1 =
State 0:
μ 1 p1 = λ 0 p0
Flows: The Flow-In = Flow-Out Principle provides us with the means to
derive equations between the steady state probabilities.
Balance equations: In the context of physical-chemistry, it is called the
master equation.
Balance equations:
Stat 330 (Spring 2015): slide set 20
pk
=1−a
for 0 < a < 1.
♣ Review of geometric distributions
X(t) ∼ Geo(1 − a)
∞
for large t and 0 < a < 1.
6
Example 1:
7
1. Draw a state diagram for X(t) - the (technically possible) number of
jobs in the printer (and its queue).
♥ X(t) is a Birth & Death Process with constant arrival rate λ = 3 and
constant death rate μ = 4.
♠ Let X(t) be the number of jobs in the printer and its queue at time t.
♦ 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.
Printer queue (continued)
Stat 330 (Spring 2015): slide set 20
k=0
λ0 λ0 λ1
+
+ . . . = 1 + a + a2 + a3 + ... =
ak
μ1 μ1 μ2
This sum is called a geometric series.
S =1+
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:
Stat 330 (Spring 2015): slide set 20
= a · (1 − a) = P (X(t) = k), i.e.
k
p0 = S
−1
1
1−a
λ
μ
a is called the traffic intensity (in the context of transport theory, this is
referred to as wave velocity).
a :=
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:
Traffic intensity:
5
X(t) therefore has a Geometric distribution for large t:
Then:
S=
2. If 0 < a < 1 the series converges:
Stat 330 (Spring 2015): slide set 20
Special Case: constant birth and death rates
4
♦ 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.
♦ 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.
♠ If S exists, p0 does, and with p0 all pk , which implies, that the Birth &
Death process is stable.
♥ 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!
Balance equations (cont’d)
Stat 330 (Spring 2015): slide set 20
3
= 0.25.
4
=
= 0.0124
P (X(t) = 0) · P (Z > 1)
Example 2:
10
As it turns out, the large t probability that there are no customers in the
system is p0 = 1/9. (Show this).
1. Sketch an appropriate state diagram for this queueing system.
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.
ICB-International Campus Bank of Ames
Stat 330 (Spring 2015): slide set 20
Stat 330 (Spring 2015): slide set 20
so
where
P (X(t) ≥ 3) = 4/9.
p0 + p1 + p2 = 1/9 + 2 · 1/9 + 2 · 1/9 = 5/9
11
P (X(t) ≥ 3) = 1 − P (X(t) < 3) = 1 − P (X(t) ≤ 2) = 1 − (p0 + p1 + p2)
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:
2. What is the probability that a customer entering the bank must enter
the queue and wait for service?
9
8
Let Z be the time until the next arrival, then Z ∼ Exp(3).
Recall p5 = 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.
p5 = 0.755 · 0.25 = 0.05933
6. What is the difference between the true and the empirical probability of
exactly 5 jobs in the printer system?
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.)
P (X(t) = 3) = p3 = .753 · .25 = 0.10
5. What is the probability that there are 3 jobs in the printer queue at time
t (including the job printing at the moment)?
−3
X(t),Z independent
= p0 · (1 − Exp3(1)) = 0.25 · e
P (X(t) = 0 ∩ Z > 1)
Stat 330 (Spring 2015): slide set 20
Let Y be the number of arrivals. Y is a Poisson Process with arrival rate
λ = 3. Thus Y (t) ∼ P oisson(λ · t)
3. What is the probability that there arrive more than 7 jobs during one
hour?
P (X(t) = 0) = p0 = 1 −
2. What is the (true) probability that at some time t the printer is idle?
Download