Markov chain: n steps and the steady state — a TI-89 Titanium program
MARKOV89 is a TI-89 BASIC program for the TI-89 Titanium. Type a transition matrix (rows sum to 1 — type fractions like 1/3 to stay exact), a starting row vector and a number of steps: the probability of each state after n steps (S1, S2, …) and the steady state (SS1, SS2, …).
What it asks for and what it shows
It asks for 3 values at its prompts. In the example below it shows S1, S2, SS1, SS2, AFTER 3 STEPS:, STEADY STATE:.
Example run
One of its oracle test cases: “2 states, 3 steps”. The inputs are typed in order, and the results are the values the case expects on the screen.
| Step | Value |
|---|---|
| You enter | |
| Input 1 | [[9/10,1/10][1/2,1/2]] |
| Input 2 | [[1,0]] |
| Input 3 | 3 |
| The screen shows | |
S1= | 211/250 |
S2= | 39/250 |
SS1= | 5/6 |
SS2= | 1/6 |
| Text | AFTER 3 STEPS: |
| Text | STEADY STATE: |
How it's checked
7 test cases, each checked against an independent method. Replayed key by key on a virtual TI-89 Titanium, they make 66 checks.
How E-Code checks every program
Run it or put it on your calculator
- Open the library in the TI-89 Titanium calculator and pick “Markov chain: n steps and the steady state” (MARKOV89).
- Put it on your own calculator with a computer and a USB cable, or type it in by hand.
Related programs
- Least-squares polynomial fit (exact)
- Least squares with matrices (Vandermonde)
- One-variable statistics of a list
- Linear regression with exact slope
- One-sample z test and interval (dialog)
All TI-89 Titanium statistics programs · All TI-89 Titanium programs