Tutorials › Competing Risks and Multi-State Models › Drawing and Reading State-Transition Diagrams

States, Transitions and the Markov Assumption · Tutorial 243 of 699

Drawing and Reading State-Transition Diagrams

You will learn to translate allowed transitions into a directed state diagram and use its nodes and arrows to check paths, entry points, and endpoints.

Intermediate 9 min read

What You'll Learn

  • Represent states as nodes and allowed transitions as directed arrows.
  • Read a proposed sequence of states as a path and check each step against the arrows.
  • Distinguish a path’s entry point from a node that merely has no incoming arrows.
  • Identify endpoints from the question’s specified target set.
  • Use a Boolean adjacency matrix to verify reachability without confusing it with transition probabilities.
  • Diagnose missing, reversed, or unsupported arrows in a state diagram.

Why Draw a State-Transition Diagram?

A state space lists the conditions an individual may occupy, and a set of allowed transitions specifies which changes between those conditions are possible. A state-transition diagram puts this information into a picture: nodes represent states, and directed arrows represent permitted one-step changes. The diagram is useful only if it faithfully represents the allowed transitions. In particular, an arrow’s direction matters, and a route through the diagram is permitted only when every consecutive pair of states is connected by an arrow in that direction.

A diagram describes the structure of a model. By itself, it does not give transition rates, probabilities, or the time an individual spends in a state. Nor does it establish which states a study population can start in or which outcomes an analysis treats as endpoints. Those choices must be stated and then marked or interpreted consistently.

Definition: A state-transition diagram is a directed graph whose nodes are the states in a specified state space \(\mathcal{S}\), and whose arrows represent the allowed one-step transitions. Write \(i\to j\) when a transition from state \(i\) to state \(j\) is allowed. A path of length \(m\) is a sequence \(i_0,i_1,\ldots,i_m\) for which every consecutive transition \(i_{r-1}\to i_r\), for \(r=1,\ldots,m\), is allowed.

The earlier material on allowed transitions and structural zeros supplies the underlying transition rules: an absent transition is not merely unobserved in a sample; it is excluded by the specified structure. Drawing the diagram is a way to make those rules visible and to check their consequences. It does not replace the rules.

From a State Space to Nodes and Arrows

Begin by writing the state space and the allowed transitions separately. Then draw one node for each state and one directed arrow for each allowed transition. A state should not be omitted just because it has no arrows in or out under the particular transition rules. Conversely, an arrow should not be added simply because a transition seems plausible: it must belong to the stated model.

For example, let the states be \(A,B,C,D\), with allowed transitions \(A\to B\), \(A\to C\), \(B\to C\), \(C\to B\), and \(C\to D\). The diagram has four nodes and five arrows. It has no arrow \(B\to A\), so the reverse move is not allowed under these rules. It also has no arrow from \(D\) to any other state.

The physical placement of nodes on a page is for readability; it does not encode an ordering, distance, duration, or probability. An arrow from left to right is not inherently more likely than an arrow from right to left. If an arrow is labeled with a transition name, the label can clarify the event represented, but it does not change the direction or create an additional transition unless the model specifies one.

Worked Example: Checking a Proposed Path

Consider the hypothetical state space \(\{A,B,C,D\}\) and the allowed transitions \(A\to B\), \(A\to C\), \(B\to C\), \(C\to B\), and \(C\to D\). Decide whether each proposed sequence is a permitted path: (a) \(A,B,C,D\); (b) \(A,C,B,C,D\); and (c) \(A,B,A,C\).

(a) \(A,B,C,D\). Check each consecutive pair. The diagram contains \(A\to B\), \(B\to C\), and \(C\to D\). All three steps are allowed, so this is a permitted path of length 3.

(b) \(A,C,B,C,D\). The four steps are \(A\to C\), \(C\to B\), \(B\to C\), and \(C\to D\). Each is among the allowed transitions, so this is a permitted path of length 4. The route revisits \(C\); revisiting a state does not, by itself, make a path invalid.

(c) \(A,B,A,C\). The proposed steps are \(A\to B\), \(B\to A\), and \(A\to C\). The first and third are allowed, but \(B\to A\) is not. Therefore the complete sequence is not a permitted path. A valid first step and final step cannot compensate for an invalid step in the middle.

Entry Points and Endpoints Need Context

An entry point is a state in which an individual may begin the modeled observation or process. It is specified by the study design or the question being represented. A diagram may mark one entry point, or it may allow a set of entry states. Having no incoming arrows is not the definition of an entry point: a study can begin observation after an individual has already reached a state that is also reachable from another state.

