SEEM 3570: Practice problems (2020-21) Note: this set of problems is mainly for students to practice and prepare for the final exam. However, it does not indicate the numbers, types, and level of difficulties of the problems in the final exam. 1. A store stocks a particular item. The demand for the product each day is 1 item with probability 1/6th, 2 items with probability 3/6th, and 3 items with probability 2/6th. Assume that the daily demands are independent and identically distributed. Each evening if the remaining stock is less than 3 items, the store orders enough to bring the total stock up to 6 items. These items reach the store before the beginning of the following day. Assume that any demand is lost when the item is out of stock. (a) Let Xn be the amount in stock at the beginning of day n; assume that X0 = 5. If the process is a Markov chain, give the state space, initial distribution, and transition matrix. If the process is not, explain why it’s not. Solution. (a) Observe that the state space of Xn is S = {3, 4, 5, 6}, since if the inventory drops below 3 we order up to 6. So at the beginning of a day the minimum number of items is equal to 3. The initial state is deterministic and the initial distribution is given by P (X0 = 5) = 1. Next, we find the transition matrix. Note that P (Xn+1 = 3|Xn = 3) = P (Xn+1 = 4|Xn = 3) = P (Xn+1 = 5|Xn = 3) = 0, since whenever the inventory level goes below 3 we order up to 6. Therefore, P (Xn+1 = 6|Xn = 3) = 1. Now, P (Xn+1 = 3|Xn = 4) = 1/6, since the demand is equal to 1 with probability 1/6 and if the demand during day n is 1 we end up with 3 items and do not order. Otherwise we order, hence P (Xn+1 = 6|Xn = 4) = 5/6. Going in this fashion, the transition matrix can be shown to be P = 0 0 0 1 1/6 0 0 5/6 3/6 1/6 0 2/6 2/6 3/6 1/6 0 , where Pij = P (Xn+1 = j + 2|Xn = i+ 2) • For the discrete time Markov chain X in Problem 1, compute the following: (a) P (X2 = 6 | X0 = 5). (b) P (X2 = 5, X3 = 4, X5 = 6 | X0 = 3). (c) E(X2 | X0 = 6). (d) Assume the initial distribution is (0, 0, .5, .5). Find P (X2 = 6). (e) With the same initial distribution in part d), find P (X4 = 3, X1 = 5 | X2 = 6). Solution. In the solutions below we use the following formulas: for two events A and B P (A | B) = P (A ⋂ B) P (B) and for two random variables Y and Z and a constant k E[Y | Z = k] = ∞∑ n=0 nP{Y = n | Z = k} and E[Y ] = ∞∑ k=0 E[Y | Z = k]P{Z = k}. First, as computed in Problem 1, P = 0 0 0 1 1/6 0 0 5/6 3/6 1/6 0 2/6 2/6 3/6 1/6 0 =⇒ P 2 = 1/3 1/2 1/6 0 5/18 5/12 5/36 1/6 5/36 1/6 1/18 23/36 1/6 1/36 0 29/36 . (a) P{X2 = 6 | X0 = 5} = P 23,4 = 23/36, (b) P{X2 = 5, X3 = 4, X5 = 6 | X0 = 3} = P 21,3P3,2P 22,4 = 1/216, (c) E[X2 | X0 = 6] = 3P{X2 = 3 | X0 = 6}+ 4P{X2 = 4 | X0 = 6} +5P{X2 = 5 | X0 = 6}+ 6P{X2 = 6 | X0 = 6} = 3P 24,1 + 4P 2 4,2 + 5P 2 4,3 + 6P 2 4,4 = 49/9, (d) If we know that α = (0, 0, 0.5, 0.5), then P{X2 = 6} = α1P 21,4 + α2P 22,4 + α3P 23,4 + α4P 24,4 = 52/72 = 13/18, (e) P{X4 = 3, X1 = 5 | X2 = 6} = P{X4 = 3, X1 = 5, X2 = 6} P{X2 = 6} = P{X4 = 3, X2 = 6 | X1 = 5}P{X1 = 5} P{X2 = 6} = P3,4P 2 4,1P{X1 = 5} P{X2 = 6} where P{X1 = 5} = α1P1,3 + α2P2,3 + α3P3,3 + α4P4,3 = 1/12 an P{X2 = 6} has been calculated in the previous problem. The finial ansewer is 1/156. 2 2. Suppose each morning a factory posts the number of days worked in a row without any injuries. Assume that each day is injury free with probability 98/100. Furthermore, assume that whether tomorrow is injury free or not is independent of which of the preceding days were injury free. Let X0 = 0 be the morning the factory first opened. Let Xn be the number posted on the morning after n full days of work. (a) Is {Xn, n ≥ 0} a Markov chain? If so, give its state space, initial distribution, and transition matrix P . If not, show that it is not a Markov chain. (b) Is the Markov chain irreducible? Explain. (c) Is the Markov chain periodic or aperiodic? Explain and if it is periodic, also give the period. (d) Find the stationary distribution. (e) Is the Markov chain positive recurrent? If so, why? If not, why not? Solution. (a) Yes, it is a Markov Chain. The state space is {0, 1, 2, 3, · · · }. a = (1, 0, 0, · · · ), Pi,j = { 98/100 j = i+ 1; 2/100 j = 0. (b) Yes, it is irreducible. Starting from any state i, the probability of visiting state 0 in one step is 2/100. And starting from state 0, the probability of visiting state i in i step is (98/100)i. Therefore, state 0 communicates with any other state. Thus any state commutes with each other. (c) Starting from state 0, we have positive probability to visit state 0 again in one step. So state 0 is aperiodic. And periodicity is a class property, so the Markov chain is aperiodic. (d) Let p = 98/100. You can write down the following balance equations. pii = ppii−1 (1) pi0 = (1− p) ∑ i pii. (2) From (2), you can write pi0 = 1−p since ∑ i pii = 1. From (1), you will have pii = p ipi0 = (1−p)pi. (e) Yes, because it is irreducible, and the stationary distribution exists. 3 3. Consider the following transition matrix of a Markov chain with state space {0, 1, 2, 3, }: P = 0 0.5 0 0.5 0.6 0 0.4 0 0 0.7 0 0.3 0.8 0 0.2 0 (3) (a) Is the Markov chain periodic? Give the period of each state. (b) Is (pi1, pi2, pi3, pi4) = (33/96, 27/96, 15/96, 21/96) the stationary distribution of the Markov Chain? (c) Is P 10011 = pi1? Is P 101 11 = pi1? Give an expression for pi1 in terms of P 100 11 and P 101 11 . Solution. (a) Yes, it is. Each state has period 2. (b) Yes, it is. pi satisfies the balance equation piP = pi and ∑4 i=1 pii = 1. Since the Markov chain is irreducible, the stationary distribution is unique. (c) P 10011 = 11/16 6= pi1, P 10111 = 0 6= pi1. Since the Markov chain has period 2, pi1 = P 10011 + P 101 11 2 . 4 4. Consider the data in the following table: i x1 x2 y 1 33 49 −1 2 44 59 6 3 48 29 −21 4 58 34 −8 5 49 76 15 6 68 88 19 7 34 42 23 8 82 69 −10 9 21 82 68 10 67 83 15 (a) (10 marks) Fit a multiple linear regression model relating y to x1 and x2 : y = a+ b1x1 + b2x2. Solution: Let X = 1 33 49 1 44 59 1 48 29 1 58 34 1 49 76 1 68 88 1 34 42 1 82 69 1 21 82 1 67 83 and y = −1 6 −21 −8 15 19 23 −10 68 15 βˆ = ( XTX )−1 XT y = 4.3658−0.9304 0.8695 The fitted regression model is: yˆ = 4.3658− 0.9304x1 + 0.8695x2. (c) (10 marks ) Calculate t statistics for testing the hypotheses H0 : b1 = 0 vs H1 : b1 6= 0, and H0 : b2 = 0 vs H1 : b2 6= 0. What conclusions can you draw about the roles the variables play in the model at α = 0.01 level. Solution: C = ( XTX )−1 = 1.4749E + 00 −1.2848E − 02 −1.1904E − 02−1.2848E − 02 3.3891E − 04 −6.9282E − 05 −1.1904E − 02 −6.9282E − 05 2.5198E − 04 (s′)2 = ∑n i=1 ˆ 2 i n− k − 1 = ∑10 i=1 ˆ 2 i 10− 2− 1 = 141.1094, where ˆi = yi − yˆi are the regression residuals. The test statistics are t1 = bˆ1√ (s′)2C22 = −0.9304√ 141.1094∗3.3891∗10−4 = −4.2546 t2 = bˆ2√ (s′)2C33 = 0.8695√ 141.1094∗2.5189∗10−4 = 4.6112 5 Since |t1| > tα2 ,n−k−1 = t0.005,7 = 3.499, thus it is significant at α = 0.01 level (i.e. we reject H0 : b1 = 0). Equivalently, one can obtain the same conclusion by computing p1 = P (tn−k−1 ≤ −4.2546) = P (t7 ≤ −4.2546) < α2 = 0.005. Since |t2| > tα2 ,n−k−1 = t0.005,7 = 3.499, thus it is significant at α = 0.01 level (i.e. we reject H0 : b2 = 0). 6
欢迎咨询51作业君