Formula for calculating the acceptance function What I find confusing is that to get the acceptance function, you have use the stationary distribution. If you have the stationary distribution, then why not simply sample from the distribution directly as opposed to metropolis-hasting algo?? you have the distribution parameters of the stationary distribution from which you want to sample, then we can use roulette wheel sampling or some random number generation and sampling approach ??
2026-03-31 12:03:28.1774958608
Metropolis Hastings algorithm for sampling, calculating the acceptance function
165 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in PROBABILITY-DISTRIBUTIONS
- Given is $2$ dimensional random variable $(X,Y)$ with table. Determine the correlation between $X$ and $Y$
- Statistics based on empirical distribution
- Given $U,V \sim R(0,1)$. Determine covariance between $X = UV$ and $V$
- Comparing Exponentials of different rates
- Linear transform of jointly distributed exponential random variables, how to identify domain?
- Closed form of integration
- Given $X$ Poisson, and $f_{Y}(y\mid X = x)$, find $\mathbb{E}[X\mid Y]$
- weak limit similiar to central limit theorem
- Probability question: two doors, select the correct door to win money, find expected earning
- Calculating $\text{Pr}(X_1<X_2)$
Related Questions in SAMPLING
- Defintion Ideally sampled image
- What is expected value of a sample mean?
- Why does k-fold cross validation generate an MSE estimator that has higher bias, but lower variance then leave-one-out cross-validation?
- Sampling Question
- Limit of chi square distribution.
- Sampling Distribution of Difference of Normal Random Variables
- Sampling Distribution and Chi Squared Random Variables
- Variance of $S^2$ taken from Normal Distribution
- Sample Variance Definition Disparity
- [data generating process]-[sampling from an infinite population]-[i.i.d.]: some clarifications
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
To expand on my tongue in cheek comment, even if you can write down the distribution of your random variable it is not immediately obvious how one might go about simulating a set of observations $Y_1,Y_2,\ldots,$ from this density. A couple of cases when this might be possible
But these cases do not exhaust the class of random variables we might be interested in, and certainly once the random variable increases in dimension it is increasingly unlikely that you will be able to sample the random variable easy. This situation occurs frequently in Bayesian inference when we are interested in the posterior distribution of some parameter $\theta$ in which case we usually end up requiring the evaluation of densities of the form $$ \begin{align} p(\theta | \mathbf{X} ) \propto p(\mathbf{X}|\theta)p_0(\theta), \tag{1} \end{align} $$ having observed a sample $\mathbf{X}$. Now at this point we can point out a big advantage of the Metropolis-Hastings method, in particular using the notation in your question you have $$ A(\theta \rightarrow \theta') = \frac{ \pi(\theta')Q(\theta' \rightarrow \theta) }{ \pi(\theta)Q(\theta \rightarrow \theta') } $$ where $\pi(\theta) = p(\theta | \mathbf{X})$. Now as it stands we have cheated in writing the density as $(1)$ because we still need to carry out an integration to find the normalising constant $Z = \int_{\Theta} p(\mathbf{X}|\theta)p_0(\theta)d\theta$ in order to normalise the density. Doing this may be incredibly hard, because of the dimension or just a particularly intractable functional form, but because $(2)$ is a ratio we don't need to worry since $$ \begin{align*} A(\theta \rightarrow \theta') &=\frac{p(\theta'|\mathbf{X})}{p(\theta|\mathbf{X} )}\frac{ Q(\theta' \rightarrow \theta) }{ Q(\theta \rightarrow \theta') } \\ &= \frac{p(\mathbf{X}|\theta')p_0(\theta')/Z }{p(\mathbf{X}|\theta)p_0(\theta) / Z}\frac{ Q(\theta' \rightarrow \theta) }{ Q(\theta \rightarrow \theta') } \\ &= \frac{p(\mathbf{X}|\theta')p_0(\theta') }{p(\mathbf{X}|\theta)p_0(\theta) }\frac{ Q(\theta' \rightarrow \theta) }{ Q(\theta \rightarrow \theta') } \end{align*} $$ and so we don't need to worry about the normalising constant, this is a very good reason for considering these types of methods.
As another example consider the following density $$ p(x_1, x_2, x_3) \propto \exp\left\{-(x_1 + x_2 + x_3 + \alpha x_1 x_2 + \beta x_2 x_3 + \gamma x_3 x_1 \right\}, \qquad x_i \geq 0, $$ how would you sample from it? You could try writing it as $p(x_1,x_2,x_3) = p(x_3, x_2 | x_1)p(x_1)$ but for example you can show that the marginal $p(x_1)$ is of the form $$ p(x_1) \propto e^{-x_1}\int_0^{\infty}\frac{e^{-x_2 - \alpha x_1 x_2 }}{1 + \beta x_2 + \gamma x_1 } dx_2 $$ which is already complicated and we still need to work out $p(x_3,x_2|x_1)$. However consider using Gibbs sampling methods, which is a special case of Metropolis-Hastings which requires being able to simulate from the conditionals $p(x_1 | x_2, x_3)$ etc, but $$ p(x_1 | x_2, x_3 ) \propto \exp\left\{-(1 + \alpha x_2 + \gamma x_3 )x_1\right\} $$ which is just an exponential random variable which is very easy to sample from because it satisfies the invertible CDF property I mentioned earlier. So Metropolis-Hastings (Gibbs) sampling makes this problem much, much easier than trying to simulate $x_1$ and then simulate $x_2,x_3 | x_1$ or some similar strategy.
Hopefully that adds some motivation for why sampling methods might be required, the price we pay for their flexibility is that we construct chains that only asymptotically sample from the desired distribution and therefore we must address the question of convergence of these chains, and the correlation between samples and similar issues.