Results 1 to 5 of 5

Math Help - Generating Markov Chains

  1. #1
    Newbie
    Joined
    Aug 2007
    Posts
    3

    Generating Markov Chains

    I'm looking for a way to get a program to generate a markov chain for me. It's a big task, which is why I need help. So far, I have gotten Mathematica to generate all possible subsets of n for a set of r, and I wanted to rename them and somehow get it to generate the probability of going from, say, a to b, then a to c, then a to d...then a to n in one step, so I could get one row, then do this for each row, then combine them to get a matrix.
    I could do this by hand, sure, but when it gets up to 20x20 and larger I'd rather not be inputting 400 separate numbers...
    I'm not too good in the advanced mathematics department, so I would appreciate it if anybody could be of help.
    Also, I would appreciate it if you think you can be of help if you would IM me at JuliaLeigh10.
    I have Mathematica and R, I just find Mathematica tons easier to use, but I'd be willing to use either of them. I just want to get this done!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by jklm1664 View Post
    I'm looking for a way to get a program to generate a markov chain for me. It's a big task, which is why I need help. So far, I have gotten Mathematica to generate all possible subsets of n for a set of r, and I wanted to rename them and somehow get it to generate the probability of going from, say, a to b, then a to c, then a to d...then a to n in one step, so I could get one row, then do this for each row, then combine them to get a matrix.
    I could do this by hand, sure, but when it gets up to 20x20 and larger I'd rather not be inputting 400 separate numbers...
    I'm not too good in the advanced mathematics department, so I would appreciate it if anybody could be of help.
    Also, I would appreciate it if you think you can be of help if you would IM me at JuliaLeigh10.
    I have Mathematica and R, I just find Mathematica tons easier to use, but I'd be willing to use either of them. I just want to get this done!
    I think we will need more information about the process that is giving rise to the transition matrix etc.

    RonL
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Aug 2007
    Posts
    3
    Well, for all I know, there's a much easier way to do this, but all that I'm actually trying to do is make a transition matrix for any n choose r.
    Thanks
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,966
    Thanks
    1785
    Awards
    1
    Quote Originally Posted by jklm1664 View Post
    Well, for all I know, there's a much easier way to do this, but all that I'm actually trying to do is make a transition matrix for any n choose r.
    Thanks
    We can be sure that you have in your brain a clear understanding of what you are asking. However, I agree with CaptainBlack, your question is meaningless to me and I have taught Markov Chains. Markov Chains are about the probabilities of transitions states. Hence his question to you: describe the process of the transition.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Aug 2007
    Posts
    3
    Sorry, I don't really know how to get myself across.
    I need to generate transition matrices of one step of any set n choose any subset r, say, the matrix for 4 choose 2 would have the states a = (1,2), b=(1,3) c=(1,4), d=(2,3), e=(2,4), f=(3,4) with a 6x6 matrix of (0,.25,.25,.25,.25,0),
    (.25,0,.25,.25,0,.25),
    (.25,.25,0,0,.25,.25),
    (.25,.25,0,0,.25,.25),
    (.25,0,.25,.25,0,.25),
    (0,.25,.25,.25,.25,0)

    (All the same # with 0's along both diagonals, if I got it right...there must be some easy way to tell mathematica to do that? Multiple a number by a diagonal matrix and then a reverse diagonal matrix or some such?)

    I'm sorry, as I said, I'm not very good at this.

    Thanks for all your help.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Markov Chains
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: April 22nd 2010, 08:40 PM
  2. Markov Chains
    Posted in the Advanced Statistics Forum
    Replies: 5
    Last Post: August 26th 2009, 09:22 AM
  3. Markov Chains
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: April 26th 2009, 09:17 PM
  4. Markov Chains
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: March 18th 2009, 11:53 AM
  5. Markov Chains
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: March 6th 2009, 10:34 AM

Search Tags


/mathhelpforum @mathhelpforum