An endpoint is a state designated as a target or final state for a particular question. For instance, a question might ask which routes can reach state \(D\); then \(D\) is the target endpoint for that question. A path’s endpoint is simply its final state. These meanings should not be confused: a state can be the endpoint of one observed path and still have outgoing arrows in the full diagram. The target status comes from the question, not from the number of arrows drawn.

Entry and endpoint designations can therefore change while the state space and transition arrows stay the same. If a protocol defines two possible starting states, both should be identified even if one has incoming arrows. If an analysis targets a particular event state, state that target explicitly rather than inferring it from the layout of the diagram.

Worked Example: Marking Entry States and a Target

A hypothetical monitoring process has states \(A,B,C,D\) and allowed transitions \(A\to B\), \(A\to C\), \(B\to C\), \(C\to B\), and \(C\to D\). Suppose the protocol begins observation in either \(A\) or \(B\), and the question concerns routes that reach \(D\). Identify the entry set and check whether each of the following routes can reach the target: from \(A\), \(A,C,D\); from \(B\), \(B,C,D\); and from \(B\), \(B,A,C,D\).

The entry set is \(\{A,B\}\), because the protocol specifies those as the possible states at the start of observation. The fact that \(B\) has an incoming arrow \(A\to B\) does not remove it from the entry set. The target for this question is \(D\).

From \(A\), the route \(A,C,D\) is permitted because both \(A\to C\) and \(C\to D\) are allowed. It reaches the target. From \(B\), \(B,C,D\) is also permitted, using \(B\to C\) and \(C\to D\). In contrast, \(B,A,C,D\) is not permitted: there is no arrow \(B\to A\). Thus, the diagram supports routes from both entry states to \(D\), but not every imaginable sequence from those states.

This conclusion concerns permitted routes only. The diagram does not tell us how often either route occurs, how long either takes, or how likely a route to \(D\) is.

A Matrix Check for Paths

For a finite state space, an adjacency matrix provides a compact way to record the same arrow information. Fix an ordering of the states and define \(a_{ij}=1\) if \(i\to j\) is allowed and \(a_{ij}=0\) otherwise. The entries are structural indicators, not transition probabilities. In particular, a row need not sum to 1.

$$ A=(a_{ij}), \qquad a_{ij}= \begin{cases} 1, & \text{if } i\to j \text{ is allowed},\\ 0, & \text{otherwise}. \end{cases} $$

Ordinary matrix powers count walks when \(A\) is a zero-one adjacency matrix: the \((i,j)\) entry of \(A^m\) is positive exactly when at least one length-\(m\) path goes from \(i\) to \(j\). This gives a systematic reachability check, particularly when a diagram has many nodes. It is not a probability calculation.

The claim follows by induction. For \(m=1\), \(A_{ij}=1\) exactly when the one-step path \(i\to j\) is allowed. Suppose the claim holds for \(m\). The matrix product gives \((A^{m+1})_{ij}=\sum_k (A^m)_{ik}a_{kj}\). Every summand is nonnegative, and a positive summand exists exactly when some state \(k\) can be reached from \(i\) in \(m\) steps and has an allowed arrow to \(j\). Joining those steps gives a path of length \(m+1\). Conversely, any path of length \(m+1\) has such a penultimate state \(k\), so its corresponding summand is positive. This proves the claim for \(m+1\).

Worked Example: Finding Paths With an Adjacency Matrix

Use the state order \(A,B,C,D\) and the five transitions from the earlier example. Write the adjacency matrix and check whether a two-step path from \(A\) to \(D\) exists.

The row for \(A\) has arrows to \(B\) and \(C\); the row for \(B\) has an arrow to \(C\); the row for \(C\) has arrows to \(B\) and \(D\); and the row for \(D\) has no outgoing arrows. Thus,

$$ A= \begin{pmatrix} 0&1&1&0\\ 0&0&1&0\\ 0&1&0&1\\ 0&0&0&0 \end{pmatrix}. $$

The \((A,D)\) entry of \(A^2\) is the sum over possible intermediate states. The only state with an arrow into \(D\) is \(C\), and \(A\to C\) is allowed, so

$$ (A^2)_{AD} =\sum_{k\in\{A,B,C,D\}}a_{Ak}a_{kD} =a_{AA}a_{AD}+a_{AB}a_{BD}+a_{AC}a_{CD}+a_{AD}a_{DD} =0+0+1+0=1. $$

