


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



MATH 381, fall 07
Solutions.
Problem 1.(15 points) A power generator has two states: working and broken. The vector of probabilities, with the first coordinate being the probability that the machine is working, and the second coordinate being the probability that the machine is broken, changes from day to day according to the transition matrix [ 19 / 20 1 / 3 1 / 20 2 / 3
(a) Find the eigenvalues of the transition matrix.
(b) Assuming that the generator has been in use for years, find what fraction of time it is actually working.
SOLUTION: To find eigenvalues, recall that one of the eigenvalues, let’s call it λ 1 , is equal to 1. (This is true for every transition matrix.) To find the other eigenvalue, let’s call it λ 2 , recall that the determinant of the transition matrix equals λ 1 λ 2. The determinant is 19 / 20 · 2 / 3 − 1 / 20 · 1 /3 = 37/ 60 , the eigenvalue λ 1 = 1, so λ 2 = 37/ 60. To find the steady state of the Markov Chain, note that |λ 2 | < 1 , so the steady state is represented by the eigenvector associated with λ 1. So, we need a probability vector v that solves [ 19 / 20 1 / 3 1 / 20 2 / 3
v 1 v 2
v 1 v 2
, which is the same as
v 1 v 2
It must be that −v 1 /20 + v 2 /3 = 0, and also v 1 + v 2 = 1 (and v 1 , v 2 ≥ 0 ). So, v 1 = 20/ 23 and v 2 = 3/ 23. v 1 is (approximately) the probability that the generator is working on any particular day, so it can be said that the generator is working every 20 out of 23 days.
Problem 2.(18 points) You need to help the Rapid Shakes espresso stand estimate the number of customers it can serve, using Markov Chain techniques. Here is the data: there are two servers/baristas, Caf and Jav. The customers, who arrive at the average rate of 40 per hour, will go to Caf if she is idle (she makes better drinks), will go to Jav if he is idle but Caf is busy, and will leave if both servers are busy. On average, it takes Caf 2 minutes to serve a customer, while it takes Jav 3 minutes. You break up the day into 20 second intervals, and assume that:
Do the following:
(a) Describe the four states of the espresso stand relevant for the Markov Chain analysis.
(b) Sketch a transition diagram between these states. Include edges and transition probabilities for each transition which has nonzero probability. Do not include edges representing transitions that have 0 probability.
(c) Write down the transition matrix.
SOLUTION: The four states are:
The relevant probabilities are:
the probability that a customer arrives in a 20 second interval: 2 / 9 (because 40 customers arrive in 60 minutes, on average);
the probability that Caf will finish serving a customer in a 20 second interval: 1 / 6 (because Caf serves a customer in 2 minutes, on average);
the probability that Jav will finish serving a customer in a 20 second interval: 1 / 9 (because Jav serves a customer in 3 minutes, on average).
The transition matrix is: (^)
Sorry, I will not draw a transition diagram...
Extra Credit Problem(5 points) You have access to a random number generator that generates uniformly distributed numbers in [0, 1]. You need to generate a positive random variable X such that
P (X ≤ t) = e−^ (^5) t .
How do you do it?
SOLUTION: for all positive t, e−^5 /t^ is in (0, 1). So, the probability that Y , a uniformly distributed random variable in [0, 1], is less than e−^5 /t^ is exactly e−^5 /t. In other words,
P (Y ≤ e−^5 /t) = e−^5 /t.
Now some algebra:
Y ≤ e−^5 /t^ ⇐⇒ ln Y ≤ − 5 /t ⇐⇒ t ln Y ≤ − 5 ⇐⇒ t ≥ − 5 / ln Y
So, P (t ≥ − 5 / ln Y ) = e−^5 /t.
The answer is X = − 5 / ln Y.