Homework III

Due in stages; Problem 1 due Wednesday, October 27, and the remainder due on Monday, November 1.

Problem 1:

Consider a producer/consumer setting:

We will model this as a discrete-time Markov chain, with the state at time n being the number of items in the buffer at the beginning of time slot n.

Actually, this is a birth/death chain as in Section 10.3.6, except here we are in discrete time. Thus there is a closed-form solution. You can either look the formula up on the Web, or ignore that and simply use findpi1() to find the π.

  1. Find the long-run proportion of items that are discarded, as a function of π.
  2. Find the long-run mean residence time, i.e. the long-run average number of time slots that an item spends in the buffer, expressed in terms of π. Do not count the time slot in which the item arrives, but do count the time slot in which it is removed.
  3. Write R simulation code to verify your answers above.

Problem 2:

Problem 3, ECS 132 Homework III (YouTube data analysis).

Problem 3:

In a Markov chain, the distribution of Xn+1, given Xn and Xn-k, k = 1,2,... depends only on Xn. The notion of second-order Markov chain (SOMC) generalizes that: The distribution of Xn+1, given Xn and Xn-k, k = 1,2 depends only on Xn and Xn-1.

In an SOMC, let Yn = (Xn-1, Xn). Then the Yn form a Markov chain. The transition probabilities now are triple-subscripted, with P(Xn+1 = k | Xn-1 = i and Xn = j) being denoted by pijk. Similarly, stationary probabilities are double-subscripted:

limn → ∞ P(Xn-1 = i and Xn = j) = πij

(assuming nonperiodicity etc.).

The Xn form an "un-Markov chain," but

qij = limn → ∞ P(Xn+1 = j | Xn = i)

will still exist in typical situations.

Find the qij in terms of the pijk and the πij. Hint: You can assume that Y1 has the distribution π.