Exam 2 Winter 2011

Name: ______This is a closed book exam. You may use a calculator and the formulas handed out along with the exam. Show your work so I can see how you arrived at your answers. (This is particularly important if I am to be able to give part credit.) Turn in this exam with your answers. However, don't write your answers on the exam itself; leave them on the pages with your work. Also turn in the formulas; put them on the formula pile.

1.You work in the human resources department at MegaConglomorate, Inc. Records indicate that if an employee is working one day there is a 90% chance (s)he will be at work the next day and a 10% chance (s)he will be absent. On the other hand, if the employee is absent one day, there is a 20% chance (s)he will be at work the next day and an 80% chance (s)he will be absent. You have made a Markov model of this situation with 1 representing an employee working on any given day and 2 representing the employee being absent. Let Xn denote whether an employee is working or absent n days in the future with Xo representing whether the employee is working or absent today. Xn takes on the values 1 or 2. Assume the hypotheses for Xn to be a Markov chain are satisfied. Suppose that each absent employee costs the company $200 per day in lost productivity. Suppose that today 8000 employees are working and 1000 are absent. Calculate numbers for answers to b, c, g and h.

a.(4 points) Give the transition matrix, P, for Xn.

b.(8 points) What would be the expected number of employees working the day after tomorrow?

c.(8 points) What would be the expected total cost in lost productivity the day after tomorrow?

d.(8 points) Find the eigenvalues and eigenvectors of P.

e.(8 points) Find formulas for the entries of Pn.

f.(8 points) Find a formula for the expected total cost in lost productivity n days from now.

g.(8 points) In the long run what is the expected number of employees absent on any given day?

h.(8 points) In the long run what is the expected total cost in lost productivity per year?

2.The Meat Council of America (MCA) has made a Markov chain model of people's eating habits. The results of this study are as follows.

a.If a person's last dinner included beef, then there is a 30% chance that her next dinner will include beef, a 50% chance that her next dinner will include chicken, and a 20% chance that her next dinner will include pork.

b.If a person's last dinner included chicken, then there is a 40% chance that her next dinner will include beef, a 30% chance that her next dinner will include chicken, and a 30% chance that her next dinner will include pork.

c.If a person's last dinner included pork, then there is a 20% chance that her next dinner will include beef, a 45% chance that her next dinner will include chicken, and a 35% chance that her next dinner will include pork.

d.The average cost for a meal which includes beef is $5, for a meal which includes chicken is $3 and a meal which includes pork is $4.

Let Xn denote a person's (n + 1)st dinner so Xo is her first dinner, etc. Xn takes on the values 1, 2, 3 where 1 means the dinner included beef, 2 chicken, and 3 pork. Assume a person only has one and only one of these three meats at each dinner. Assume the hypotheses for Xn to be a Markov chain are satisfied. Answer the following. In parts b-d explain how you would calculate the quantity in terms of the results of vector-matrix operations. A typical answer might be something like 20B13 + 40C4 where B=(IQ)-1 and C = T6f, where Q, T, and f are matrices or vectors which you specify. Please include an explanation why your formula works.

a.(4 points) Give the Markov matrix, P, for Xn.

b.(12 points) Suppose Bob's dinner on Monday includes beef. How would you calculate the probability that at least one of his dinners on Tuesday, Wednesday, Thursday, and Friday includes chicken?

c.(12 points) Suppose Mary's dinner on Sunday includes pork. How would you calculate the probability that she has pork again before she has chicken?

d.(12 points) Suppose Bill had chicken for dinner last night? How would you calculate the expected amount he spends for dinners before he has chicken for dinner again? Only count chicken once in your calculations.

Solutions

1.a.P =

b.8000 Pr{X2 = 1 | X0 = 1} + 1000 Pr{X2 = 1 | X0 = 2} = 8000(P2)11 + 1000(P2)21. One has = = . So the expected number is (8000)(0.83) + (1000)(0.34) = 6640 + 340 = 6980.

c.($200)(8000 Pr{X2 = 2 | X0 = 1} + 1000 Pr{X2 = 2 | X0 = 2}) = ($200)(8000(P2)12 + 1000(P2)22) = ($200)(8000(0.17) + 1000(0.66)) = ($200)(1360 + 660) = ($200)(2020) = $404,000. Another way taking advantage of the previous question: E{# absent} = Total – E{# working} = 9000 – 6980 = 2020. E{lost productivity} = $200E{# absent} = ($200)(2020) = $404,000.

d.0 = det( P - I ) = = (0.9 - )(0.8 - ) – (0.1)(0.2) = 2 - 1.7 + 0.7 = ( - 1)( - 0.7). So 1 = 1 and 2 = 0.7. v1= is always an eigenvector for 1 = 1. For 2 = 0.7 one has = (P - 2I)v = = . So y = - 2x. So v2= is an eigenvector for 2 = 0.7.

e.Pn = TDnT-1 = -1 = =

f.($200)(8000 Pr{Xn = 2 | X0 = 1} + 1000 Pr{Xn = 2 | X0 = 2}) = ($200)(8000(Pn)12 + 1000(Pn)22) = ($200)(8000(1 - (0.7)n) + 1000(1 + 2(0.7)n)) = ($200)(9000 - 6000(0.7)n)) = ($200)(3000 - 2000(0.7)n)) = $600,000$400,000(0.7)n.

g.E{# absent on day n} = 8000 Pr{Xn = 2 | X0 = 1} + 1000 Pr{Xn = 2 | X0 = 2} = 8000(Pn)12 + 1000(Pn)22. Since we are talking about the long run we let n. Then (Pn)122 and (Pn)222, so E{# absent on day n}= 90002. Looking at the answer to question e we see that 2 = 1/3. So E{# absent on day n}= (9000)(1/3) = 3000.

h.If we use a seven day work week then the answer is (3000)($200)(365) = $219,000,000. If we use a five day work week then we multiply the previous value by 5/7 to get $156,478,572.

2.a.P =

b.Answer = F = Pr{T(2) 4 | X0 = 1}. Let Yn be the modified Markov chain where once you reach chicken you stay there indicating you have eaten chicken on or prior to the given day. The transisition matrix for Yn is Q=. Then F = Pr{Y4 = 2 | X0 = 1} = (Q4)12.

c.Let Zn be the modified Markov chain where once your reach chicken or pork you stay there indicating you have eaten chicken or pork on or prior to the given day. Also, add another state (4) corresponding to starting with pork. The transition matrix for Zn is S = . The transient states are 1 and 4 and ST = . Then the desired probability is f43 = Pr{T(3) | Z0 = 4} = ((I – ST)-1 )2. Working this out gives ( ( = (0.4 + 2.45) = (2.85) = 57/140 = 0.407.

d.Let Wn be the modified Markov chain where once your reach chicken you stay there indicating you have eaten chicken on or prior to the given day. Also, add another state (4) corresponding to starting with chicken. The transition matrix for Wn is V = . The transient states are 1, 3 and 4 and VT = . Then the expected amount spent 5E{N(1) | W0 = 4} + 4E{N(3) | W0 = 4} + 3E{N(4) | W0 = 4} = ((I – VT)-1)3.