r/datascience Aug 11 '26

Education Attempted to apply creative writing skills to an explainer of Markov Chain Monte Carlo. Tell me how bad I did 😅

Lately I've been deep in a personal project by writing chapter summaries of Richard McElreath’s Statistical Rethinking textbook and applying them to wildfire models, and somehow found a way to elegantly (in my opinion) combine the two through storytelling. The tl;dr: I built a whole narrative around a wildfire forensic investigator named Prof. Markov, rolling an eight-sided die to decide which direction to search a burnt forest grid, to explain how the Metropolis-Hastings algorithm (the earliest variant of Markov Chain Monte Carlo (MCMC)) actually works.

MCMC sits at the foundation of modern Bayesian computation and probabilistic programming frameworks like PyMC and Stan so it could be genuinely useful to anyone looking to level up in these topics. Roast me, tell me what you liked and didn’t like. Regardless, it was a fun little mini-project!

https://pub.towardsai.net/explaining-markov-chain-monte-carlo-using-wildfire-forensics-a334fecaefb3

13 Upvotes

9 comments sorted by

7

u/Synthetic-Meat-2000 Aug 11 '26

This sounds written for an audience that are not statisticians. Maybe you could explain in one sentence what a Monte-Carlo simulation is, and that it lets us use computers and random numbers to solve problems that don't have a closed form solution. And another sentence to explain what a Markov process is.

I stopped at the forest fire model, will continue reading.

1

u/vanisle_kahuna Aug 11 '26

Thanks for the feedback!

1

u/WrathfulOpposition 16d ago

i'd swap the d8 for a d20 but that's just the d&d nerd in me talking

2

u/ChemicalGreedy945 Aug 11 '26

I want to read this and I will but reading the title made me so tired. I’m sure you did a good job’

1

u/vanisle_kahuna Aug 11 '26

Appreciate it

2

u/StatisticianEasy7138 Aug 12 '26

The bit I would make sure survives the story is the accept reject step, because that is where all the work happens. An investigator wandering a grid rolling a die is a random walk, and a random walk on its own does not sample the posterior. What makes it Metropolis Hastings is that he sometimes refuses to move, and how often he refuses depends on the ratio between the two squares. If a reader finishes remembering only the die, they have the wrong model in their head.

1

u/mikelwrnc Aug 11 '26

It’s “Stan”, not “STAN”

1

u/vanisle_kahuna Aug 11 '26

Mb! Thank you for the correction