Tutorials › Stochastic Processes › Expected Rewards Accumulated Before Absorption

Absorption, Hitting Times and First-Step Analysis · Tutorial 252 of 994

Expected Rewards Accumulated Before Absorption

Learn how expected rewards before absorption follow from expected transient-state visits, and how to account for rewards earned on transitions.

Intermediate 11 min read

What You'll Learn

  • Define cumulative state rewards up to, but not including, absorption.
  • Use the fundamental matrix to compute expected rewards from each transient state.
  • Incorporate an initial distribution over transient states.
  • Count visits to a selected transient state using an indicator reward.
  • Compute transition rewards by first averaging over the next-step transition probabilities.
  • Check reward calculations using first-step equations.

From Visits to Rewards

In an absorbing Markov chain, the fundamental matrix records how often each transient state is visited before absorption. That information answers more than questions about time spent in the chain: if different states carry different costs, gains, or risks, the expected total is obtained by weighting each expected visit by the reward earned there. A similar calculation handles rewards attached to transitions, including a reward earned on the step that enters an absorbing state.

Let \((X_n)_{n\ge0}\) be a discrete-time Markov chain on a finite state space \(S\), on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Suppose \(S=T\cup A\), where \(T\) is the set of transient states and \(A\) is a nonempty set of absorbing states. For each \(a\in A\), assume \(p_{aa}=1\). Write \(Q=(p_{ij})_{i,j\in T}\) for the transient-to-transient block of the transition matrix \(P\). Assume absorption has finite expected time from every state in \(T\). Equivalently, the series \(\sum_{n\ge0}Q^n\) converges entry by entry. The fundamental matrix is \(N=(I-Q)^{-1}=\sum_{n\ge0}Q^n\); its entry \(N_{ij}\) is the expected number of visits to \(j\) before absorption, starting from \(i\), counting time \(0\).

Definition: Let \(r_i\) be the reward earned at time \(n\) when the chain is in transient state \(i\). Define \(T_A=\inf\{n\ge0:X_n\in A\}\). The cumulative state reward before absorption is \(Y=\sum_{n=0}^{T_A-1}r_{X_n}\). Thus, a reward is earned at each transient time, including time \(0\) if the chain starts in \(T\), but not after absorption.

Because \(T\) is finite, any real-valued state reward vector \(r=(r_i)_{i\in T}\) is bounded. Finite expected absorption time therefore ensures that the expected absolute cumulative reward is finite. The reward may be positive, zero, or negative; the formula does not require every reward to be nonnegative.

Theorem (Expected state rewards): Under the assumptions above, let \(r\) be a column vector of state rewards on \(T\). For each \(i\in T\), the expected cumulative reward starting from \(i\) is \(v_i=(Nr)_i\). Equivalently, \(v=r+Qv\), and this equation has exactly one solution. If the initial distribution on transient states is the row vector \(\alpha\), the expected cumulative reward is \(\alpha Nr\).

Proof. Let \(\mathcal{F}_n=\sigma(X_0,\ldots,X_n)\). Starting from \(i\in T\), the probability of being in transient state \(j\) at time \(n\) is \((Q^n)_{ij}\): the chain must make \(n\) transitions that all remain in \(T\). In particular, \(T_A>n\) precisely when the chain is still transient at time \(n\). The reward can be written as a sum over all times, with terms after absorption excluded: \[ Y=\sum_{n\ge0}\mathbf{1}_{\{T_A>n\}}r_{X_n}. \] If \(C=\max_{j\in T}|r_j|\), then \(\mathbb{E}_i[|Y|]\le C\mathbb{E}_i[T_A]<\infty\), so expectations and the sum can be interchanged. Grouping terms by state gives \[ \mathbb{E}_i[Y] =\sum_{n\ge0}\sum_{j\in T}(Q^n)_{ij}r_j =\sum_{j\in T}N_{ij}r_j =(Nr)_i. \] The fundamental matrix satisfies \((I-Q)N=I\), so \(v=Nr\) satisfies \((I-Q)v=r\), or \(v=r+Qv\). If \(w\) is any other solution, then \((I-Q)(w-v)=0\). Since \(I-Q\) is invertible, \(w-v=0\), proving uniqueness. For initial distribution \(\alpha\), averaging the state-specific expectations gives \(\sum_i\alpha_i v_i=\alpha Nr\). \(\square\)

