# Questions tagged [metropolis-hastings]

A special type of Markov Chain Monte Carlo (MCMC) algorithm used to simulate from complex probability distributions. It is validated by Markov chain theory and offers a wide range of possible implementations.

476 questions
Filter by
Sorted by
Tagged with
1 vote
45 views

### My MCMC Simulation

I am new to MCMC Simulation and Bayesian Analysis, so I wonder if my simulation has converged. My posterior is highly correlated by nature, so I'm facing some difficulty to ensure a sufficient number ...
• 41
1 vote
25 views

### Priors DURING Metropolis-Hastings-Random Walk chain (MCMC)

Suppose we are running a Metropolis-Hastings Random Walk chain (MHRW) targeting the unknown posterior distribution of a $\theta$, using data $Y$ and likelihood $L$. Since we do not know the posterior ...
• 59.8k
5 views

• 303
1 vote
80 views

### How does the Metropolis-Hastings algorithm sample from the target distribution when it only uses a proportional distribution? [duplicate]

I've recently started researching the M-H algorithm, and to my understanding, it's used to generates samples from a complex target distribution P(x) by using a proportional distribution f(x). The idea ...
60 views

### MCMC seems very sensible to the evidence

currently starting to study bayesian ML, and specifically MCMC, in order to compute the posterior: $$P(\theta|D) = \frac{P(D|\theta)P(\theta)}{P(D)}$$ Now, I see how the acceptance ratio makes sense ...
• 1,217
23 views

• 273
77 views

### Using both discrete and continuous moves in Metropolis-Hastings

I want to sample a continuous distribution $f$ using the Metropolis-Hastings algorithm. Can I define my transition kernel as being sometimes discrete and sometimes continuous as long as I use the ...
• 33
22 views

### Simulate SDE without error

Let $d,k\in\mathbb N$; $\sigma\in C^1(\mathbb R^d,\mathbb R^{d\times k})$ be Lipschitz and $\Sigma:=\sigma\sigma^\ast$; $(W_t)_{t\ge0}$ be a $k$-dimensional Brownian motion; $\lambda$ denote the ...
• 303
1 vote
324 views

### Is Metropolis-Hastings ever more efficient than rejection sampling in 2 dimensions?

I know that Metropolis-Hastings is an MCMC (Markov Chain Monte Carlo) method that is very useful in higher dimensions. The advantages it has over something like simple rejection sampling are that ...
• 13
31 views

### Can I use the output of an MCMC algorithm as the input of an independent Metropolis-Hastings algorithm?

