2
$\begingroup$

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)} $$

Since usually, the ${P(B)} $ is difficult to estimate, is the algorithm replacing the marginal by providing random proposal values for the parameters and see if it should be accepted or not based on the likelihood?

$\endgroup$

1 Answer 1

2
$\begingroup$

Not at all: the Metropolis-Hastings algorithm aims at simulating from the posterior on $\theta$, defined as the product of the prior and the likelihood, but it does not marginalise since the other random item, $x$, is observed. The simulation is thus of a conditional and not of a marginal.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.