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.

Filter by
Sorted by
Tagged with
0
votes
1answer
498 views

Single Component Metropolis-Hastings (i.e. component-wise updating)

So, let's say I have the following 2-dimensional target distribution that I would like to sample from (a mixture of bivariate normal distributions) - ...
0
votes
1answer
1k views

Implementing Metropolis-Hastings algorithm [duplicate]

I want to use this algorithm as a black-box, I'll be implementing it either in Python or R, but I don’t really understand it well to be able to turn it into a program. How do we choose the initial ...
2
votes
0answers
215 views

Designing better Metropolis-Hastings proposal distributions (for correlated parameters)

Question: Is there a rule of thumb for setting a non-diagonal covariance matrix for your Metropolis-Hastings proposal distribution? References are appreciated. Background: Say I have some posterior ...
0
votes
0answers
88 views

Within-chain and between-chain average difference in MCMC simulation

I have done 400 repetitions of a particular MCMC simulation (Metropolis–Hastings algorithm) to get a quantity of interest $N$. The simulation reaches its steady-state after ~$10^5$ iterations. The ...
5
votes
1answer
99 views

Estimation of Bayesian Models

I'm trying to get into Bayesian model estimation (I'm interested in posterior parameter distributions). I could get away with Metropolis-Hastings and Gibbs Sampling for models with few parameters (<...
2
votes
0answers
49 views

Proposal distribution on a pair of ordered continous parameters

I'd like to sample a pair of continuous parameters which has the constraint that one has to be smaller than the other one. I understand one approach is by rejection sampling by rejecting the samples ...
4
votes
1answer
360 views

Convergence of Metropolis Hastings with time varying proposal density

Suppose we have a Metropolis-Hastings sampler for a target distribution $f$, and we use a proposal density $Q_t$, that may depend on time $t$. By construction, $f$ is still an invariant density of ...
3
votes
1answer
352 views

Is there a difference between a Markov Kernel and a Transition Kernel?

I have been reading some literature on particle filters and it seems that the definition of a Markov Kernel and a Transition Kernel seem to be the same. However, I was wondering if these two terms ...
0
votes
0answers
246 views

MCMC Metropolis-Hastings with random matrices

I would like to approximate the solution to the following regression model with MCMC methods, as it can the be the core for solving more complex bayesian problems later on. $$ U = Y - ZB $$ $$ U \ \...
1
vote
1answer
673 views

Problem Sampling with Metropolis Hastings

I'm trying to use the Metropolis-Hastings (MH) algorithm to obtain an approximation of the distribution of the parameters of the following model: $$ y_{t} = \alpha x_{t}^\beta + w_{t} $$ $$ w_{t} \ \...
1
vote
1answer
68 views

Is a Metropolis-Hastings algorithm “marginalizing” the likelihood and the prior?

I'm wondering the role of a MCMC algorithm. Is it to marginalize the likelihood function and the prior in order to get the posterior distribution? $$ P(A \mid B) = \frac{P(B \mid A) \, P(A)}{P(B)} $$...
2
votes
1answer
120 views

How does the random walk know the height of the posterior in Bayesian inference?

How does the sampling procedure work if the posterior that is being sampled from is unknown? If the proposed jump has a higher probability than the current one the random walk jumps to the proposed ...
7
votes
2answers
7k views

Acceptance rate for Metropolis-Hastings > 0.5

How come it's possible to get Metropolis-Hastings acceptance rates close to 1 (for example, when exploring a unimodal distribution with a normal proposal distribution with too-small SD), after burn-in ...
2
votes
1answer
715 views

Likelihood Ratio Confidence Intervals and Credible Intervals for MCMC

I am fitting a 5 parameters model to some data using Maximum Likelihood and Non Informative Bayesian Inference using Metropolis-Hastings algorithm. From the maximum likelihood fit, i calculated the ...
5
votes
1answer
2k views

MCMC - Metropolis Hasting: formal derivation of detailed balance

I do not understand the formal proof that the Metropolis Hastings update generates a Markov chain that satisfies detailed balance as it is given in the the Wikipedia article. Under "formal derivation" ...
2
votes
1answer
228 views

Metropolis-Hastings acceptance ratio

I'm using Metropolis-Hastings to sample from an Inv-Gamma$(a,b)$ posterior distribution. My jumping distribution $J_t(\theta_*|\theta_{t-1})$ is N$(\theta_{t-1},0.5^2)$. After I sample a $\theta_*$ ...
4
votes
1answer
425 views

Metropolis Hastings with estimated posterior

I am interested in samples of $\theta$ from the posterior distribution $$ P(\theta|x) = \int d\phi P(\theta|\phi)P(\phi|x) $$ where $x$ are data and $\phi$ are nuisance parameters. In principle, I ...
3
votes
1answer
66 views

Robert Casella Independence Sampler Result

In the second edition of the Robert & Casella book (Monte Carlo Statistical Methods), the authors have a result, Theorem 7.8, on the independent Metropolis-Hastings sampler: Letting $f$ be the ...
0
votes
1answer
193 views

In the Metropolis algorithm, if the ratio of probabilities $r$ is less than $1$, why not directly reject instead of accepting with probability $r$? [duplicate]

Suppose that we want to sample from a posterior distribution $p(\theta|y)$ but we do not know how to directly sample. Suppose instead that we have a working set of values $\{\theta^{(1)}, \ldots, \...
2
votes
1answer
214 views

Is Coordinate Ascent algorithm related to Gibbs Sampling in some way?

I wonder if only me feel there are certain connections between them, I googled it for a long time, but found no where mentioned these two method. But to me, they indeed looked so related, Could anyone ...
2
votes
0answers
52 views

What's a “corner” in a parameter space?

I'm learning about Hamiltonian Monte Carlo and one of the stated benefits is that it can move around a parameter space more efficiently and that it can (from Bayesian Data Analysis, 3rd ed.) turn ...
2
votes
0answers
125 views

Metropolis Hastings: What motivates the use of Metropolis-Hastings?

I am confused with metropolis hastings. This is a simple question. In the metropolis hastings, it is assumed that we know the un-normalised posterior, $\pi(x)$. We can obtain the density by ...
1
vote
0answers
151 views

Variance estimation problem using MCMC

I have the following mode $y_k \sim \mathcal{N}( a_0+a_1 x_k+a_2 x_k^2 , \sigma^2 ) $ I have a dataset $\mathcal{D} = \{y_k , x_k\}_1^N$. I am using Metropolis-hasting MCMC to estimate the model ...
1
vote
0answers
54 views

Marked point process with spatial correlation (hard spheres with varying radii)

Problem: Given an arrangement of spheres of varying radii in a fixed domain , I am trying to simulate an arrangement of spheres in a domain of arbitrary size having the same statistics. The radii of ...
3
votes
1answer
341 views

MCMC acceptance rate decreases when proposal variance gets smaller

I am drawing a sample Y of size n from a p-dimensional Normal ($\mu, \Sigma$). Typically, p is 5. I have $\bar{Y}$ and $V = YY'$, the sum of squares. Now I want to draw samples from this $\bar{Y}$, ...
2
votes
0answers
44 views

In Metropolis Algorithm, if draws $\theta^{t-1}$ and $\theta^t$ have the same marginals, why is the target is the same as the stationary distribution?

In the Metropolis algorithm, suppose I start my algorithm at time $t-1$ with a draw $\theta^{t-1}$ from my target distribution $p(\theta|y)$. It can be shown that $\theta^t$ and $\theta^{t-1}$ are ...
0
votes
2answers
605 views

How to prove that in the Metropolis Hastings Algorithm that accepting a point with probability $min(r,1)$ is the same as using a uniform?

In the Metropolis-Hastings Algorithm, it is stated that if we have an acceptance ratio $r = \frac{p(\theta^*|y)}{p(\theta^{(s)}|y)}$ where $\theta^*$ is our new point and $\theta^{(s)}$ is our old ...
2
votes
1answer
307 views

If the Gibbs Sampler assumes knowledge of full conditionals — why can't we just solve for the full joint density and avoid Gibbs?

Suppose that $y_1, y_2$ are data drawn from a density function $f$ with parameters $\theta_1, \theta_2$ which are unknown. Suppose I applied some prior on $\theta_1, \theta_2$. Then, the Gibbs sampler ...
4
votes
1answer
1k views

What is the deeper intuition behind the symmetric proposal distribution in the Metropolis-Hastings Algorithm?

In the Metropolis-Hastings Algorithm, one usually considers a symmetric proposal distribution: $$ J(\theta^*|\theta^{(s)}) $$ where $\theta^*$ is a proposal point and $\theta^{(s)}$ is the accepted ...
3
votes
1answer
220 views

What is a hierarchical model that can estimated via the Metropolis-Hastings Algorithm but not the Gibbs Sampler?

My understanding of the differences between MH and Gibbs Samplers is that a Gibbs Sampler is usually used when the full conditionals are present to us. In other words, it is a known distribution, so ...
2
votes
1answer
129 views

Is this a valid Markov Chain Monte Carlo sampler

Let's consider a sampling algorithm which is sampling from the posterior distribution $P(X)$ of a random variable $X$. At a given iteration $t+1$ it proposes a new value $(X_{t+1})$ for $X$ using a ...
4
votes
1answer
2k views

MCMC Metropolis-Hastings' jumping distribution for non-negative parameters

The Metropolis-Hastings algorithm is Markov Chain Monte Carlo technique for sampling from some distribution $f(x)$ by constructing a Markov Chain whose equilibrium distribution is equal to $f(x)$. ...
7
votes
0answers
510 views

Tuning MALA (Metropolis-adjusted Langevin) proposal

I'd like to implement a version of Metropolis-adjusted Langevin sampling, but I'm unsure how to go about tuning the parameters of the proposal density. My understanding is that in MALA, a proposal ...
5
votes
1answer
315 views

Metropolis sampling with different proposals

I implemented a metroplis sampler for a 1D gaussian mixture, the target distribution looks like this: I use a 1D normal distribution as propsal, that is each candidate is sampled from a normal ...
4
votes
1answer
509 views

What scale to use in a Metropolis Hastings proposal distribution to get the ideal acceptance ratio?

It's often quoted that for an N-dimensional Gaussian-like target distribution, the ideal acceptance ratio is 0.23 (if your proposal distribution is also Gaussian). Assuming we use a gaussian ...
6
votes
1answer
367 views

MCMC Metropolis Hastings - Normalised distribution

I am reading about MCMC from this PDF Murphy's MCMC (1), on page 4, above equation (21) the author states: "Note that when evaluating α (acceptance probability), we only need to know the target ...
3
votes
0answers
68 views

Problem with kernel estimates in Metropolis-Hastings

I am performing an experiment on Metropolis-Hastings. I have written a proof that returns for stocks have to be a function of the Cauchy distribution and that the distribution of $\beta$ in the ...
1
vote
0answers
175 views

Model-based Bayesian inference with unknown noise variance

I want to infer the conditional posterior distribution of the unknown system parameter $\theta_1$ given the empirical data $\boldsymbol{y}$, with $\theta_1 \in \mathbb{R}$ and $\boldsymbol{y} \in \...
6
votes
1answer
298 views

Why periodically skip updating a parameter in MCMC?

I'm looking at the MCMC code of a professor doing Metropolis-Hastings update of $(\theta, \alpha, \beta)$. $\theta$ and $\beta$ are matrices. In his code, 1) He updates $\theta$ twice before ...
3
votes
2answers
2k views

Approximating 1D integral with Metropolis - Hastings Markov Chain Monte Carlo

I've been asked to approximate the integral of a one dimensional unnormalised posterior with a flat prior, using a Metropolis Hastings Markov Chain Monte Carlo, I realise that this isn't a practical ...
5
votes
1answer
249 views

handling metropolis hastings rejection during a Gibbs sweep

Suppose I have a MCMC involving a 2 step Gibbs sampler. The first part uses metropolis hastings to find the next parameter value. If during one sweep, the result for the first part is a rejections, ...
0
votes
0answers
508 views

MCMC Metropolis - confused about prior distributions

I am studying the Metropolis-Hasting algorithm (from the book Understanding Computational Bayesian Statistics- Chap.6-7) in its two different formulations: Random Walk Candidate Density; Independent ...
0
votes
0answers
135 views

why use MH for Gaussian prior when its the conjugate prior

As I understand, gaussian likelihood function has a conjugate prior for μ which is also a gaussian. In that case, the posterior can be derived in closed form. Why do some many papers use metropolis ...
23
votes
1answer
13k views

When would one use Gibbs sampling instead of Metropolis-Hastings?

There are different kinds of MCMC algorithms: Metropolis-Hastings Gibbs Importance/rejection sampling (related). Why would one use Gibbs sampling instead of Metropolis-Hastings? I suspect there ...
1
vote
3answers
984 views

Why compare with uniform distributed values in metropolis-hastings?

I'm a new starter in metropolis-hastings algorithm, having a problem in understanding its implementation of acceptance step: min{1, f(Y)/f(x)} I understand ...
0
votes
1answer
350 views

Can we use Monte Carlo Markov Chain (MCMC) to simulate tennis-match outcomes, given the probability of winning any given point for each player?

To make the example very simple, let's say that we are given: P(player 1 winning any point) = 0.75 P(player 2 winning any point) = 0.25 and also, to simplify, let's assume that these values remain ...
3
votes
1answer
199 views

Decision Rule for Random-Walk Metropolis on Log Scale

I need to sample from a non-standard density which is more tractable on the log-scale. Now I was wondering, how the decision rule is restated: $$ \alpha (x' | x ) = min(1,\frac{\pi(x')}{\pi(x)}) $$ ...
2
votes
0answers
51 views

Diagnosing Markov chain mixing time from time series?

If we have a markov chain with the aim of generating a sample from some distribution $f(x)$, how can we diagnose whether the mixing of the chain is 'good' or 'bad'. As I understand it, mixing is how ...
0
votes
0answers
191 views

Mixture Proposal Distributions

I have a target distribution $\mu$ which I would like to investigate using, for instance Metropolis-Hastings-Green (MHG). So, given a Gaussian prior, $\pi$, and a likelihood $L$ such that $\mu(dx) \...
3
votes
0answers
758 views

Criteria in determining “step size” of Metropolis-hasting algorithms

I am training a complex Bayesian model using Gibbs sampling and Metropolis-Hasting algorithm. Most of the parameters are directly sampled by using conjugate priors except for 3 params which are ...

1
4
5
6 7 8