Script for Monte carlo method

Hi all,
I have a data set and I would like to impement Markov Chain Monte Carlo method.
Is there any script that I could use for this?
Thank you very much

4 comentarios

James Tursa
James Tursa el 10 de Dic. de 2021
What have you done so far? What specific problems are you having with your code? Can you explain in more detail what this data set is? Have you defined the states of your system and the probabilities of going from one state to another? Etc.
John D'Errico
John D'Errico el 10 de Dic. de 2021
Not sure why there should be a script. It is not really something I'd usually bother to do. If you have a markov process, you might compute long term probabilities, etc., much you can do using mathematics. But direct simulation is of little value. Ok, I think I used a markov chain to predict monopoly probabiities, the odds of landing on any square. But even that was just steady state stuff. I guess the point is, you just write it. Much more depends on what you want to do, than the code itself, as the code is pretty simple.
Ilias Minas
Ilias Minas el 10 de Dic. de 2021
I have to implement MCMC method on the following dataset
[2 4 3 1 6 2 2.5 7 10]
The parameters given are the chain length (2000). Standard deviation for the proposal distribution is 0.2 and for the prior distribution mean value is 1.5 and standard deviation is 1.5.
I am new to Matlab and I dont know from where to start
Image Analyst
Image Analyst el 10 de Dic. de 2021
@Ilias Minas You can start here:
and, like I posted before, I have some sample Monte Carlo demos for you below (scroll down). Did you try those? If not, why not?

Iniciar sesión para comentar.

Respuestas (1)

Image Analyst
Image Analyst el 10 de Dic. de 2021

0 votos

I don't have Markov examples, but I'm attaching some Monte Carlo simulations, if that helps.

Preguntada:

el 9 de Dic. de 2021

Comentada:

el 10 de Dic. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by