Download Homework Solution 5 for APPM4/5560 Markov Processes

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia , lookup

Probability wikipedia , lookup

Transcript
Homework Solution 5 for APPM4/5560 Markov Processes
7.4 Let S and T be exponentially distributed with rates λ and µ. Let U = min{S, T } and V = max{S, T }.
Find (a) EU . (b) E(V − U ). (c) EV . (d) Use the identity V = S + T − U to get a different looking formula
for EV .
(a) Since S and T are both exponentially distributed, min{S, T } is also exponentially distributed with
1
.
rate λ + µ. So EU = λ+µ
(b) From the definition,
Z ∞Z ∞
E(V − U ) =
(max{s, t} − min{s, t})λe−λs µe−µt dsdt
0
0
Z ∞Z ∞
Z ∞Z ∞
=
(s − t)λµe−λs−µt dsdt
+
(t − s)λµe−λs−µt dsdt
.
0
0
Calculate the first term:
Z ∞Z ∞
−λs−µt
(s − t)λµe
dsdt
0
0
0
s>t
Z
∞
Z
0
t
∞
Z
(s − t)λµe−λs−µt dsdt
Z
∞
= λµ
0
x · e−λ(t+x) e−µt dxdt(Let x = s − t)
0
1 1
λ2 λ + µ
µ
.
=
λ(λ + µ)
= λµ
Similarly, the second term has the value of
λ
µ(λ+µ) ,
thus
µ
λ
+
λ(λ + µ) µ(λ + µ)
λ2 + µ2
=
.
λµ(λ + µ)
E(V − U ) =
(c)
EV = E(V − U ) + EU
λ2 + µ2
1
+
λµ(λ + µ) λ + µ
λ2 + µ2 + λµ
=
.
λµ(λ + µ)
=
1
s<t
∞
=
s>t
0
(d)
EV = E(S + T − U ) = ES + ET − EU
1
1
1
= + −
λ µ λ+µ
(λ + µ)2 − λµ
=
λµ(λ + µ)
7.5 Let T1 and T2 be exponentially distributed with rates λ1 and λ2 . Let U = min{T1 , T2 }, V =
max{T1 , T2 }, and I be the index of the smaller time, i.e., T1 = U . Compute the joint density P (U =
x, V − U = y, I = i) and use this to conclude that U and V − U are independent.
When I = 1,
P (U = x, V − U = y, I = 1) = P (T1 = x, T2 − T1 = y),
= P (T1 = x, T2 = x + y),
= λ1 λ2 e−(λ1 +λ2 )x e−λ2 y .
Similarly, when I = 2,
P (U = x, V − U = y, I = 2) = λ1 λ2 e−(λ1 +λ2 )x e−λ1 y .
So
P (U = x, V − U = y) = P (U = x, V − U = y, I = 1) + P (U = x, V − U = y, I = 2)
= λ1 λ2 e−(λ1 +λ2 )x e−λ2 y + e−λ1 y .
The above is of the form f unction(x) · f unction(y), for all x, y ≥ 0; in particular, U and (V − U ) are
independent random variables.
7.6 Consider a bank with two tellers. Three people, Alice, Betty, and Carol enter the bank at almost
the same time and in that order. Alice and Betty go directly into service while Carol waits for the first
available teller. Suppose that the service times for each customer are exponentially distributed with mean
4 minutes. (a) What is the expected total amount of time for Carol to complete her businesses? (b) What
is the expected total time until the last of the three customers leaves? (c) What is the probability Carol is
the last one to leave? (d) Answer questions (a), (b), and (c) for a general exponential with rate λ.
(a) Suppose TA , TB , TC are the service time for Alice, Betty and Carol. Then the expected waiting
time for Carol is E(min{TA , TB }), and the total amount of time for Carol will be E(min{TA , TB }) + TC =
1/(.25 + .25) + 4 = 6.
(b) (Thanks to Steve) We look at the two time segments, which are time for Carol waiting and starting
service. The expect time for Carol waiting is E(min{TA , TB }) = 2 as shown above. Now we only need to
know the expect time for Carol starting service. Since this is a Poisson process, it is memoryless. When
the 2nd time segment starts, for A or B whoever has not finished the service will have the same probability
distribution as when the 1st time segment starts. Thus the expected time for the 2nd time segment is
E(max{TA or B , TC }). From 7.4(d) we know the value is 6. So the expected total time until all of them leave
is 8.
(c) The idea is the same as (b). Since it is Poisson process and it is memoryless, when Carol starts service,
whoever A or B left will have the same probability distribution as from beginning. So P (TC > TA or B ) =
.25/(.25 + .25) = .5.
(d) If the exponential rate is λ, the answer will be (a) 3/(2λ), (b) 3/(2λ) + 1/(2λ) = 2/λ, (c) 1/2.
7.8 Consider the set up of the previous problem but now suppose that the two tellers have exponential
service times with rates λ ≤ µ. Answer questions (a), (b), and (c).
(a) We call teller λ and teller µ referring to the teller with rates λ and µ. Now the expected waiting time
for Carol will be 1/(λ + µ). If Carol goes to teller λ, which means Tλ < Tµ , the probability is λ/(λ + µ).
2
The expected time she spends at teller λ will be 1/λ. If Carol goes to teller µ, which means Tλ > Tµ , the
probability is µ/(λ + µ). The expected time she spends at teller µ will be 1/µ. Now the expected total time
for Carol will be
λ 1
µ 1
3
1
+
+
=
.
λ+µ λ+µλ λ+µµ
λ+µ
(b) The expected waiting time for Carol will be 1/(λ + µ). If Carol goes to teller λ, because of the
memorylessness, the expected time until both of them leaving will be E(max{Tλ , Tµ }) = 1/λ+1/µ−1/(λ+µ).
The other case is similar. So the expected time until all of them leaving will be
λ
µ
1
+
E(max{Tλ , Tµ }) +
E(max{Tλ , Tµ })
λ+µ λ+µ
λ+µ
1
+ E(max{Tλ , Tµ })
=
λ+µ
1
1
1
1
=
+ + −
λ+µ λ µ λ+µ
1
1
= +
λ µ
(c) As the same discussion as in 7.6(c), we use the memoryless property. If Carol goes to teller λ, the
probability she leaves later is P (Tλ > Tµ ) = µ/(λ + µ). If Carol goes to teller µ, the probability she leaves
later is P (Tµ > Tλ ) = λ/(λ + µ). Thus the total probability is
λ
µ
2λµ
µ
λ
+
=
.
λ+µλ+µ λ+µλ+µ
(λ + µ)2
7.17 Suppose N (t) is a Poisson process with rate 2. Compute the conditional probabilities (a)P (N (3) =
4|N (1) = 1),(b)P (N (1) = 1|N (3) = 4).
(a)P (N (3) = 4|N (1) = 1) = P (N
32e−4 /3.
(2) = 3) =
4
3
(b)P (N (1) = 1|N (3) = 4) = 1 (1/3)(2/3) = 32/81.
7.18 Suppose N (t) is a Poisson process with rate 3. Let Tn denote the time of the nth arrival. Find
(a)E(T12 ),(b)E(T12 |N (2) = 5),(c)E(N (5)|N (2) = 5).
(a)E(T12 ) = 12(1/3) = 4.
(b)E(T12 |N (2) = 5) = 2 + E(T7 ) = 2 + 7(1/3) = 13/7.
(c)E(N (5)|N (2) = 5) = 5 + E(N (3)) = 5 + 3(3) = 14.
7.19 Customers arrive at a bank according to a Poisson process with rate 10 per hour. Given that two
customers arrived in the first 5 minutes, what is the probability that (a) both arrived in the first 2 minutes.
(b) at least one arrived in the first 2 minutes.
(a) Given condition N (5) = 2, we know the time arrivals are uniformly distributed on [0, 5]. The probability
that both of them arrive in the first 2 minutes is (2/5)2 = 4/25.
(b) The probability that at least one arrived in the first 2 minutes is 2/5 + 2/5 − (2/5)(2/5) = 16/25.
7.28 Edwin catches trout at times of a Poisson process with rate 3 per hour. Suppose that the trout
weigh an average of 4 pounds with a standard deviation of 2 pounds. Find the mean and standard deviation
of the total weight of fish he catches in two hours.
Let W be the total weight of the fish, N be the total number of fish being caught, and Wi be the weight of
3
the ith fish. From Theorem 3.1,
E(W )
∞
X
(E(Wi )|N = n)P (N = n)
=
i=1
= E(Wi )E(N )
=
(2)(3)(4)
=
24.
= E(N )(Var(Wi ) + E(Wi2 ))
Var(W )
(2)(3)(22 + 42 )
=
=
120.
p
=
Var(W )
√
120.
=
σW
7.31 Messages arrive to be transmitted across the Internet at times of a Poisson process with rate λ. Let Yi
be the size of the ith message, measured in bytes, and let g(z) = E(z Yi ) be the generating function of Yi .
Let N (t) be the number of arrivals at time t and S = Y1 + · · · + YN (t) be the total size of the messages up
to time t. (a) Find the generating function f (z) = E(z S ). (b) Differentiate and set z = 1 to find E(S). (c)
Differentiate again and set z = 1 to find E(S(S − 1)). (d) Compute Var(S).
(a)
f (z)
=
=
=
E(z S )
∞
X
E(z Y1 +···+YN (t) |N (t) = n)P (N = n)
n=1
∞
X
(g(z))n e−λt
n=1
=
=
e−λt
∞
X
eg(z)λt
n=1
−λt(1−g(z))
e
(λt)n
n!
.
(b)
E(S)
=
f 0 (1)
=
λtg 0 (z)e−λt(1−g(z)) =
λtE(Yi ).
z=1
Here we used that g(1) = 1.
(c) Since f 0 (z) = λtf (z)g 0 (z)
E(S(S − 1))
= f 00 (1)
= λt(f 0 (z)g 0 (z) + f (z)g 00 (z)|z=1
= λt(λtE(Yi )E(Yi ) + E(Yi (Yi − 1)).
(d)
Var(S)
=
E(S(S − 1)) + E(S) − (E(S))2
=
(λtE(Yi ))2 + λtE(Yi (Yi − 1)) + λtE(Yi ) − (λtE(Yi ))2
=
λtE(Yi ).
4
Let t1 , t2 , · · · be independent exponential random variables with mean λ, and let N be an independent
random variable with P (N = n) = (1 − p)n−1 . What is the distribution of the random sum T = t1 +
P· · · + tn ?
First, an error which should be pointed out is that (1 − p)n−1 should be p(1 − p)n−1 to insure that
P (N =
n) = 1.
P (T = T )
=
=
∞
X
P (t1 + · · · + tn |N = n)P (N = n)
n=1
∞
X
λn tn−1 −λt
e p(1 − p)n−1
(n
−
1)!
n=1
= e−λt λp
∞
X
(λt(1 − p))n−1
(n − 1)!
n=1
= e−λt λpeλt(1−p)
= λpeλpt .
5