ISE 339 Homework 3 Solution
1. (10 points) Suppose that you arrive at a single-teller bank to find five other customers in the bank, one being served and the other four waiting in line. You join the end of the line. If the service times are all exponential with rate μ, what is the expected amount of time you will spend in the bank?
Solution: Although the first customer is being served, the expectation of the waiting time for him to finish his service since you arrive at the bank is still 1/μ (memoryless property). So the average waiting time is 5/μ, and the average serving time is 1/μ. Thus, the expected amount of total amount of time is 6/μ.
2. (10 points) A doctor has scheduled two appointments, one at 1 P.M. and the other at 1:30 P.M. The amounts of time that appointments last are independent exponential random variables with mean 30 minutes. Assuming that both patients are on time, find the expected amount of time that the 1:30 appointment spends at the doctor’s office.
Solution: We use X1 and X2 to denote the amount of time that each appointment takes (treatment time only, not including the waiting time). There are two scenarios in this problem when the second patient arrives: 1) the first patient has left; 2) the first patient is being treated. The conditional expectation for the first scenarios is
E{X2|X1 ≤ 30} = E{X2} = 30. The conditional expectation for the second scenario is
E{X1 −30+X2|X1 >30}=E{X1 −30|X1 >30}+E{X2}=30+30=60. Finally, the expected amount of time that the second patient spends is
E{X2|X1 ≤ 30}P{X1 ≤ 30} + E{X1 − 30 + X2|X1 > 30}P{X1 > 30} =30×(1−e−30/30)+60×e−30/30 =30+30e−1.
3. (10 points) The dollar amount of damage involved in an automobile accident is an expo- nential random variable with mean 1000. Of this, the insurance company only pays that amount exceeding (the deductible amount of) 400. Now the insurance company provide a special option: if the damage is beyond the “high deductible” 1000, the company will pay the full amount. Find the expected value and the standard deviation of the amount the insurance company pays per accident.
Solution: We use X to denote the amount of damage per accident, and use Y to denote the amount of money paid by the insurance company. Obviously,
0, X ≤ 400
Y = X−400, 400
1
We use fX(x) = λe−λx,x ≥ 0 to denote the PDF of X, where λ = 1/1000. We will use the following integral formula:
−λx e dx
Next, we show two different approaches to solve this problem.
b −λx xλe
b −λx −λxb b xde = − xe a +
−λxb 1 −λxb a − λe a
= −xe
x2λe−λxdx = − x2de−λx = −x2e−λxa+2 xe−λxdx = −x2e−λxa− λ e−λxa−λ2 e−λxa
dx = − aaa
b b b b aaa
b 2x b 2 b
Approach 1:
∞ =
= − 0 − 400e−0.4 + 1000(0 − e−0.4) + 400(e−1 − e−0.4) = 1000e−0.4 + 400e−1 ≈ 817.47.
E{Y } =
= 0 +
0 · fX (x)dx + ∞
xfX(x)dx − 400
400 0
1000
(x − 400)fX (x)dx +
∞
xfX (x)dx
1000
400
−λx 1000 −λx xλe dx−400 λe dx
400
400
−λx∞ 1 −λx∞ −λx1000
400
=− xe 400+λe 400 +400e 400
1000 400
fX(x)dx
E{Y 2} = =0 +
400 x2 fX (x)dx − 800
400 0
02 · fX(x)dx +
1000
(x − 400)2fX(x)dx +
∞
x2fX(x)dx
1000
1000
xfX (x)dx + 4002 fX (x)dx 400
∞ 400
400
− 4002e−λx1000 400
= 4002e−0.4 + 8 × 105e−0.4 + 2 × 106e−0.4
+ 800 1000e−0.1 − 400e−0.4 + 1000e−0.1 − 1000e−0.4 − 4002(e−0.1 − e−0.4)
=106(1.44e−1 + 2e−0.4).
Finally,
Var{Y } = E{Y 2} − (E{Y })2 = 106(1.44e−1 + 2e−0.4 − e−0.8 − 0.8e−1.4 − 0.16e−2),
and
∞ =
1000 400
1000 400
x2λe−λxdx − 800
2 −λx∞ 2x −λx∞ 2 −λx∞
1000 400
xλe−λxdx + 4002
= −xe 400− λe 400−λ2e 400 +800 xe 400 +λe 400
λe−λxdx
−λx1000 1 −λx1000
σ(Y ) = Var{Y } ≈ 1096.42
We can also use conditional statistics to compute the mean and standard deviation.
Approach 2
2
We have studied the regular case on the class. The new option ”high deductible” yields the following contribution in the total mean:
E{X|X > 1000} = E{X − 1000 + 1000|X > 1000}
= E{X − 1000|X > 1000} + E{1000|X > 1000}
= 1000 + 1000 = 2000.
For0≤t1
600 λe−λx 1000 −λx ∞ −λx
=0+ x1−e−0.6dx× λe dx+2000× λe dx 0 400 1000
1 −600λ 1 −600λ −400λ −1000λ =0−1−e−0.6 600e +λ(e −1) × e −e
= 1 (1000 − 1600e−0.6) × (e−0.4 − e−1) + 2000 × e−1 1 − e−0.6
=(1000 − 1600e−0.6)e−0.4 + 2000e−1 ≈ 817.47. For the variance, we will use the following formula:
Var{Y } = E{Var{Y |X}} + Var{E{Y |X}}. Obviously, Var{Y |X ≤ 400} = 0.
Var{Y |400 < X ≤ 1000}
=E{Y2|0
Hence,
E{Var{Y |X}} =Var{Y |X ≤ 400}P{X ≤ 400}
+ Var{Y |400 < X ≤ 1000}P{400 < X ≤ 1000}
+ Var{Y |X > 1000}P{X > 1000}
106 × (2 − 1.56e−0.6) =0+ 1−e−0.6
6 −0.4 −1 =10×(2e −1.56e )−
−1.
(1000 − 1600e−0.6)2 − (1−e−0.6)2
−1
−e )+10 ·e
−1
−0.4 (1000 − 1600e−0.6)2e−0.4 6
6
·(e 1−e−0.6 +10e .
Moreover,
where E{E{Y |X}} = E{Y }, and
E{(E{Y |X})2} =(E{0|X ≤ 400})2P{X ≤ 400}
+ (E{X − 400|400 < X ≤ 1000})2P{400 < X ≤ 1000}
Var{E{Y |X}} = E{(E{Y |X})2} − (E{E{Y |X}})2,
+ (E{X|X > 1000})2P{X > 1000}
600 λe−λx 2 1000 −λx 2 ∞ −λx =0+ x1−e−0.6dx × λe dx+2000 × λe dx
0
1 −600λ
400
1 −600λ
1000
=(1 − e−0.6)2 600e + 20002 × e−1000λ
+ λ(e e−0.4
2 − 1)
−400λ × e
− e
−1000λ
−0.6 2
=(1000−1600e ) × 1−e−0.6 +2000 ×e
−1
2
Finally,
σ(Y ) = Var{Y } = E{Var{Y |X}} + Var{E{Y |X}} ≈ 1096.42.
4. Let X1 and X2 be independent exponential random variables, each having rate μ. Let
X(1) = min{X1, X2}, X(2) = max{X1, X2}.
(a) (5 points) Compute E{X(1)} and Var{X(1)}.
(b) (5 points) Compute E{X(2)} and Var{X(2)}. Solution
(a) We know that X(1) is a exponential random variable with rate μ + μ = 2μ. So the mean is 1/2μ, and the variance is 1/4μ2.
(b) Foranys>0,
P{X(2) s|R1
Similarly,
Therefore,
E{T|R1
P{X−Y >s|Y
P{X−Y >s}= =
= e μe dy 0
P{Y
this scenario, the optimal inventory level is t = 1 logs. Now if all unsold inventory λc
can be returned for the amount r = 0.75c per pound, what is the optimal t?
Solution: This is similar to the inventory control problem in lecture 12. We use X to
denote the demand, t be the inventory, the profit P is
P =smin(X,t)−ct+rE{(t−X)+},
which is because only when t > X can the store return remaining inventory. We know
(λ+μ)2 (λ+μ)λ
E{XM}=E{XM|M =X}P{X
(a) (5 points) Using this strategy, what is the probability of winning? (b) (5 points) What value of s maximizes the probability of winning?
(c) (5 points) Show that one’s probability of winning when using the preceding strategy with the value of s specified in part (b) is 1/e.
Solution: (a)
P{N(T)−N(s)=1}=λ(T −s)e−λ(T−s). 8
(b) Take derivate of the expression in question (a) with respect to s, and set it to 0 −λe−λ(T −s) + λ2 (T − s)e−λ(T −s) = 0,
yields
The when s = s∗, the second order derivative is −λ2e−λ(T−s∗) < 0 (the remaining
part is 0) so s∗ is optimal.
(c) λ(T −s∗) = 1, so use the PMF of Poisson random varaible, P{N(T)−N(s∗) = 1} =
1 · e−1/1! = e−1.
10. *(10 points) Teams 1 and 2 are playing a match. The teams score points according to independent Poisson processes with respective rates λ1 and λ2. If the match ends when one of the teams has scored k more points than the other, find the probability that team 1 wins. (Hint: Relate this to the gambler’s ruin problem)
Solution: If λ1 = λ2, then apparently, the probability is 0.5. When λ1 ̸= λ2, we firstly figure out the transition probability Pij, then we can directly use the conclusion from the gambler’s ruin model. State i means that team 1 is i points ahead of team 2, then we build a Markov Chain with state space {−k,−(k−1),··· ,−1,0,1,,··· ,k−1,k}. It has absorbing boundaries at −k and k, i.e., P−k,−k = Pk,k = 1. For −k < i < k,
P{i, i + 1} = P{team 1 scores before team 2} = λ1 , λ1 + λ2
P{i, i − 1} = P{team 2 scores before team 1} = λ2 . λ1 + λ2
Mimicking the gambler’s ruin model, let Pi be the probablity that team 1 wins starting at state i, and p = λ1/(λ1 + λ2), q = 1 − p we have
Pi+1−Pi=q(Pi−Pi−1), −k