Skip to content

First-step analysis

Condition on the next move to solve hitting probabilities and mean waiting times, with boundary conditions, a four-state example and the cost of a self-loop.

First-step analysis solves a random waiting or hitting problem by conditioning on the next outcome and expressing what remains as the same problem from a new state. It turns “will a risk boundary be reached, and how long will that take?” into equations for probabilities or expected times.
The key is choosing a state that preserves the information needed for the future. For a time-homogeneous Markov chain, knowing the next state lets the calculation restart with the same transition rules. This is recursive conditioning, rather than an assumption that successive states are independent.

One chain, two questions

Consider a fictional risk score taking values 0,1,2,30,1,2,3. From an interior state it moves up or down by one, each with probability 1/21/2. Stop on reaching either boundary. State 00 is the lower boundary; state 33 is the upper target. Start at 11.

There are two distinct questions:

  • What is the probability of reaching 33 before 00?
  • How many steps, on average, pass before reaching either boundary?
This small chain is adapted from Example 3.2 in Richard Weber’s Cambridge notes. The score and probabilities are stipulated: the example explains a calculation, rather than estimating a trading strategy’s ruin risk. A step has no calendar duration unless the model supplies one.
Four-state toy random walk: states 0 and 3 stop the process, while states 1 and 2 move left or right with probability one half. The chance of reaching 3 first is one third from 1 and two thirds from 2. Mean time to either boundary is two steps from both interior states.
Four-state toy random walk: states 0 and 3 stop the process, while states 1 and 2 move left or right with probability one half. The chance of reaching 3 first is one third from 1 and two thirds from 2. Mean time to either boundary is two steps from both interior states.
The same transitions produce two different recursions. Expected time includes the step taken now; success probability does not.

Write uiu_i for the success probability starting at ii. The boundary values are u0=0u_0=0 and u3=1u_3=1. Conditioning on the first move gives

u1=12u0+12u2=12u2,u2=12u1+12u3=12u1+12.u_1=\tfrac12u_0+\tfrac12u_2=\tfrac12u_2, \qquad u_2=\tfrac12u_1+\tfrac12u_3=\tfrac12u_1+\tfrac12.

Substitution yields u1=14u1+14u_1=\tfrac14u_1+\tfrac14, hence u1=1/3u_1=1/3 and u2=2/3u_2=2/3. The one-step chance of moving upward is 1/21/2, but the eventual success probability from 11 is 1/31/3: a first upward move still leaves the possibility of returning and failing.

Now let T=inf⁡{n≥0:Xn∈{0,3}}T=\inf\{n\ge0:X_n\in\{0,3\}\} and ti=E[T∣X0=i]t_i=\mathbb{E}[T\mid X_0=i]. This is a hitting time. Starting on a boundary means T=0T=0. At an interior state, spend one step and then average the remaining wait:
t1=1+12t2,t2=1+12t1.t_1=1+\tfrac12t_2, \qquad t_2=1+\tfrac12t_1.
Thus t1=1+12(1+12t1)t_1=1+\tfrac12(1+\tfrac12t_1), so t1=t2=2t_1=t_2=2 steps. Omitting the 11 would erase elapsed time. Adding it to the probability equations would mix incompatible quantities. The general expected-time recursion and its derivation through conditional expectation are described in Berkeley’s CS70 notes, “Hitting Time”.

The reusable equations—and their limits

For disjoint stopping sets AA (failure) and BB (success), let pijp_{ij} be the transition probability from ii to jj. Outside the stopping sets,

ui=∑jpijuj,ui=0 (i∈A),ui=1 (i∈B).u_i=\sum_j p_{ij}u_j, \qquad u_i=0\ (i\in A),\quad u_i=1\ (i\in B).

For the mean steps to reach A∪BA\cup B,

ti=1+∑jpijtj,ti=0 (i∈A∪B).t_i=1+\sum_j p_{ij}t_j, \qquad t_i=0\ (i\in A\cup B).

Boundary conditions are part of the problem. “Time until success” differs from “time until either outcome”: paths that fail can make the former infinite. In a finite chain where every non-boundary state can reach a stopping boundary, absorption occurs almost surely with finite mean, and these boundary-value systems have unique solutions.

Outside that setting, check finiteness before rearranging expected-time equations as ordinary finite algebra. A positive chance of never hitting the target makes its unconditional mean hitting time infinite; even almost-sure hitting need not imply a finite mean in an infinite state space. The nonnegative solution may require a minimality condition. See Auckland’s STATS 325 notes, §8.12.

Also check that the state is sufficient. A trigger requiring consecutive losses needs the current loss-run length; today’s profit alone may lose that history. If transitions change over time, include time in the state or index the unknowns by time.

For a fuller boundary calculation, Gambler’s Ruin and First Passage Times extends these equations to arbitrary starting fortune and unequal up/down probabilities. Its public preview is available; the full lesson requires membership.

Practice: a step that leaves you where you started

A hypothetical review is pending. At each step it remains pending with probability 0.20.2, clears with probability 0.50.5, or fails with probability 0.30.3, using the same rules after every pending result. Clear and failed are stopping states. Starting pending, find the probability of eventual clearance and the mean steps to either outcome.

Answer. With hh the clearance probability, h=0.5+0.2hh=0.5+0.2h, so h=5/8=0.625h=5/8=0.625. With mm the mean wait, m=1+0.2mm=1+0.2m, so m=5/4=1.25m=5/4=1.25 steps. A pending-to-pending move consumes a step even though the state does not change. The immediate clearance probability 0.50.5 excludes later attempts.

Sources

Last updated
  • probability
  • recursive conditioning
  • markov chains
  • hitting times
  • boundary conditions
← Back to the glossaryBack to top ↑