# How to get posterior probability from Bayes factor

I ran into this question in my class and am not sure how to solve it:

A positive test result gives you a Bayes factor of 71 in favor of being sick. If your prior probability of Being sick was 0.05, what is your posterior probability of being sick.

I understand that a Bayes factor is basically the likelihood ratio and I know that $$p(M_2)=.01$$. I guess I am looking for $$p(M2|y=\text{testing positive for sick})$$, but I am missing all the other variables.

Can someone please give me a hint how to proceed?

• Please add self-study to your tags as it will avoid answers that provide a complete resolution of this problem, without letting you gain by solving the final step. Commented Nov 18, 2018 at 16:17

Given data $$D$$ and two models $$M_1$$ and $$M_2$$, the Bayes factor is defined as:
$$BF_{1,2} \equiv \frac{p(D|M_1)}{p(D|M_2)}.$$
So you can write the posterior probability of $$M_1$$ as:
\begin{aligned} \mathbb{P}(M_1|D) &= \frac{p(D|M_1) \mathbb{P}(M_1)}{p(D|M_1) \mathbb{P}(M_1) + p(D|M_2) \mathbb{P}(M_2)} \\[6pt] &= \frac{BF_{1,2} \cdot \mathbb{P}(M_1)}{BF_{1,2} \cdot \mathbb{P}(M_1) + \mathbb{P}(M_2)} \\[6pt] &= \frac{BF_{1,2} \cdot \mathbb{P}(M_1)}{BF_{1,2} \cdot \mathbb{P}(M_1) + (1-\mathbb{P}(M_1))}. \\[6pt] \end{aligned}