What Does Metropolis-Hastings Do?

Let's say you have some probability distribution function P(x)P^*(x): for now, we'll assume that xx can be any real number. We'd like to answer questions about P(x)P^{*}(x): where is its highest point? What's the expected value of a sample from the distribution? What is the variance of the distribution?

Unfortunately, there's a catch. We aren't able to directly evaluate the true distribution P(x)P^*(x). Instead, we have access to some function P(x)=cP(x)P(x) = cP^*(x), where cc is a constant we don't know. Before, if we saw that a specific region under P(x)P^{*}(x) had an area of 0.95, we'd know that region contained 95% of the values we'd get by randomly sampling from PP^{*}. But now, because of this constant, we don't know if 0.95 is a lot or a little: maybe the whole thing is multiplied by a big constant and 0.95 is actually a tiny sliver of the actual distribution.

What Does Metropolis-Hastings Do?

Let's say you have some probability distribution function P(x)P^*(x): for now, we'll assume that xx can be any real number. We'd like to answer questions about P(x)P^{*}(x): where is its highest point? What's the expected value of a sample from the distribution? What is the variance of the distribution?

Unfortunately, there's a catch. We aren't able to directly evaluate the true distribution P(x)P^*(x). Instead, we have access to some function P(x)=cP(x)P(x) = cP^*(x), where cc is a constant we don't know. Before, if we saw that a specific region under P(x)P^{*}(x) had an area of 0.95, we'd know that region contained 95% of the values we'd get by randomly sampling from PP^{*}. But now, because of this constant, we don't know if 0.95 is a lot or a little: maybe the whole thing is multiplied by a big constant and 0.95 is actually a tiny sliver of the actual distribution.