The equation \(v=r+Qv\) is also a first-step check: earn the reward in the current transient state, then add the expected reward from the next state if that state is still transient. The matrix formula packages all the repeated visits into \(N\).

Worked Example: Different Rewards in Two Transient States

Consider \(S=\{1,2,a\}\), with transient states \(1,2\) and absorbing state \(a\). Let \[ P=\begin{bmatrix} \tfrac12&\tfrac13&\tfrac16\\ \tfrac14&\tfrac12&\tfrac14\\ 0&0&1 \end{bmatrix}. \] The row sums are \(\tfrac12+\tfrac13+\tfrac16=1\), \(\tfrac14+\tfrac12+\tfrac14=1\), and \(0+0+1=1\), as required. Suppose the state rewards are \(r_1=2\) and \(r_2=5\). Find the expected cumulative reward starting from each transient state.

The transient block and its complement are \[ Q=\begin{bmatrix}\tfrac12&\tfrac13\\\tfrac14&\tfrac12\end{bmatrix}, \qquad I-Q=\begin{bmatrix}\tfrac12&-\tfrac13\\-\tfrac14&\tfrac12\end{bmatrix}. \] The determinant of \(I-Q\) is \(\tfrac14-\tfrac1{12}=\tfrac16\), so \[ N=(I-Q)^{-1} =6\begin{bmatrix}\tfrac12&\tfrac13\\\tfrac14&\tfrac12\end{bmatrix} =\begin{bmatrix}3&2\\\tfrac32&3\end{bmatrix}. \] Therefore \[ v=Nr =\begin{bmatrix}3&2\\\tfrac32&3\end{bmatrix} \begin{bmatrix}2\\5\end{bmatrix} =\begin{bmatrix}6+10\\3+15\end{bmatrix} =\begin{bmatrix}16\\18\end{bmatrix}. \] Starting from state \(1\), the expected total is \(16\); starting from state \(2\), it is \(18\).

Check by first-step equations. The equations are \(v_1=2+\tfrac12v_1+\tfrac13v_2\) and \(v_2=5+\tfrac14v_1+\tfrac12v_2\). Substitution gives \(2+\tfrac12(16)+\tfrac13(18)=2+8+6=16\), and \(5+\tfrac14(16)+\tfrac12(18)=5+4+9=18\). Both values satisfy their equations.

Indicator Rewards and Initial Distributions

A useful special case assigns reward \(1\) to one transient state and \(0\) to every other transient state. The cumulative reward then counts visits to that state before absorption. This also clarifies the convention about time \(0\): if the chain starts in the rewarded state, that initial visit is counted. More generally, if \(\alpha\) is a row distribution over transient states, then \(\alpha N\) gives the expected visit counts by destination state, and \(\alpha Nr\) weights those counts by the state rewards.

Worked Example: Expected Visits to a Selected State

Use \(S=\{u,v,a\}\), where \(a\) is absorbing, with \[ P=\begin{bmatrix} \tfrac14&\tfrac12&\tfrac14\\ \tfrac12&0&\tfrac12\\ 0&0&1 \end{bmatrix}. \] The row sums are \(\tfrac14+\tfrac12+\tfrac14=1\), \(\tfrac12+0+\tfrac12=1\), and \(0+0+1=1\). Suppose the initial distribution assigns probability \(\tfrac12\) to \(u\) and \(\tfrac12\) to \(v\). Find the expected number of visits to \(v\) before absorption.

