Is there some way to calculate the parameters of a beta distribution, if the highest density interval is known. That is, given $a,b,x$ I want to have a beta distribution such that the probability of the interval $[a,b]$ is $x$.

The reason I need this is that I want to use beta priors in a Bayesian analysis, to show how beliefs are updated by the data. So if someone is 95% certain that the true probability is between $a$ and $b$, then I want to construct a beta distribution that captures this belief as a prior.

  • $\begingroup$ @COOLSerdash Unfortunately not. I want a complete interval to be covered with some probability, not just two points. I don't really care that much about the value of the distribution at the end points. $\endgroup$ – LiKao May 15 '20 at 12:10
  • $\begingroup$ I recommend reading the linked answer more carefully: By setting the appropriate quantiles, it gets you what you want (I think). To give an example: An expert thinks that with 95% certainty, the true probability lies between $0.2$ and $0.75$. So the points we have are $(0.025, 0.2)$ and $(0.975, 0.75)$. whuber's code shows that a beta distribution with parameters $5.21$ and $5.88$ satisfies this request. Isn't this exactly what you want? $\endgroup$ – COOLSerdash May 15 '20 at 12:24
  • $\begingroup$ @COOLSerdash Ah, you are right. I misread PDF instead of CDF in that question. If the points are on the CDF that does indeed answer my question. $\endgroup$ – LiKao May 18 '20 at 14:41

I'm not sure if you want to use beta distribution in here. Notice that if the $[a,b]$ interval is not symmetric around $0.5$, then the beta distribution covering such interval would not be symmetric as well. In such case, it would be skewed, and you would be assigning more prior density mass to some particular area within the $[a,b]$ interval. If the only thing that you want to assume that the value is within the $[a,b]$ interval, when this sounds more like assuming a mixture of uniform prior on $[a,b]$ and some other distribution.

  • $\begingroup$ I was thinking about a beta distribution, because it is easy to sample in BUGS/JAGS. But you are right, it could get quite skewed, which might cause some problems. So it would probably be best to have a uniform prior over [a,b] and another uniform prior over [0,1] which captures the rest of the distribution. Is there a good way to sample from such a prior in BUGS/JAGS? $\endgroup$ – LiKao May 15 '20 at 12:27

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