Can I and if so, how can I, use the output of a MCMC method as the input for an independent Metropolis-Hastings algorithm? Maybe this question reduces to: How can I get (independent? or at least "...
• 303
245 views

### How does Rao-Blackwellization of the Metropolis-Hastings algorithm work?

I've read the paper A vanilla Rao-Blackwellization of Metropolis-Hastings algorithms, but I don't get what their actually suggested estimator is. To give some detail, we are considering the following ...
• 303
1 vote
162 views

### Metropolis Hastings Algorithm and Breaking Reversibility in MCMC

If the goal is to sample from a distribution $\pi$ it is common to build a Markov Chain with stationary distribution $\pi$. Solving this problem using Markov Chain Monte Carlo is essentially ...
• 21
1 vote
43 views

### Metropolis Hastings Proposal Distribution [closed]

I am trying to sample from a bivariate normal distribution given above. If the proposal distribution is q(theta|theta prime) and theta prime = theta + U, where U is uniformly distributed over [a,b], ...
201 views

### Sampling from the posterior with a constraint on the posterior mean

Background Under certain assumptions we know that being given the posterior mean and a family of conditional distributions, we can uniquely determine the joint distribution. I quote one of the ...
• 540
250 views

### How to draw from a uniform distribution over a large state space via MCMC

Motivating question I have a high-dimensional state space $\Omega \subseteq \mathbb R^n$ with an admissible subset $S\subseteq \Omega$, which is connected. I would like to draw a uniform random sample ...
• 113
1 vote
27 views

### How should we stratify the space for Metropolis-Hastings?

Say I'm running Metropolis-Hastings with target density $p$. What I would like to do is divide the space $E$, on which $p$ is defined, into a disjoint union $E=\bigcup_iE_i$ and run a separate ...
• 303
291 views

### Running Metropolis-Hastings algorithm with changing proposal kernel; each time the kernel is changing starting the algorithm afresh. Does it work?

I have a Markov kernel $Q$ from which I would like to generate proposals for the Metropolis-Hastings algorithm. The problem is: When the proposal is accepted, the "internal state" of $Q$ ...
• 303
104 views

### Can we run the Metropolis-Hastings algorithm with a proposal also generated by the Metropolis-Hastings algorithm?

In the Metropolis-Hastings algorithm, depending on the current state $x$, I have a distribution $\rho_x$ and I want to use a sample from $\rho_x$ as the proposal in the next iteration. (I guess ...
• 303
1 vote
60 views

### What motivates a good proposal distribution for a target distribution? (Metropolis - Hasting sampling)

In Metropolis - Hasting sampling, the proposal distribution does not necessarily have to have a form similar to that of the target distribution from which attempts are made to sample from. For one, I ...
• 251
77 views

### Metropolis - Hastings sampling: histogram shapes looks sane but bin values are off

The target distribution is of the form: $p(x) = x^{-6}.e^{\frac{-2.475}{x}}$ with a support in the interval $[0.0, 2.0]$. This gives a plot like Now, to choose a proposal kernel, I think a lognormal ...
• 251
126 views

### Computational aspect of the Metropolis-Hastings algorithm

One of the examples online is about how to write the Metropolis-Hastings algorithm from scratch. This tutorial uses a linear regression model as an example. Estimate three parameters: an intercept, a ...
• 115
1 vote
114 views

• 303
217 views

### Why is it easy for the Gibbs sampler to take long time to converge to target distribution?

This is related to Gelman's Bayesian Data Analysis 3rd Edition pg 300 first paragraph of Section 12.4. The book says the following. "An inherent inefficiency in the Gibbs sampler and Metropolis ...
• 1,445
74 views

### Metropolis Hastings Algorithms: How to measure the performance of algorithms? (Multidimensional)

I am working on a project and I am trying to measure the performance and compare two MCMC algorithms. The one is Random-Walk MH and the second one is PCN. I thought of maybe comparing the mean ...
• 11
1 vote
197 views

### Ordinal regression - 'induced Dirichlet' conditional posterior distribution

I am trying to implement the 'induced Dirichlet' prior model proposed by Michael Betancourt (from section 2.2 of his ordinal regression case study here: https://betanalpha.github.io/assets/...
• 11
75 views

### How to use Gibbs sampler to simulate normal-normal hierarchical models?

This is related to Gelman's BDA 3rd Edition Chapter 11, Sec 3. The book says the following. "The Gibbs sampler is the simplest of the Markov chain simulation algorithms, and it is our first ...
• 1,445
784 views

### How can Metropolis-Hastings use the function it is trying to approximate?

The MH algoithm is used to obtain samples from a probability distribution $f$ that is difficult to sample from directly. The process as described in this answer is: Pick a initial random state $x_0$. ...
• 177
221 views

### Implementing Metropolis-Hasting for multiple variables

Working through a lecture exercise on MCMC methods. I have a dataset containing the outcome of N chess games $-$ in the format Winner, Loser $-$ between M players. When 2 players $p_1$ and $p_2$ play ...
1 vote
138 views

### Is there a variant of the Metropolis-Hastings algorithm with proposal and/or acceptance function depending on the history?

Is there a version of the Metropolis-Hastings algorithm where either the proposal kernel; or the acceptance function might depend on the whole history (or at least a part of it) of the chain so far? ...
• 303
187 views

### Necessity of Metropolis Hastings algorithm for given posterior distribution

Let's say that we have calculated the posterior distribution of a parameter of interest given the data of a binomial experiment $N=70,x=34$ which the probability of event occurrence $\theta$ follows ...
174 views

Metropolis - Hastings : Data Science Concepts youtube shows the acceptance probability $A(a \rightarrow b)$ is $Max(1, \frac {f(b)}{f(a)})$. Is it correct or it should have been $Min(1, \frac {f(b)}{f(... • 1,548 0 votes 0 answers 31 views ### Can we use the Metropolis-Hastings with a discretized proposal? Consider the Metropolis-Hastings algorithm with proposal density$q(x,y)$and target density$p(y)$with respect to some reference measure$\lambda$. If we don't use the proposals$Y\sim q(x,\;\cdot\;)...
• 303
I wasn't able to find anything on google, but is there a variant of the Metroplis-Hastings algorithm where the acceptance probability (not the proposal kernel) in the $i$th iteration might depend on ...