Markov Chains
1. **Markov Chain with Products A and B**
**Problem:** Given initial proportions and switching probabilities, find the transition matrix, proportions after two months, and long-run proportions.
**Step 1: Define states and initial vector**
States: A and B.
Initial vector: $\mathbf{p_0} = \begin{bmatrix}0.4 \\ 0.6\end{bmatrix}$
**Step 2: Construct transition matrix $P$**
- From A: 30% switch to B, 70% stay in A.
- From B: 25% switch to A, 75% stay in B.
$$P = \begin{bmatrix}0.7 & 0.25 \\ 0.3 & 0.75\end{bmatrix}$$
**Step 3: Find proportions after two months**
Calculate $\mathbf{p_2} = P^2 \mathbf{p_0}$.
First, compute $P^2$:
$$P^2 = P \times P = \begin{bmatrix}0.7 & 0.25 \\ 0.3 & 0.75\end{bmatrix} \times \begin{bmatrix}0.7 & 0.25 \\ 0.3 & 0.75\end{bmatrix} = \begin{bmatrix}0.7\times0.7 + 0.25\times0.3 & 0.7\times0.25 + 0.25\times0.75 \\ 0.3\times0.7 + 0.75\times0.3 & 0.3\times0.25 + 0.75\times0.75\end{bmatrix} = \begin{bmatrix}0.55 & 0.325 \\ 0.3 & 0.6\end{bmatrix}$$
Then multiply by $\mathbf{p_0}$:
$$\mathbf{p_2} = \begin{bmatrix}0.55 & 0.325 \\ 0.3 & 0.6\end{bmatrix} \begin{bmatrix}0.4 \\ 0.6\end{bmatrix} = \begin{bmatrix}0.55\times0.4 + 0.325\times0.6 \\ 0.3\times0.4 + 0.6\times0.6\end{bmatrix} = \begin{bmatrix}0.22 + 0.195 \\ 0.12 + 0.36\end{bmatrix} = \begin{bmatrix}0.415 \\ 0.48\end{bmatrix}$$
**Step 4: Find long-run proportions (steady state)**
Solve $\pi P = \pi$ with $\pi = [\pi_A, \pi_B]$ and $\pi_A + \pi_B = 1$.
Equations:
$$\pi_A = 0.7\pi_A + 0.25\pi_B$$
$$\pi_B = 0.3\pi_A + 0.75\pi_B$$
From first:
$$\pi_A - 0.7\pi_A = 0.25\pi_B \Rightarrow 0.3\pi_A = 0.25\pi_B \Rightarrow \pi_B = \frac{0.3}{0.25} \pi_A = 1.2 \pi_A$$
Using $\pi_A + \pi_B = 1$:
$$\pi_A + 1.2\pi_A = 1 \Rightarrow 2.2\pi_A = 1 \Rightarrow \pi_A = \frac{1}{2.2} = 0.4545$$
$$\pi_B = 1 - 0.4545 = 0.5455$$
---
2. **Customer Categories Markov Chain**
**Step 1: Define states L, A, C and transition matrix $P$**
$$P = \begin{bmatrix}0.8 & 0.15 & 0.05 \\ 0.3 & 0.6 & 0.1 \\ 0 & 0 & 1\end{bmatrix}$$
**Step 2: Probability At-Risk customer eventually churns**
Churned (C) is absorbing.
Use absorbing Markov chain theory. Partition $P$:
Transient states: L, A
Absorbing: C
$$Q = \begin{bmatrix}0.8 & 0.15 \\ 0.3 & 0.6\end{bmatrix}, \quad R = \begin{bmatrix}0.05 \\ 0.1\end{bmatrix}$$
Fundamental matrix:
$$N = (I - Q)^{-1} = \left(\begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix} - \begin{bmatrix}0.8 & 0.15 \\ 0.3 & 0.6\end{bmatrix}\right)^{-1} = \begin{bmatrix}0.2 & -0.15 \\ -0.3 & 0.4\end{bmatrix}^{-1}$$
Calculate determinant:
$$det = 0.2 \times 0.4 - (-0.15) \times (-0.3) = 0.08 - 0.045 = 0.035$$
Inverse:
$$N = \frac{1}{0.035} \begin{bmatrix}0.4 & 0.15 \\ 0.3 & 0.2\end{bmatrix} = \begin{bmatrix}11.43 & 4.29 \\ 8.57 & 5.71\end{bmatrix}$$
Probability of absorption:
$$B = N R = \begin{bmatrix}11.43 & 4.29 \\ 8.57 & 5.71\end{bmatrix} \begin{bmatrix}0.05 \\ 0.1\end{bmatrix} = \begin{bmatrix}11.43\times0.05 + 4.29\times0.1 \\ 8.57\times0.05 + 5.71\times0.1\end{bmatrix} = \begin{bmatrix}0.5715 + 0.429 \\ 0.4285 + 0.571\end{bmatrix} = \begin{bmatrix}1.0 \\ 1.0\end{bmatrix}$$
So, an At-Risk customer will eventually churn with probability 1.
**Step 3: Steady-state distribution**
Solve $\pi P = \pi$ with $\pi_L + \pi_A + \pi_C = 1$.
From $\pi P = \pi$:
$$\pi_L = 0.8\pi_L + 0.3\pi_A$$
$$\pi_A = 0.15\pi_L + 0.6\pi_A$$
$$\pi_C = 0.05\pi_L + 0.1\pi_A + \pi_C$$
From last:
$$\pi_C = 0.05\pi_L + 0.1\pi_A + \pi_C \Rightarrow 0 = 0.05\pi_L + 0.1\pi_A$$
Implies $\pi_L = \pi_A = 0$.
Then $\pi_C = 1$.
Long-run distribution is all customers churned.
---
3. **Economy States Markov Chain**
**Step 1: Transition matrix $P$**
States: B, N, R
$$P = \begin{bmatrix}0.7 & 0.2 & 0.1 \\ 0.3 & 0.6 & 0.1 \\ 0.1 & 0.4 & 0.5\end{bmatrix}$$
**Step 2: Probability economy in Normal will be in Boom after two years**
Calculate $P^2$ and look at element $(N,B)$.
Calculate $P^2 = P \times P$:
Row N:
$$P^2_{N,B} = 0.3\times0.7 + 0.6\times0.3 + 0.1\times0.1 = 0.21 + 0.18 + 0.01 = 0.4$$
Answer: Probability is 0.4.
---
4. **Employee Levels Markov Chain**
**Step 1: Transition matrix $P$**
States: J, M, S
$$P = \begin{bmatrix}0.7 & 0.2 & 0 \\ 0 & 0.5 & 0.4 \\ 0 & 0 & 0.8\end{bmatrix}$$
(Leaving and retiring are absorbing outside states, omitted here.)
**Step 2: Probability Junior employee eventually reaches Senior**
Transient states: J, M
Absorbing: S
Partition:
$$Q = \begin{bmatrix}0.7 & 0.2 \\ 0 & 0.5\end{bmatrix}, \quad R = \begin{bmatrix}0 \\ 0.4\end{bmatrix}$$
Fundamental matrix:
$$N = (I - Q)^{-1} = \begin{bmatrix}1-0.7 & -0.2 \\ 0 & 1-0.5\end{bmatrix}^{-1} = \begin{bmatrix}0.3 & -0.2 \\ 0 & 0.5\end{bmatrix}^{-1}$$
Determinant:
$$0.3 \times 0.5 - 0 = 0.15$$
Inverse:
$$N = \frac{1}{0.15} \begin{bmatrix}0.5 & 0.2 \\ 0 & 0.3\end{bmatrix} = \begin{bmatrix}3.33 & 1.33 \\ 0 & 2\end{bmatrix}$$
Probability of absorption:
$$B = N R = \begin{bmatrix}3.33 & 1.33 \\ 0 & 2\end{bmatrix} \begin{bmatrix}0 \\ 0.4\end{bmatrix} = \begin{bmatrix}1.33 \times 0.4 \\ 2 \times 0.4\end{bmatrix} = \begin{bmatrix}0.533 \\ 0.8\end{bmatrix}$$
Starting from Junior, probability to reach Senior is approximately 0.533.
---
5. **Warehouse Inventory Levels Markov Chain**
**Step 1: Transition matrix $P$**
States: H, M, L
$$P = \begin{bmatrix}0.6 & 0.3 & 0.1 \\ 0.2 & 0.5 & 0.3 \\ 0.1 & 0.5 & 0.4\end{bmatrix}$$
**Step 2: Probability starting at Medium reaches Low after 2 months**
Calculate $P^2$ and look at element $(M,L)$.
Calculate $P^2 = P \times P$:
Row M:
$$P^2_{M,L} = 0.2\times0.1 + 0.5\times0.3 + 0.3\times0.4 = 0.02 + 0.15 + 0.12 = 0.29$$
Answer: Probability is 0.29.
---
6. **Input-Output Table Economy**
Given:
$$Z = \begin{bmatrix}500 & 800 \\ 700 & 1000\end{bmatrix}, \quad d = \begin{bmatrix}350 \\ 200\end{bmatrix}$$
**Step 1: Technological coefficient matrix $A$**
Calculate column sums:
$$x_1 = 500 + 700 + 350 = 1550, \quad x_2 = 800 + 1000 + 200 = 2000$$
Calculate $A$ by dividing each element of $Z$ by total output of sector:
$$A = \begin{bmatrix}\frac{500}{1550} & \frac{800}{2000} \\ \frac{700}{1550} & \frac{1000}{2000}\end{bmatrix} = \begin{bmatrix}0.3226 & 0.4 \\ 0.4516 & 0.5\end{bmatrix}$$
**Step 2: Leontief matrix $L = (I - A)^{-1}$**
$$I - A = \begin{bmatrix}1-0.3226 & -0.4 \\ -0.4516 & 1-0.5\end{bmatrix} = \begin{bmatrix}0.6774 & -0.4 \\ -0.4516 & 0.5\end{bmatrix}$$
Determinant:
$$det = 0.6774 \times 0.5 - (-0.4) \times (-0.4516) = 0.3387 - 0.1806 = 0.1581$$
Inverse:
$$L = \frac{1}{0.1581} \begin{bmatrix}0.5 & 0.4 \\ 0.4516 & 0.6774\end{bmatrix} = \begin{bmatrix}3.16 & 2.53 \\ 2.86 & 4.29\end{bmatrix}$$
**Step 3: Gross output with increased final demand**
New final demand:
$$d' = \begin{bmatrix}600 \\ 200 \times 1.2 = 240\end{bmatrix}$$
Gross output:
$$x = L d' = \begin{bmatrix}3.16 & 2.53 \\ 2.86 & 4.29\end{bmatrix} \begin{bmatrix}600 \\ 240\end{bmatrix} = \begin{bmatrix}3.16\times600 + 2.53\times240 \\ 2.86\times600 + 4.29\times240\end{bmatrix} = \begin{bmatrix}1896 + 607.2 \\ 1716 + 1029.6\end{bmatrix} = \begin{bmatrix}2503.2 \\ 2745.6\end{bmatrix}$$
---
Final answers summarized:
- Task 1a: $P = \begin{bmatrix}0.7 & 0.25 \\ 0.3 & 0.75\end{bmatrix}$
- Task 1b: After 2 months $\approx \begin{bmatrix}0.415 \\ 0.48\end{bmatrix}$
- Task 1c: Long-run $\approx \begin{bmatrix}0.4545 \\ 0.5455\end{bmatrix}$
- Task 2a: $P = \begin{bmatrix}0.8 & 0.15 & 0.05 \\ 0.3 & 0.6 & 0.1 \\ 0 & 0 & 1\end{bmatrix}$
- Task 2b: Probability At-Risk eventually churns = 1
- Task 2c: Steady state all churned
- Task 3i: $P = \begin{bmatrix}0.7 & 0.2 & 0.1 \\ 0.3 & 0.6 & 0.1 \\ 0.1 & 0.4 & 0.5\end{bmatrix}$
- Task 3ii: Probability Normal to Boom in 2 years = 0.4
- Task 4I: $P = \begin{bmatrix}0.7 & 0.2 & 0 \\ 0 & 0.5 & 0.4 \\ 0 & 0 & 0.8\end{bmatrix}$
- Task 4II: Probability Junior reaches Senior = 0.533
- Task 5I: $P = \begin{bmatrix}0.6 & 0.3 & 0.1 \\ 0.2 & 0.5 & 0.3 \\ 0.1 & 0.5 & 0.4\end{bmatrix}$
- Task 5II: Probability Medium to Low in 2 months = 0.29
- Task 6a: $A = \begin{bmatrix}0.3226 & 0.4 \\ 0.4516 & 0.5\end{bmatrix}$
- Task 6b: $L = \begin{bmatrix}3.16 & 2.53 \\ 2.86 & 4.29\end{bmatrix}$
- Task 6c: Gross output $\approx \begin{bmatrix}2503.2 \\ 2745.6\end{bmatrix}$