Tenth Problem Assignment EECS 401 Due on April 6, 2007 PROBLEM 1 (28 points) Dav points) Davee is taking a multiplemultiple-choice choice exam. exam. You may assume that the number of questions is infinite. Simultaneously, Simultaneously, but independently, independently, his conscious and subconscious facilities are generating answers answers for him, each in a Poisson manner. manner. (His conscious and subconscious are always working on different questions.) Average rate at which conscious responses are generated = λ c responses/min Average rate at which subconscious responses are generated = λ s responses/min Each conscious response is an independent Bernoulli trial with probability pc of being correct. correct. Similar Similarly ly,, each subconscious subconscious response is an independent independent Bernoulli Bernoulli trial with probability ps of being correct. Dav Dave respon responds ds onl only y once once to each questi question, on, and you you can assume assume that his tim timee for for record recording ing these conscious and subconscious responses is negligible. (a) Determine (a) Determine pK (k ), the probability mass function for the number of conscious conscious responses responses T minutes. Dave makes in an interval of T Solution The numb number er of conscious of conscious responses is a Poisson oisson random random varia variable ble with with parame parameter ter λ = λ c T . Thus, pk (k ) =
(λc T )k e−λc T k !
(b) If (b) If we pick any question to which Dave has responded, what is the probability that his answer to that question: (a) Represents (a) Represents a conscious response Solution The probability probability of a conscious response response is λc λc + λs
(b) Represents (b) Represents a subconscious response Solution The probability probability of a subconscious response is λs λc + λs
1
Due on April 6, 2007
Solutions
Tenth Problem Assignment
(c) If we pick an interval of T minutes, what is the probability that in that interval Dave will make exactly r conscious responses and exactly s subconscious responses. Solution The probability of making r conscious and s subconscious responsed in T minutes is (λc T )r e−λc T r!
×
(λs T )s e−λs T s!
(d) Determine the moment generating function for the probability density function for random variable X, where X is the time from the start of the exam until Dave makes his first conscious response which is preceded by at least one subconscious response. Solution Let Y s denote the random variable when the first subconscious response is generated and Y c denote the random time starting for the first subconscious response when the first conscious response is generated. Then X = Y s + Y c
Thus, MX (s) = M Y s (s) · MY c (s) =
λs s − λs
·
λc s − λc
(e) Determine the probability mass function for the total number of responses up to and including his third conscious response. Solution Consider the arrivals of the merged process. Each arrival belongs to the conscious process with probability λc /(λc + λ s ). Thus, if we only count the arrivals, then the arrivals from the conscious process form a Bernoulli process with parameter p = λc /(λc + λ s ). Then the number of responses (‘trials’) up to and including his third conscious response (‘success’) has Pascal distribution with n = 3 , that is pK (k ) =
k − 1 2
λc λc + λs
3
λs λc + λs
k−3
(f) The papers are to be collected as soon as Dave has completed exactly N responses. Determine: Solution The number of responses are generated by a Poisson process with rate λc + λs . The correct responses are generated by a Poisson process with rate p c λc + ps λs . Thus each response is correct with probability ( pc λc + ps λs )/(λc + λs ).
(i) The expected number of questions he will answer correctly
2
Due on April 6, 2007
Solutions
Tenth Problem Assignment
Solution Theexpected number of questions answered correctly is the mean of a binomial random variable and equal to pc λc + ps λs N λc + λs
(ii) The probability mass function for L, the number of questions he answers correctly Solution This probability distribution of L, the number of questions answered correctly is Binomial N, ( pc λc + ps λs )/(λc + λs ) , that is
pL (l) =
N l
l
pc λc + ps λs λc + λs
pc λc + ps λs 1 − λc + λs
N−l
(g) Repeat part (f) for the case in which the exam papers are to be collected at the end of a fixed interval T minutes. Solution The number of correct responses in a fixed interval T is a Poisson process with parameter ( pc λc + ps λs )T . So the PMF of the number of correct responses is pL (l) =
l
( pc λc + ps λs )T e−(pc λc +ps λs )T
l!
with mean ( pc λc + ps λs )T . (16 points) All ships travel at the same speed through a wide canal. Eastbound ship arrivals at the canal are a Poisson process with an average arrival rate λE ships per day. Westbound ships arrive as an independent Poisson process with average arrival rate λW per day. An indicator at a point in the canal is always pointing in the direction of travel of the most recent ship to pass it. Each ship takes t days to traverse the length of the canal. (a) Given that the pointer is pointing west: (i) What is the probability that the next ship to pass it will be westbound?
PROBLEM 2
Solution The direction of the next ship does not depend on the previous ships. Therefore, this is just the probability λW /(λE + λW ) that the next ship is westbound.
(ii) What is the PDF for the remaining time until the pointer changes direction? Solution The pointer will change directions on the next arrival of an eastbound ship. The time until an eastbound ship arrives is an exponential random variable with parameter λE , and its PDF is λE e−λE t ,
3
t0
Due on April 6, 2007
Solutions
Tenth Problem Assignment
(b) What is the probability that an eastbound ship will see no westbound ships during its eastward journey through the canal? Solution Suppose that an eastbound ship enters the canal at time t0 . This ship will meet any westbound ship that entered the canal between times t0 − t and t0 + t . Thus, the desired probability is the probability that there are no westbound ship arrivals during an interval of length 2t, and using the Poisson PMF, it is equal to e−λW 2t
(c) We begin observing at an arbitrary time. Let V be the time we have to continue observing until we see the seventh eastbound ship. Determine the PDF for V . Solution The time until we see the seventh eastbound ship is an Erlang random variable of order 7, with parameter λE , of the form λ7E t6 e−λE t 6!
(9 points) The number of customers N who shop at a supermarket in a day is Poisson with parameter λ . The number of items purchased by any customer is Poisson with parameter µ , and the number of items purchased by different customers are independent of each other.
PROBLEM 3
(a) Assume that the number of items purchased by each customer is independent of N. Find E[S ] and V ar(S), where S is the total number of items sold. Solution
Let Xi be the number of items bought by the ith customer. Then S =
N
Xi
i=0
which is the random sum of a random number of random variables. Thus, E[S ] = E [N ]E[X ] = λµ
and
Var(S) = E [N ] Var(X) + E[X ]
2
Var(N) = λµ + λµ 2
(b) The supermarket has two advertising strategies, one can increase λ by 10% and the other increases µ by 10%. What are the effects of these two strategies on the mean and variance of S? Which is the better strategy?
4
Due on April 6, 2007
Solutions
Tenth Problem Assignment
Solution The better strategy will be one which keeps the variance low. (i) Increase µ by 10%. The variance becomes 1.1λµ + 1.21λµ 2 . (ii) Increase λ by 10%. The variance becomes 1.1λµ + 1.1λµ 2 . Thus we have to compare 1.1λµ + 1.21λµ 2 ≷ 1.1λµ + 1.1λµ 2
The R.H.S. is smaller so we choose option (b), i.e., increase λ by 10%. (c) Because of congestion, when there are more customers around, the amount of time each customer spends in a store tends to be shorter and hence they will more likely buy fewer items. To incorporate that, we can revise the above model so that where there are n customers, µ = c/n , where c is some constant. (i) Is the number of items bought by a customer independent of N? Solution No. The rate at which each customer buys items depends on the number of customers in the store. So, the number of items bought is dependent on N.
(ii) Find E[S ] and V ar(S) in this new model. Solution
n
E[S ] = E E[S|N ] = E E[
Xi |N ] = E N ·
i=0
c = N
c.
Further, as conditioned on N, Xi s are independent, we have
n
Var(S|N = n ) = V ar
Xi |N = n =
i=0
n
Var(Xi |N = n ) = n ·
i=0
c = c n
Thus,
Var(S) = E Var(S|N) + V ar E[S|N ] − = E [c ] + V ar(c) =
c
Notice that the mean and variance are same. One would suspect that it likely that S is a Poisson random variable. In fat it is easy to check this fact by evaluating the transform of S. (18 points) The Markov chain with transition probabilities listed below is in state 3 immediately before the first trial.
PROBLEM 4
p1,1 = p 2,2 = 0.4, p1,2 = p 2,1 = 0.6, p3,3 = 0.2, p3,4 = 0.3, p4,5 = p 5,6 = p 6,4 = 1.0
5
Due on April 6, 2007
Solutions
Tenth Problem Assignment
(a) Draw the state-transition diagram for this Markov Chain. Indicate which states, if any, are recurrent, transient, and periodic. . 0.6 0.4
1
. 0.5
2
0.3 3
1 4
1 5
6
0.6
Solution Recurrent States: 1,2,4, 5, 6 Transient States: 3 Periodic States: 4, 5, 6
1
(b) Find the probability that the process is in state 3 after n trials. Solution If the process leaves state 3, it can never return back to it. Thus the probability that the process is in state 3 is the same as the probability that the process remains in state 3 for all times until n. That is, the probability is 0.2n .
(c) Find the expected number of trials up to and including the trial on which the process leaves state 3 . Solution Let N be the trial on which the process leaves state 3. From the previous part, we know that N is a geometric random variable with success rate p = 0.8 (because given that we are in state 3 , we will leave with probability 0.8). Thus, we have for the expected value of N:
∞
E [N ] =
n0.2n−1 0.8 =
n=1
5 4
(d) Find the probability that the process never enters state 1. Solution The process cannot stay in state 3 forever. At some finite time, it will make a transition to either state 2 or 4 . If the process jumps to state 2 , it cannot stay in state 2 forever and at some finite time it will make a transition to state 1. However, if the process makes a transition from state 3 to 4, it can never return to state 1. Thus the probability of never entering state 1 is the same as the probability of jumping from state 3 to 4 (rather than state 2). That is, we have: 0.3 3 = 0.3 + 0.5 8
(e) Find the probability that the process is in state 4 after 10 trials.
6
Due on April 6, 2007
Solutions
Tenth Problem Assignment
Solution The process will be in state 4 after 10 trials if and only if makes a jump from state 3 to 4 in trials 1, 4, 7 or 10. The probability of this happening is: 0.3 + ( 0.2)3 + (0.2)6 + (0.2)9 ∗ (0.3) = 0.3
1 − ( 0.2)1 2 = 0.3024 1 − ( 0.2)3
(f) Given that the process is in state 4 after 10 trials, find the probability that the process was in state 4 after the first trial. Solution Let A be the event that the process is in state 4 after 10 trials and B be the event that the process was in state 4 after the first trial. Observe that B ⊂ A . Thus, P (B|A) =
PROBLEM 5
P (A ∩ B P(B) 0.3 = = = 0.992 P(A) P(A) 0.3024
(20 points)
(a) Buses depart from Ann Arbor to Detroit every hour on the hour. Passengers arrive according to a Poisson process of rate λ per hour. Find the expected number of passengers on a bus. (Ignore issues of limited seating.) Solution The expected number of passengers on a bus is the expected number of arrivals of a Poisson process of rate λ per hour in an hour, hence equal to λ.
(b) Now suppose that the buses are no longer operating on a deterministic schedule, but rather their interdeparture times are independent and exponentially distributed with rate µ per hour. Find the PMF for the number of buses arriving in one hour. Solution The interdeparture time between the buses is exponential process with rate µ , hence the departure process of the buses is a Poisson process with rate µ . Thus the PMF for the number of buses arriving in one hour is pK (k ) =
µ k e−µ k !
(c) Let us define an “event” at the bus stop to be either the arrival of a passenger, or the departure of a bus. With the same assumptions as in part 2 above, find the expected number of “events” that occur in one hour. Solution The “event” process is the merged process of two Poisson processes, hence a Poisson process with rate λ + µ per hour. Thus the expected number of “events” in an hour is λ + µ .
7
Due on April 6, 2007
Solutions
Tenth Problem Assignment
(d) If a passenger arrives at thebus stop andsees2λ people waiting, find his/her expected time to wait until the next bus.
8
Due on April 6, 2007
Solutions
Tenth Problem Assignment
Solution The interarrival time between the buses is an exponential process, and hence memoryless. The fact that there are 2λ people waiting gives some information about the past of the process. But as the arrival process is memoryless, this does not convey any information about the future of the process and hence the waiting time is also exponential with rate µ . Thus, the expected waiting time is 1/µ .
(e) Find the PMF for the number of people on a bus. Solution We are interested only in the number of passengers who arrive between the arrivals of buses. Suppose we concentrate only on arrivals and consider the arrival of buses as sucesses and the arrival of a passenger as faliure. Thus, we are interested in the number of failures between two successes of a Bernoulli process. This has a shifted geometric distribution given by pN (n) =
n
λ λ + µ
µ λ + µ
(9 points) For a series of dependent trials, the probability of success on any given trial is given by (k + 1)/(k + 3), where k is the number of successes in the previous three trials. Define a state description and a set of transition probabilities which allow this process to be described as a Markov chain. Draw the state transition diagram. Try to use the smallest possible number of states.
PROBLEM 6
Solution
Let the outcome of the previous three trials be the “state”. Then 1 2 1 2
1 3 2 3
000
001
1 2
100
1 2
1 2
010
1 2
3 5
101
011 3 5
1 2
9
3 5
2 5
110
2 5
111
2 3
1 3
Due on April 6, 2007