Set the reward vector to \(r=(0,1)^{\mathsf T}\), in the order \(u,v\). The transient block is \[ Q=\begin{bmatrix}\tfrac14&\tfrac12\\\tfrac12&0\end{bmatrix}, \qquad I-Q=\begin{bmatrix}\tfrac34&-\tfrac12\\-\tfrac12&1\end{bmatrix}. \] Its determinant is \(\tfrac34-\tfrac14=\tfrac12\), so \[ N=2\begin{bmatrix}1&\tfrac12\\\tfrac12&\tfrac34\end{bmatrix} =\begin{bmatrix}2&1\\1&\tfrac32\end{bmatrix}. \] Thus \(Nr=(1,\tfrac32)^{\mathsf T}\). From \(u\), the expected number of visits to \(v\) is \(1\); from \(v\), counting the initial visit, it is \(\tfrac32\). Averaging over the initial distribution gives \[ \alpha Nr =\begin{bmatrix}\tfrac12&\tfrac12\end{bmatrix} \begin{bmatrix}1\\\tfrac32\end{bmatrix} =\tfrac12+\tfrac34=\tfrac54. \]

Check by first-step equations. Let \(h_u,h_v\) be the expected visit counts to \(v\). The reward equations are \(h_u=\tfrac14h_u+\tfrac12h_v\) and \(h_v=1+\tfrac12h_u\). The proposed values \(h_u=1\) and \(h_v=\tfrac32\) give \(\tfrac14+\tfrac34=1\) in the first equation and \(1+\tfrac12=\tfrac32\) in the second. Their initial-distribution average is \(\tfrac12(1)+\tfrac12(\tfrac32)=\tfrac54\), as above.

Rewards Earned on Transitions

Sometimes the reward depends not just on the current state, but on the move made. For example, a transition may represent a treatment, a production step, or entry into a costly absorbing condition. Let \(g(i,j)\) be the reward on a transition from \(i\) to \(j\). Only rewards on transitions taken before or at absorption are included: the transition from a transient state into \(A\) is included, but no transitions after arrival in \(A\) are counted.

Theorem (Expected transition rewards): Under the same finite-state and finite-expected-absorption assumptions, assign a finite reward \(g(i,j)\) to each transition from a transient state \(i\) with \(p_{ij}>0\), including transitions into absorbing states. Define \(c_i=\sum_{j\in S}p_{ij}g(i,j)\) for \(i\in T\). Then the expected total transition reward from transient state \(i\) is \((Nc)_i\), and from initial transient distribution \(\alpha\) it is \(\alpha Nc\).

Proof. Define the natural filtration \(\mathcal{F}_n=\sigma(X_0,\ldots,X_n)\), and let \(Z=\sum_{n=0}^{T_A-1}g(X_n,X_{n+1})\). Since \(S\) is finite, the transition rewards on possible transitions have a finite maximum absolute value, say \(C\); therefore \(\mathbb{E}_i[|Z|]\le C\mathbb{E}_i[T_A]<\infty\). Given \(\mathcal{F}_n\) and \(X_n=k\in T\), the Markov property gives \(\mathbb{E}[g(X_n,X_{n+1})\mid\mathcal{F}_n]=\sum_{j\in S}p_{kj}g(k,j)=c_k\). Consequently, the expected reward at time \(n\), counted only if \(n<T_A\), is \(\sum_{k\in T}(Q^n)_{ik}c_k\). Summing over \(n\ge0\), justified by the absolute-integrability bound, gives \(\mathbb{E}_i[Z]=\sum_{n\ge0}(Q^nc)_i=(Nc)_i\). Averaging over \(\alpha\) gives \(\alpha Nc\). \(\square\)

The transition-reward calculation has two stages: first average the reward on the next transition to obtain \(c\), then use \(N\) to account for all visits to each transient state. The transition reward on the final step into absorption is already included in \(c\), because its sum ranges over all destination states in \(S\).

Worked Example: A Reward for Each Move, Including Absorption

Use the chain in the first example: \[ P=\begin{bmatrix} \tfrac12&\tfrac13&\tfrac16\\ \tfrac14&\tfrac12&\tfrac14\\ 0&0&1 \end{bmatrix}. \] Its row sums are \(\tfrac12+\tfrac13+\tfrac16=1\), \(\tfrac14+\tfrac12+\tfrac14=1\), and \(0+0+1=1\). Assign transition rewards as follows: from \(1\), the rewards for moves to \(1,2,a\) are \(2,0,7\); from \(2\), the rewards for moves to \(1,2,a\) are \(1,3,4\). Find the expected total transition reward from each transient state.

