# Is it possible for Metropolis sampling to converge to the wrong value?

I have simulated data under three parameters of interest, say a, b, c. The prior I put on c was a Gamma, so it only takes positive values. The full conditionals of a and b are known distributions, but the full conditional of c is not a known distribution.

I performed 10,000 iterations of updating a and b with Gibbs and c with Metropolis using a normal proposal distribution. The function f that is proportional to the full conditional of c returns negative values if a negative c is inputed, so I automatically rejected if the candidate for c was negative.

Looking at a trace plot of c, it seems to converge, but to a much smaller value than the actual c. Am I doing something wrong?

• It's very unclear what you mean by "converge to the wrong value". With MCMC chains, they should converge to a distribution, not a single value. Do you mean the expected value of the posterior distribution for a given parameter is different than the true value used to simulate the data? – Cliff AB Nov 3 '15 at 21:03
• Yes sorry, that's exactly what I mean. Is it possible for this to occur? – K23 Nov 3 '15 at 21:13
• This should be expected. This is not different than simulating $x_i \sim N(\mu, 1)$. We would expect that, especially for large $n$, $\bar x$ should be close to $\mu$, but it won't be exactly equal to $\mu$. That is no different in the Bayesian case; Bayesian statistics is not magic. – Cliff AB Nov 3 '15 at 21:19
• The expected value of the marginal posterior distribution of the parameter is not even close to the true value I used to simulate the data though. The expected value was around 40 times smaller than the true value. – K23 Nov 3 '15 at 21:43
• If it's way off, you may have a bug. It's really hard to tell without going into a lot of detail. – Cliff AB Nov 3 '15 at 21:57