Recently, there was a discussion on stack exchange about an example in my book. The example is a paradox about estimating normalizing constants. The analysis of the problem in my book is wrong; more precisely, the analysis is my book is meant to show that just blindly applying Bayes’ rule does not always yield a correct posterior distribution.

This point was correctly noted by a commenter at stack exchange who uses the name “Zen.” I don’t know who Zen is, but he or she correctly identified the problem with the analysis in my book.

However, it is still an open question how to do the analysis properly. Another commenter, David Rohde, identified the usual proposal which I’ll review below. But as I’ll explain, I don’t think the usual answer is satisfactory.

The purpose of this post is to explain the paradox and then I want to ask the question: does anyone know how to correctly solve the problem?

The example, by the way, is due to my friend Ed George.

**1. Problem Description **

The posterior for a parameter given data is

where is the likelihood function, is the prior and is the normalizing constant. Notice that the function is known.

In complicated models, especially where is a high-dimensional vector, it is not possible to do the integral . Fortunately, we may not need to know the normalizing constant. However, there are occasions where we do need to know it. So how can we compute when we can’t do the integral?

In many cases we can use simulation methods (such as MCMC) to draw a sample from the posterior. The question is: how can we use the sample from the posterior to estimate ?

More generally, suppose that

where is known but we cannot compute the integral . Given a sample , how do we estimate ?

**2. Frequentist Estimator **

We can use the sample to compute a density estimator of . Note that for all . This suggests the estimator

where is an arbitrary value of .

This is only one possible estimator. In fact, there is much research on the problem of finding good estimators of from the sample. As far as I know, all of them are frequentist.

As David Rohde notes on stack exchange, there is a certain irony to the fact the Bayesians use frequentist methods to estimate the normalizing constant of their posterior distributions.

**3. A Bogus Bayesian Analysis **

Let’s restate the problem. We have a sample from . The function is known but we don’t know the constant and it is not feasible to do the integral.

In my book, I consider the following Bayesian analysis. The analysis is wrong, as I’ll explain in a minute.

We have an unknown quantity and some data . We should be able to do Bayesian inference for . We start by placing a prior on . The posterior is obtained by multiplying the prior and the likelihood:

where we dropped the terms since they are known.

The “posterior” is useless. It does not depend on the data. And it may not even be integrable.

The point of the example was to point out that blindly applying Bayes rule is not always wise. As I mentioned earlier, Zen correctly notes that my application of Bayes rule is not valid. The reason is that, I acted as if we had a family of densities indexed by . But we don’t: is a valid density only for one value of , namely, . (To get a valid posterior from Bayes rule, we need a family which is a valid distribution for , for each value of .)

**4. A Correct Bayesian Analysis? **

The usual Bayesian approach that I have seen is to pretend that the function is unknown. Then we place a prior on (such as a Gaussian process prior) and proceed with a Bayesian analysis. However, this seems a unsatisfactory. It seems to me that we should be able to get a valid Bayesian estimator for with pretending not to know .

Christian Robert discussed the problem on his blog. If I understand what Christian has written, he claims that this cannot be considered a statistical problem and that we can’t even put a prior on because it is a constant. I don’t find this point of view convincing. Isn’t the whole point of Bayesian inference that we can put distributions on fixed but unknown constants? Christian says that this is a numerical problem not a statistical problem. But we have data sampled from a distribution. To me, that makes it a statistical problem.

**5. The Answer Is … **

So what is a valid Bayes estimator of ? Pretending I don’t know or simply declaring it to be a non-statistical problem seem like giving up.

I want to emphasize that this is not meant in any way as a critique of Bayes. I really think there should be a good Bayesian estimator here but I don’t know what it is.

Anyone have any good ideas?