Concept:
Bayes' Theorem:
Let E1, E2, ….., En be n mutually exclusive and exhaustive events associated with a random experiment and let S be the sample space. Let A be any event which occurs together with any one of E1 or E2 or … or En such that P(A) ≠ 0. Then
\(P\left( {{E_i}\;|\;A} \right) = \frac{{P\left( {{E_i}} \right)\; \times \;P\left( {A\;|\;{E_i}} \right)}}{{\mathop \sum \nolimits_{i\; = 1}^n P\left( {{E_i}} \right) \times P\left( {A\;|\;{E_i}} \right)}},\;i = 1,\;2,\; \ldots .\;,\;n\)
Calculation:
The patient is actually HIV +ve.
So probability of that = P(he belongs to HIV +ve population) * P( HIV +ve test gives correct result given he is HIV +ve).
∴ Probabilty P(A) = 0.1 and P(E/A) = 0.95
The next case is a patient is HIV -ve but the test is showing HIV +ve i.e. test shows wrong result.
So, P(B) = 0.9 and P(E/B) = 1 - 0.89 = 0.11
So By Bayes' Theorem,
P(A/E) i.e. P(actually is HIV +ve) = \(\frac{{\left\{ {{\rm{P}}\left( {\rm{A}} \right){\rm{\times\;P}}\left( {\frac{{\rm{E}}}{{\rm{A}}}} \right)} \right\}}}{{\left[ {{\rm{\;}}\left( {{\rm{P}}\left( {\rm{A}} \right){\rm{\;\times\;P}}\left( {{\rm{E}}/{\rm{A}}} \right)} \right){\rm{\;}} + {\rm{\;}}\left( {{\rm{P}}\left( {\rm{B}} \right){\rm{\;\times\;P}}\left( {{\rm{E}}/{\rm{B}}} \right)} \right){\rm{\;}}} \right]}}{\rm{\;}}\)
\( = \frac{{0.1\;\times\;0.95}}{{\;\left[ {\left( {0.1\;\times\;0.95} \right)\; + \;\left( {0.9\;\times\;0.11} \right)} \right]}}\)
\( = \frac{{0.095}}{{\;0.095\; + \;0.099}}\)
= 0.095 / 0.194
= 95 / 194
= 0.4897
= 48.97 %