The value 1 confirms one two-step route, \(A\to C\to D\). It does not mean that the route has probability 1. For example, a two-step route from \(A\) to \(B\) exists as well: \(A\to C\to B\), consistent with \((A^2)_{AB}=1\). The matrix records which routes exist, not their relative frequency.

Reading and Auditing a Diagram

A reliable reading procedure is to identify the requested start state, follow arrows only in their indicated directions, and check each proposed transition in order. If the task asks whether a target is reachable, the question is whether at least one finite permitted path connects the specified start and target. If it asks for all paths, a distinction matters: where cycles are permitted, there can be paths of arbitrarily many steps, so the request may need a length limit or another restriction.

A diagram can also be audited against a written transition list. Check that each allowed transition has exactly the intended arrow, and that each absent transition has no arrow. Pay special attention to reversed arrows, overlooked states, and unlabeled visual crossings. Two lines that cross do not indicate a transition unless they meet at a node. If two different event types connect the same pair of states, labels or other explicit distinctions may be needed so that the diagram represents the specified transitions unambiguously.

A self-arrow \(i\to i\) should appear only if the model explicitly treats remaining in state \(i\) as a transition. In many event-history diagrams, time spent in a state is not drawn as a succession of self-transitions; the arrows instead mark changes of state. Follow the model’s convention rather than adding self-arrows automatically.

QuestionWhat the diagram can establishWhat it cannot establish alone
Is \(i\to j\) allowed?Whether the directed arrow is includedHow frequently or quickly it occurs
Is a sequence permitted?Whether every consecutive arrow in the sequence existsWhether any individual actually follows it
Can a target be reached?Whether at least one directed path connects start to targetThe probability or rate of reaching that target
Where does observation begin?Nothing unless entry states are marked or specifiedEntry states inferred solely from node placement or incoming arrows

Common Mistakes and Limitations

  • Reversing an arrow. Seeing \(A\to B\) does not imply \(B\to A\). Check the direction of every step in a proposed route.
  • Treating a missing arrow as evidence of rarity. In a structural diagram, a missing arrow means the transition is not allowed by the specified model; it does not mean that an allowed transition is merely uncommon.
  • Inferring entry from having no incoming arrows. Entry is specified by the study or question. A state with incoming arrows can still be a starting state for people whose observation begins there.
  • Calling every path’s final node an endpoint of the study. A path ends at its last state, but a study endpoint is designated by the question. The two ideas are related but not interchangeable.
  • Reading probabilities from the picture. Arrow presence is structural information. Without additional model quantities, the diagram gives no numerical chance, rate, or duration.

The comparison with an adjacency matrix is useful when a route is hard to trace visually, but the matrix can be less intuitive about which transitions connect particular states. The diagram is often clearer for communicating the structure; the matrix is convenient for systematic reachability checks. Both representations encode the same allowed-transition information when they are constructed consistently.

Key takeaway: Nodes name states; directed arrows encode allowed one-step transitions; paths are sequences that follow those arrows; entry states and target endpoints must be specified in context. The diagram represents possible structure, not transition probabilities or observed histories.

Check Your Understanding

For each question, use the stated arrows exactly. Full solutions follow the questions.

  1. A diagram has states \(P,Q,R\) and arrows \(P\to Q\), \(Q\to R\), and \(R\to Q\). Is \(P,Q,R,Q\) a permitted path? Is \(P,R\) a permitted path?
  2. In the same diagram, a protocol says observation may begin in \(Q\) or \(P\). Does the arrow \(P\to Q\) prevent \(Q\) from being an entry state? Explain.
  3. Suppose \(U\to V\), \(V\to W\), and \(W\to Z\) are allowed. If \(Z\) is the target, is the sequence \(U,V,W,Z\) a permitted route to it? What additional information would be needed to calculate the probability of taking this route?
  4. Why is it incorrect to interpret a row of an adjacency matrix as transition probabilities when its entries are zeroes and ones indicating allowed arrows?

Solutions. (1) \(P,Q,R,Q\) is permitted: its steps are \(P\to Q\), \(Q\to R\), and \(R\to Q\). \(P,R\) is not permitted because there is no arrow \(P\to R\). (2) No. Entry states are specified by the protocol, so \(Q\) can be an entry state even though it also has an incoming arrow from \(P\). (3) Yes. Each of \(U\to V\), \(V\to W\), and \(W\to Z\) is allowed, so the sequence is a permitted path ending at the target. The arrows alone do not provide its probability; additional probability or rate information and the relevant model assumptions would be required. (4) The entries indicate whether transitions are allowed, not their probabilities. A row need not sum to 1, so it is not a probability distribution over next states.

Clinical Biostats