Derive Prior Parameters from Interval

25 Views Asked by At

Suppose that we are given the following $95\%$ interval $(5,15)$ is there a way to derive the prior parameters for a $Gamma(a,b)$ distribution ???

We can assume that the mean is equal to $\frac{a}{b}= 10$ but in order to find $a$ and $b$ we will need one more equation. I believe that we have to use the bounds of the interval but I cannot find with what exactly they are equal.

1

There are 1 best solutions below

0
On BEST ANSWER

If you assume that $5$ is the $2.5\%$-quantile and $15$ is the $97.5\%$ quantile, you can numerically solve the problem with an optimization procedure.

Here with the R software:

f <- function(ab){
  a <- ab[1]; b <- ab[2]
  (qgamma(2.5/100, a, b) - 5)^2 + (qgamma(97.5/100, a, b) - 15)^2
}

optimization <- optim(c(1,1), f) # 1 and 1 are the initial values for a and b
### a and b:
optimization$par
# 13.213882  1.415555

### check:
a <- optimization$par[1]
b <- optimization$par[2]
pgamma(5, a, b)
# 0.0250028
pgamma(15, a, b)
# 0.9749941