This problem is problem 5 in Chapter 7 of Bayesian Data Analysis, 3rd edition. Consider the Box-Cox transformation:

$y_i^{(\lambda)} \sim \mathcal{N}(\mu, \sigma^2)$


$y_i^{(\lambda)} = (y_i^{\lambda}-1)/\lambda$ for $\lambda \neq 0$,

$y_i^{(0)} = \log y_i$

To do Bayesian inference, we need to specify a prior $p(\mu, \sigma^2, \lambda)$.

From the question: "It seems natural to apply a prior distribution $p(\mu, \log \sigma, \lambda) \propto p(\lambda)$, where $p(\lambda)$ is a prior distribution (perhaps uniform) on $\lambda$ alone. Unfortunately, this leads to unreasonable results. Set up a numerical example to show why. (Hint: consider what happens when all the data points $y_i$ are multiplied by a constant factor.)"

From this information, the prior I have to consider is $p(\mu, \sigma^2, \lambda) \propto p(\lambda)/\sigma^2$, since $1/\sigma^2$ translates to the uniform prior on $\log \sigma$. The likelihood is as follows:

$p(y_1,...,y_n | \mu, \sigma^2, \lambda) \propto \prod_{i=1}^n\frac{1}{\sigma} \exp\left(-\frac{1}{2\sigma^2}\left(\frac{y_i^{\lambda}-1}{\lambda}-\mu\right)^2\right)$

because $P(\lambda = 0) = 0$ since it is a continuous distribution.

So the posterior is proportional to

$\frac{p(\lambda)}{\sigma^3}\prod_{i=1}^n \exp\left(-\frac{1}{2\sigma^2}\left(\frac{y_i^{\lambda}-1}{\lambda}-\mu\right)^2\right)$

I don't see why specifying the prior as we did would lead to unreasonable results. I'm not sure what it means by "set up a numerical example." Also, the hint didn't really point me in any direction. It seems like if you multiply every data point by a constant you just get

$\frac{p(\lambda)}{\sigma^3}\prod_{i=1}^n \exp\left(-\frac{1}{2\sigma^2}\left(\frac{(cy_i)^{\lambda}-1}{\lambda}-\mu\right)^2\right)$

which still seems fine.


1 Answer 1


This is precisely because the full conditional distribution of $\lambda$ is missing its Jacobian term. You've assigned a normal distribution on $y_i^*(\lambda) = \frac{y_i^\lambda - 1}{\lambda} \sim N(\mu,\sigma^2)$, whereas your full conditional distribution is expressed in terms of $y_i$, not $y_i^*(\lambda)$. Therefore, you should multiply the following Jacobian: $$ \mathrm{d}y_i^* = y_i^{\lambda-1}\,\mathrm{d}y_i \Rightarrow \mathcal{J}(y^*\to y)=\prod_{i=1}^n y_i^{\lambda-1}. $$

See Kim, S., Chen, M.-H., Ibrahim, J.G., Shah, A.K. and Lin, J. (2013), Bayesian inference for multivariate meta-analysis Box–Cox transformation models for individual patient data with applications to evaluation of cholesterol-lowering drugs. Statist. Med., 32: 3972-3990. https://doi.org/10.1002/sim.5814.


Your Answer

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

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