Question 7. Lognormal variance
Topic: Conjugate analysis for normal models · more questions on this topic
‹ Question 4 Question 12 ›
The size X of a particle has density
f(x\mid\mu,\sigma^{2}) = \frac{1}{x\sigma\sqrt{2\pi}} \exp\Bigl(-\frac{1}{2\sigma^{2}}(\log x-\mu)^{2}\Bigr), \quad x>0.
If X\sim\operatorname{logN}(\mu,\sigma^{2}), then \log X\sim \operatorname{N}(\mu,\sigma^{2}). Assume \mu is known, and let x_1,\ldots,x_n be an iid sample.
(i) Show that this lognormal model belongs to the exponential family. [4 marks]
(ii) Find the form of the conjugate prior for \sigma^{2} and identify the distribution. [4 marks]
(iii) Find the posterior distribution of \sigma^{2}. [5 marks]
(iv) State, without derivation, the posterior mean and the posterior mode. Explain their behaviour as n\to\infty. [4 marks]
(v) Briefly describe how you would construct a 90\% credible interval for \sigma^{2}. [3 marks]
Definitions. The unknown v=\sigma^2 is the variance of \log X, not the variance of X. The value \mu is known. Write Q=\sum_i(\log x_i-\mu)^2 and use the inverse-gamma kernel v^{-a-1}e^{-b/v} on v>0. All observed x_i must be positive.
(i) Put v=\sigma^2. In the exponential-family form f(x\mid v)=b(x)\exp\{c(v)T(x)\}/a(v), take
b(x)=\frac1{x\sqrt{2\pi}},\qquad T(x)=\frac{(\log x-\mu)^2}{2},\qquad c(v)=-\frac1v,\qquad a(v)=\sqrt v.
The known \mu makes T(x) a statistic, and the support x>0 is independent of v. This is a one-parameter exponential family.
The same structure can be seen by setting Z_i=\log X_i. Then Z_i\sim\operatorname{N}(\mu,v), so inference about v is a normal known-mean variance problem on the log scale. The factor 1/x in the lognormal density is the transformation Jacobian; it depends on the data, so it does not change the posterior kernel in v.
(ii) For an iid sample the likelihood is
L(\sigma^{2}) \propto (\sigma^{2})^{-n/2} \exp\Bigl(-\frac{1}{2\sigma^{2}}\sum_{i=1}^{n}(\log x_i-\mu)^{2}\Bigr).
The general conjugate kernel from (i) is a(v)^{-\kappa}\exp\{\eta c(v)\}=v^{-\kappa/2}e^{-\eta/v}. Matching it to (\sigma^{2})^{-a-1}\exp(-b/\sigma^{2}) gives a=\kappa/2-1 and b=\eta. Thus \operatorname{InvGamma}(a,b), with a,b>0, is a proper conjugate prior on the variance, not on the standard deviation.
(iii) Let Q=\sum_{i=1}^{n}(\log x_i-\mu)^{2}. Then
\begin{aligned} p(v\mid{\boldsymbol{x}}) &\propto v^{-n/2}e^{-Q/(2v)}v^{-a-1}e^{-b/v}\\ &=v^{-(a+n/2)-1}e^{-(b+Q/2)/v}. \end{aligned}
Recognising the inverse-gamma kernel,
\boxed{\sigma^{2}\mid{\boldsymbol{x}}\sim\operatorname{InvGamma}\bigl(a+n/2,\; b+Q/2\bigr).}
(iv) With \alpha_n=a+n/2 and \beta_n=b+Q/2,
\mathbb{E}(\sigma^{2}\mid{\boldsymbol{x}})=\frac{\beta_n}{\alpha_n-1}\quad(\alpha_n>1), \qquad \operatorname{mode}(\sigma^{2}\mid{\boldsymbol{x}})=\frac{\beta_n}{\alpha_n+1}.
As n\to\infty with fixed prior parameters, both are asymptotic to Q/n, the maximum likelihood estimator of \sigma^{2}. If the data come from this model at variance v_0, the law of large numbers gives Q/n\to v_0; the prior’s influence vanishes.
For finite n the posterior mean exceeds the mode whenever the mean exists, reflecting the inverse-gamma right tail. The two become close as the shape grows. In the large-sample statement, Q grows with the sample; it is Q/n, rather than a fixed observed Q, that converges to the true log-scale variance.
(v) Take the 0.05 and 0.95 quantiles of this inverse-gamma posterior. That interval is a central 90\% credible interval for the unknown variance. Equivalently, if W=1/\sigma^2\mid{\boldsymbol{x}}\sim\operatorname{Gamma}(\alpha_n,\beta_n) in shape–rate form and q_u is its u-quantile, the interval is [1/q_{0.95},\,1/q_{0.05}]. Taking reciprocals reverses the order of the endpoints.
Conditional on the observed sample and the model, the posterior probability between these endpoints is 0.90, with 0.05 in each tail. These are quantiles of the parameter posterior; quantiles of lognormal observations would answer a predictive question instead. If an interval for \sigma is wanted, take square roots of both endpoints.