transitionmatrix
A transition matrix, in probability theory, is a matrix used to describe the probabilities of transitioning from one state to another in one step of a stochastic process. In a finite state space with n states, the transition matrix P is an n-by-n matrix with entries p_ij = P(X_{t+1} = j | X_t = i). Under the common convention of row-stochastic matrices, each row sums to 1, since from state i the process must move to some state j. Some texts use column-stochastic convention.
Properties: all entries are nonnegative; P^k gives the k-step transition probabilities, with (P^k)_{ij} = P(X_{t+k} = j | X_t
Types and structures: absorbing states correspond to rows with a single 1 and zeros elsewhere. Absorbing Markov
Applications and computation: transition matrices are central to modeling Markov chains, stochastic processes, and algorithms such
Example: a 2x2 matrix P = [[0.7, 0.3], [0.4, 0.6]] describes a process with two states where from