Bayesian – Confidence Intervals When Using Bayes’ Theorem

bayesianconditional probabilityconfidence intervalr

I'm computing some conditional probabilities, and associated 95% confidence intervals. For many of my cases, I have straightforward counts of x successes out of n trials (from a contingency table), so I can use a Binomial confidence interval, such as is provided by binom.confint(x, n, method='exact') in R.

In other cases though, I don't have such data, so I use Bayes' theorem to compute from information I do have. For example, given events $a$ and $b$:

$$
P(a|b) = \frac{P(b|a) \cdot P(a)}{P(b)}
$$

I can compute a 95% confidence interval around $P(b|a)$ using $\textrm{binom.confint}(\#\left(b\cap{}a),\#(a)\right)$, and I compute the ratio $P(a)/P(b)$ as their frequency ratio $\#(a)/\#(b)$. Is it possible to derive a confidence interval around $P(a|b)$ using this information?

Thanks.

Best Answer

Well, you can't just take the confidence interval for $p(b|a)$ and scale it by $p(a)/p(b)$ because of the uncertainty in the estimate of that ratio. If you can construct a $100(1-\alpha)\%$ confidence interval $[A, B]$ for $p(a)/p(b)$, then take the lower bound for a $100(1-\alpha)\%$ confidence interval for $p(b|a)$ and multiply it by $A$ and take the upper bound for $p(b|a)$ and multiply it by $B$. That should give at an interval that has at least a $100(1-\alpha)^2\%$ confidence level for $p(a|b)$.

Related Question