liveBook · Manning

Absorbing state

As explained in Statistics Every Programmer Needs

An absorbing state is a state in a stochastic process that, once entered, cannot be left because its self-transition probability is one.

An absorbing state is a state in a stochastic process that cannot be left: its self-transition probability is 1, and every transition to another state has probability 0. In Markov analysis, absorbing states represent permanent outcomes such as loan charge-offs or customer churn. section 11.1 section 11.4

Use an absorbing-state model to:

  • Represent terminal conditions alongside non-absorbing states in a transition probability matrix. section 11.4
  • Partition the transition matrix into absorbing and non-absorbing submatrices. section 11.4.3
  • Estimate eventual outcomes by computing the fundamental matrix F = (I − B)⁻¹ and multiplying it by A. section 11.4.2

Credit-account outcomes

Harmony Finance models current, charged-off, early-stage delinquency, and late-stage delinquency as mutually exclusive monthly states. Current and charged-off are absorbing: an account remains in either state with probability 1. The resulting calculations estimate that an early-stage account eventually becomes current with about 98.3% probability and charged off with about 1.7%; for a late-stage account, the corresponding probabilities are 85% and 15%. section 11.4 section 11.4.2

>>> P = np.array([
>>>     [1, 0, 0, 0],
>>>     [0, 1, 0, 0],
>>>     [0.80, 0, 0.10, 0.10],
>>>     [0.30, 0.10, 0.30, 0.30]
>>> ])    #1

>>> I = np.array([
>>>     [1, 0],
>>>     [0, 1]
>>> ])     #2

>>> A = np.array([
>>>     [0.80, 0],
>>>     [0.30, 0.10]
>>> ])   #3

>>> B = np.array([
>>>     [0.10, 0.10],
>>>     [0.30, 0.30]
>>> ])     #4

>>> I_minus_B = I – B     #5
>>> F = np.linalg.inv(I_minus_B)     #6

>>> FA = np.dot(F, A)     #7

>>> print('The final matrix FA is:')
>>> print(FA)     #8

The final matrix FA is:
[[0.98333333 0.01666667]
 [0.85       0.15      ]]

NumPy code constructs the transition matrix, extracts I, A, and B, computes F, and produces the final matrix of probabilities from non-absorbing to absorbing states. section 11.4.3

How Statistics Every Programmer Needs covers it

How deep it goes
Derives absorbing-state probabilities through matrix partitioning, a fundamental matrix, and numerical multiplication rather than abstract proof.
Examples
Uses current accounts, charge-offs, early delinquency, and late delinquency as states in a credit-account transition model.
What it assumes
Assumes transition probabilities and the Markov property, while introducing matrix partitioning and fundamental-matrix calculations.
What you can do after
Apply it via NumPy to calculate eventual probabilities of reaching each absorbing state from non-absorbing states.
How it connects
Connects absorbing states to the Markov property, transition probability matrices, equilibrium conditions, and fundamental matrices.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.