liveBook · Manning

Markov chain monte carlo

As explained in Causal AI

Markov chain Monte Carlo is a family of sampling algorithms that generate a Markov chain whose limiting distribution is a target probability distribution.

Markov chain Monte Carlo (MCMC) performs probabilistic inference by generating a chain of outcomes: each accepted outcome depends on the previous one, and the chain’s distribution eventually converges to a target distribution. section 2.2.5

For causal questions, MCMC follows model transformation. An intervention modifies the causal generative model, conditioning adds observed information, and probabilistic inference then generates samples from the resulting distribution. section 11.6.2

A practical MCMC workflow is:

  • Transform the causal model with the required intervention, such as setting a variable with Pyro’s do function. section 11.6.2
  • Condition on observations when the query requires them. section 11.6.2
  • Run an MCMC algorithm to generate samples from the transformed or conditioned distribution. section 2.2.5 section 11.6.2

Online gaming intervention

An online gaming model targets P(IE = 0) and P(IE = 0 | E = 1). The intervention E = 0 is applied to the model; for the conditional query, E = 1 is also observed. MCMC then generates samples for each target distribution. section 11.6.2

Hamiltonian Monte Carlo (HMC) is a popular MCMC variant that avoids requiring users to implement the generator. Pyro and PyMC provide HMC and other MCMC algorithms. section 2.2.5

How Causal AI covers it

How deep it goes
Explains accept/reject chains and limiting convergence, then applies MCMC within a causal inference workflow.
Examples
Uses an online gaming query involving intervention E and outcome IE to demonstrate sampling from causal distributions.
What it assumes
Assumes a causal generative model and target query, while treating probabilistic inference as the second step after model transformation.
What you can do after
Apply it via Pyro or PyMC to sample from distributions defined by transformed causal models.
How it connects
Connects probabilistic inference with causal generative models, interventions, conditioning, counterfactual inference, and Hamiltonian Monte Carlo.

Also explained in

Compare how 2 books explain markov chain monte carlo →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal AI. The section links point to the parts of the book it draws on.