Solved – How to select hyperprior distribution for Beta distribution parameter

beta distributionhierarchical-bayesianhyperparameterprior

I have a parameter $\theta$ whose value should lie between $(0,1)$. Therefore, I am assuming the prior distribution of $\theta$ to be a beta distribution with hyper-priors $\alpha$ and $\beta$ ie. $P(\theta|\alpha,\beta)=Beta(\alpha,\beta)$. I have some prior knowledge about $\theta$ from my experiments which I found lies between $(0.45,0.5)$. Is there a way that I can use this prior knowledge of $\theta$ parameter to assign some hyper prior distruibution to $\alpha$ and $\beta$ ?

Best Answer

Per Xi'an's comment, suppose you want to choose $α$ and $β$ such that the prior probability of $.45 ≤ θ ≤ .5$ is equal to some number $p$; reasonable values of $p$ would be $.5$ and $.95$. I don't know if there's a closed-form solution, but it's easy to get an approximate answer by just plugging in different values of $α$ and $β$.

In R, for example, you could run

optim(c(2, 2), function(v) abs( (pbeta(.5, v[1], v[2]) - pbeta(.45, v[1], v[2])) - p ))

and then look at the value of $par, which will give you $α$ and $β$, respectively. For $p = .5$, I get $α = 130.7, β = 156.8$. For $p = .95$, I get $α = 1367, β = 1571$.