Discord

INAIO Guide Stage 1 11Matrices and Linear Transformations

11.5 Transition matrices

Put step-by-step movement between states into one matrix, then update counts or probabilities without mixing old and new values.

In Module 4.5, we tracked what stayed in each group and what moved to another group. In Module 11.3, a matrix combined several old inputs into new outputs. A transition matrix puts these ideas together: one row records all the destinations possible from one current state. Multiplication then applies the same movement rule to an entire population or probability distribution at once.

This is intermediate matrix and probability work. Review the two-state model in Module 4.5 and the matrix product first. MIT's Markov-chain notes go much further; the finite two-state calculations here are enough to begin.

A basic idea: stays plus arrivals in one calculation

Suppose each period, fraction pp of group AA moves to BB, and fraction qq of BB moves to AA. The rest stay. Put the old counts into a row st=(At,Bt)s_t=(A_t,B_t) and the movement fractions into

P=[1−ppq1−q].P=\begin{bmatrix}1-p&p\\q&1-q\end{bmatrix}.

The first row lists where someone in AA goes; the second lists where someone in BB goes. Now st+1=stPs_{t+1}=s_tP says

At+1=(1−p)At+qBt,Bt+1=pAt+(1−q)Bt.A_{t+1}=(1-p)A_t+qB_t,\qquad B_{t+1}=pA_t+(1-q)B_t.

These are exactly the stays plus arrivals equations from Module 4.5, now packaged in one matrix product. Both new entries are computed from the same old row.

Two groups A and B each have a staying loop and a cross-group arrow. The arrows label fractions p from A to B and q from B to A; a row-vector times a two-by-two matrix produces the next counts.Two groups A and B each have a staying loop and a cross-group arrow. The arrows label fractions p from A to B and q from B to A; a row-vector times a two-by-two matrix produces the next counts.
Rows describe where a state sends its mass; columns collect arrivals at each destination.

A quick tour of transition rules

For states 1,…,n1,\ldots,n, PijP_{ij} is the fraction or probability of moving from state ii to state jj in one step. Every entry is nonnegative, and each row sums to 11 when everyone has one destination among the listed states. With a row-vector state, st+1=stPs_{t+1}=s_tP and st+k=stPks_{t+k}=s_tP^k. Entry (P2)ij(P^2)_{ij} adds the probabilities of all two-step routes from ii to jj through an intermediate state.

If sts_t lists probabilities, its entries sum to 11 and stPs_tP is the next distribution. If it lists counts, the same formula gives expected counts when transitions are random, or exact counts when the stated fractions move exactly as described. A fixed transition rule says the next move depends on the current state; when this is used as a probabilistic model, it is a simple Markov chain.

The earlier matrix–vector lesson used column vectors AxAx. If you prefer that convention, let xt=stTx_t=s_t^{\mathsf T} and write xt+1=PTxtx_{t+1}=P^{\mathsf T}x_t. Transpose the matrix as well as the vector; otherwise the directions of movement change. Module 11.6 explains the corresponding row and column sums. Later, random walks on graphs use the same row-vector update to track a walker's location probabilities.

Application 1: two groups of people

Initially 8080 people are in AA and 2020 in BB. Each period, 25%25\% of AA moves to BB and 10%10\% of BB moves to AA. Find the next counts.

  1. The row transition matrix is P=[0.750.250.100.90]P=\begin{bmatrix}0.75&0.25\\0.10&0.90\end{bmatrix}.
  2. (80,20)P=(80(0.75)+20(0.10),  80(0.25)+20(0.90))=(62,38)(80,20)P=(80(0.75)+20(0.10),\;80(0.25)+20(0.90))=(62,38).
  3. The total is still 100100: everyone either stayed or moved between the two listed groups.

Application 2: changing weather

Suppose a sunny day is followed by sun with probability 0.80.8 and rain with 0.20.2; after rain, the next day is sunny with 0.40.4 and rainy with 0.60.6. Starting with a certainly sunny day, what is the weather distribution after two updates?

  1. In the order (sun, rain), P=[0.80.20.40.6]P=\begin{bmatrix}0.8&0.2\\0.4&0.6\end{bmatrix} and s0=(1,0)s_0=(1,0).
  2. After one update, s1=s0P=(0.8,0.2)s_1=s_0P=(0.8,0.2).
  3. Use the new distribution for the second update: s2=s1P=(0.82+0.2(0.4),  0.8(0.2)+0.2(0.6))=(0.72,0.28)s_2=s_1P=(0.8^2+0.2(0.4),\;0.8(0.2)+0.2(0.6))=(0.72,0.28).

Resources

SourceTitleWhy read it
MIT OpenCourseWareFinite-State Markov ChainsStudy transition probabilities and repeated matrix updates after the two-state examples.
OpenStaxMatrices and matrix operationsReview the matrix multiplication used in each update.

Finished this module? Mark it done.

Comments

Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.

Loading comments