What is a simple way to check if a transition matrix has been constructed correctly?
A simple sanity check is to verify that the sum of the probabilities in each row of the transition matrix equals 1.
Conditions
- The matrix is intended to be a transition matrix for a Markov chain.
Reasoning, step by step
- Take the first row of the matrix and sum its entries.
- Check if the sum equals 1.
- Repeat this process for every row in the matrix.
- If all rows sum to 1, the matrix passes this basic validity check.
Example
For the matrix , the speaker checks and . He states, "And just a quick sanity check to make sure that your transition matrix is correct is to check that the rows sum to one."
Common misconceptions
- Checking that the columns sum to 1 instead of the rows.
- Assuming that if the rows sum to 1, the matrix is definitely correct; it also needs to have non-negative entries.
Watch the explanation
Explore next
Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.