Exercise 1: Eliciting an expert prior
In the context of the historical example, we want to elicitate a prior distribution from expert knowledge.
Now, let’s imagine we have 2 expert demographers, each giving their expert opinion about the value they think plausible for \(\theta\) (the probability of a birth being a girl rather than a boy).
We asks each of them to give values for which the probability of \(\theta\) being lower would be respectively 10%, 25%, 50%, 75%, and 90%. First expert says: \[P(\theta < 0.2) = 10\%, \quad P(\theta < 0.4) = 25\%, \quad P(\theta < 0.5) = 50\%, \quad P(\theta < 0.6) = 75\%, \,\, \text{and } P(\theta < 0.8) = 90\%\] while the second expert says: \[P(\theta < 0.5) = 10\%, \quad P(\theta < 0.6) = 25\%, \quad P(\theta < 0.7) = 50\%, \quad P(\theta < 0.8) = 75\%, \,\, \text{and } P(\theta < 0.9) = 90\%\]
First, let’s load the
SHELF
R package:library(SHELF)
Using the
fitdist()
function from theSHELF
package, estimate the parameter form the Beta distribution that best fit each of those elicitations (Protip: have a look at the package intro vignette here).Plot those two Beta prior distributions, along with the “linear pooling” of their 2 curves using the
plotfit()
function from theSHELF
package (Protip: use thelp = TRUE
argument).Derive a consensus Beta prior, by averaging each of both expert quantiles, and plot it.