First compute the mean reward on a single step out of each transient state: \[ c_1=\tfrac12(2)+\tfrac13(0)+\tfrac16(7)=1+\tfrac76=\tfrac{13}{6}, \qquad c_2=\tfrac14(1)+\tfrac12(3)+\tfrac14(4)=\tfrac14+\tfrac32+1=\tfrac{11}{4}. \] The transient block is \(Q=\begin{bmatrix}\tfrac12&\tfrac13\\\tfrac14&\tfrac12\end{bmatrix}\), so, as calculated directly from \(I-Q\), \[ N=\begin{bmatrix}3&2\\\tfrac32&3\end{bmatrix}. \] It follows that \[ Nc= \begin{bmatrix}3&2\\\tfrac32&3\end{bmatrix} \begin{bmatrix}\tfrac{13}{6}\\\tfrac{11}{4}\end{bmatrix} = \begin{bmatrix}\tfrac{13}{2}+\tfrac{11}{2}\\[2pt]\tfrac{13}{4}+\tfrac{33}{4}\end{bmatrix} = \begin{bmatrix}12\\\tfrac{23}{2}\end{bmatrix}. \] The expected total transition rewards are \(12\) from state \(1\) and \(\tfrac{23}{2}\) from state \(2\).

Check by first-step equations. The equations are \(w_1=\tfrac{13}{6}+\tfrac12w_1+\tfrac13w_2\) and \(w_2=\tfrac{11}{4}+\tfrac14w_1+\tfrac12w_2\). Substituting \(w_1=12\) and \(w_2=\tfrac{23}{2}\) into the first right-hand side gives \(\tfrac{13}{6}+6+\tfrac{23}{6}=\tfrac{72}{6}=12\). The second gives \(\tfrac{11}{4}+3+\tfrac{23}{4}=\tfrac{46}{4}=\tfrac{23}{2}\). In particular, the rewards \(7\) and \(4\) on the transitions into \(a\) were included in \(c_1\) and \(c_2\).

Checks and a Common Mistake

A reliable calculation keeps the reward convention explicit. State rewards are earned at transient times \(0,\ldots,T_A-1\); transition rewards are earned on the \(T_A\) moves up to and including the move into an absorbing state. In both cases, absorption ends accumulation. The fundamental matrix does not itself represent a reward: it supplies expected visit counts, which must be weighted by the appropriate state reward vector or expected one-step transition reward vector.

Common mistake: counting only the reward at the initial state. In the first example, starting from state \(1\) gives immediate state reward \(r_1=2\). Reporting \(2\) as the expected total ignores all later visits before absorption. The correction is to use all expected visits: \((Nr)_1=3(2)+2(5)=6+10=16\). The value also checks in the first-step equation \(2+\tfrac12(16)+\tfrac13(18)=16\). A related error is to include a reward for every time spent in an absorbing state; that would count rewards after the specified stopping point and is not a reward accumulated before absorption.

These formulas require finite expected absorption time. If a chain can remain transient forever with positive probability, the fundamental matrix may not be finite and the expected cumulative reward need not be finite. Even when absorption occurs almost surely, an infinite expected absorption time can prevent a finite expected total for a positive reward earned at every transient step. The assumptions are therefore part of the method, not merely technical notation.

Check Your Understanding

For each question, state whether the quantity is a state reward or a transition reward, and check any proposed value in the relevant equations.

  1. For the first example, replace the reward vector by \(r=(1,0)^{\mathsf T}\). How many visits to state \(1\) are expected before absorption when the chain starts from state \(2\)?
  2. In the visits-to-\(v\) example, what changes in the expected count if the initial distribution places probability \(1\) on the absorbing state \(a\)?
  3. For the transition-reward example, compute the expected one-step transition reward from state \(1\) if the reward on the transition \(1\to a\) is changed from \(7\) to \(1\), with other rewards unchanged.
  4. Explain why a transition reward on the final move into an absorbing state is included, while rewards on later moves are not.
  5. Write the first-step equations for expected cumulative state rewards and identify the matrix equation they imply.