4
$\begingroup$

I apologize for my heaviness as I am a Mathematica novice. Is there a kind soul who can tell me how to draw diagrams like those shown on page 158, 160 and 161 of this document.Chaine de Markov

I oversee several plotting examples unsuccessfully.

$\endgroup$
13
$\begingroup$

Here's an answer straight from the documentation for DiscreteMarkovProcess

Graph[DiscreteMarkovProcess[3, {{1/2, 1/2, 0, 0}, {1/2, 1/2, 0, 0}, 
    {1/4, 1/4, 1/4, 1/4}, {0, 0, 0, 1}}]]

Mathematica graphics

which graphs a fourth order Markov chain with the specified transition matrix and initial state 3. The colors occur because some of the states (1 and 2) are transient and some are absorbing (in this case, state 4). You can customize the appearance of the graph by looking at the help file for Graph.

$\endgroup$
1
  • 1
    $\begingroup$ Please note that this solution is available only starting with version 9. (Such a graph can be drawn with earlier versions of Mathematica but it takes a lot of fiddling.) $\endgroup$
    – whuber
    Mar 26 '13 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.