6
$\begingroup$

My question originated from Xi'an's suggestion to check integrability against the posterior in my nonlinear hierarchical model. I did not check it, but had possible infinity in mind and found out that one of my conditionals (which is inverse gamma distribution) have infinite variance. So that sampling resulted in chains often being far away at the tails.

So, this raised a question for me:

How to properly sample from distributions with infinite variances like inverse gamma distribution (with $ \alpha = 2 $) or Levy distribution or any other distribution with infinite variance? What does MCMC offer? I tried to search for papers dealing with such issues, but still no luck.

$\endgroup$

1 Answer 1

6
$\begingroup$

There is nothing wrong with infinite variance distributions, per se... For instance, simulating a Cauchy using rcauchy(10^3) produces a sample truly from a Cauchy distribution! Hence MCMC has no specific feature to "fight" for or against infinite variance distributions.

The difficulty with infinite variance distributions is at the Monte Carlo level, for instance if you want to compute $$ \mathfrak{I} = \int_0^\infty \sqrt{x} \dfrac{1}{\pi}\dfrac{1}{1+x^2} \,\text{d}x $$ the integral exists (and is finite), but using $$ \dfrac{1}{N} \sum_{i=1}^N \sqrt{|x_i|} $$ when the $x_i$'s are Cauchy leads to an infinite variance estimate. See, e.g.,

> expl=matrix(abs(rcauchy(10^6)),ncol=1000)
> est=apply(expl,2,mean)/2
> quantile(est,c(.9,.99,.999))
      90%       99%     99.9% 
   6.484375  37.393755 160.869406 

which shows that the estimator can get very large! And away from the true value

> integrate(function(x){sqrt(x)*dcauchy(x)},low=0,up=Inf)
0.7071078 with absolute error < 2e-05

In this case, you need to use importance sampling.

$\endgroup$
2
  • $\begingroup$ @ Xi'an Thank you for this guidance!!!! But is there anything to be done, so that this estimate could be close to true value and not far away in the middle of somewhere? What I mean, how to suppres that bad behaviour of Monte Carlo? $\endgroup$
    – Tomas
    Commented Feb 22, 2012 at 13:25
  • $\begingroup$ Sorry, now I see your suggestion to use importance sampling. Thank you $\endgroup$
    – Tomas
    Commented Feb 22, 2012 at 13:29

Your Answer

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

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