# Setting an upper limit on an estimate

I have used MCMC to estimate the value of a parameter $$\theta$$ from some data. I have thousands of samples from the (marginal) posterior distribution. The distribution of $$\theta$$ is roughly Normally distributed around zero. I can calculate the mean/median/standard deviations/quantiles/etc., no problem. What I am wondering is: how to calculate an upper bound on $$|\theta|$$? (Perhaps for a given confidence level?)

• Are you wanting the Bayesian version of a confidence interval (called a credible interval) and by upper bound do you just mean you want a one sided interval? – Robert Montgomery Apr 20 at 1:54
• @RobertMontgomery Sure, a credible interval would be fine. I am not sure if a one-sided interval is what I want. One thing I am thinking of doing is taking the absolute value of all the samples and then calculating the number $x$ where 95% of the samples are less than $x$. Does that make sense? – rhombidodecahedron Apr 20 at 16:11

Front your comment: Yes you can just take the absolute value of all the samples and find x such that the CDF at x is 0.95. This is a one sided credible interval. By the way you should just be able to track the absolute value of your parameter in what ever software you are using (winbugs for example) so you don't even have to take the avsolute value of the sample. Looking at the posterior density if the absolute value should help you see why this is the value that you are looking for.

• Great, thanks for the info. (I'm using R and Python, not any specific estimation software, but I'll look into BUGS, thanks!) – rhombidodecahedron Apr 20 at 17:47
• If you already use R I would use R2winbugs or Rstan – Robert Montgomery Apr 20 at 17:55