# Math Help - Markov Chain Transition Probabilities Help.

1. ## Markov Chain Transition Probabilities Help.

Hi. For a project I am using a Markov Chain model with 17 states. I have used data to estimate transition probabilities. From these transition probabilities I can get n-step transition probabilities, i.e. the probability of going from state i to state j in exactly n steps. I would like to calculate the probability of going from state i to state j within n steps. I have searched through my literature but can't find a way to do this. Can anybody offer any help?

Chloe.

2. ## Re: Markov Chain Transition Probabilities Help.

Hi

First you form a matrix P (dimensions k x k where k is the number of possible states) with entries $p_{i,j}=$ the probability of going from state i to state j in one step. Then if you raise the matrix to the power of n, the entry of the final matrix in the ith row and jth column will be the probability of going from state i to state j in exactly n steps. If you want to get the probability of going from state i to step j in at most n steps, then you need to get the entry from the ith row and the jth column of the matrix:

$S=P+P^2+\cdots+P^n=\left ( P^{n+1}-P \right )\cdot\left ( P-I \right )^{-1}$

3. ## Re: Markov Chain Transition Probabilities Help.

That is exactly what I was looking for! Thanks so much.

4. ## Re: Markov Chain Transition Probabilities Help.

You are welcome.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 2, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9914895296096802, "perplexity": 152.13734882297294}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-10/segments/1393999652862/warc/CC-MAIN-20140305060732-00046-ip-10-183-142-35.ec2.internal.warc.gz"}