Contenido del Curso
Probability Theory Update
Probability Theory Update
Bayes Rule
One of the most important terms in statistics is Bayes' theorem or Bayes' rule.
What is it?
Bayes' theorem describes the probability of an event occurring based on conditions that might be related to the event.
Look at the formula and example to understand it.
Formula
P(B|A) = (P(A|B) * P(B))/P(A)
P(B|A)
- the probability that event A will occur given evidence B has already happend.P(A|B)
- the probability that event B will occur given evidence A has already happend.P(A)
- the probability that event A will occur.P(B)
- the probability that event B will occur.
Task example:
Let’s assume that the COVID-19 test has 96
% accuracy and that 35
% of patients have this disease. Calculate the probability that the patient has COVID-19 if the test is positive.
We will use the formula:
P(COVID-19|positive) = (P(positive|COVID-19) * P(COVID-19))/P(positive)
P(positive|COVID-19)
= 0.96 (given).P(COVID-19)
= 0.35 (given).
The calculation of the denominator is complex:
- Percent of people truly diagnosed is
0.96 * 0.35
= 0.336 = 33.6% - We use the multiplication rule and multiply the probability person is ill by the probability that the test is accurate. True diagnose. - Percent of people false diagnosed is
0.65 * 0.04
= 0.026 = 2.6% -0.65 is the probability of people not ill (1 - 0.35) and 0.04 is the probability that test is not accurate (1 - 0.96). We use the multiplication rule and multiply the probability person is not ill by the probability that the test is not accurate. False diagnose. - Ill patients with positive test:
33.6% + 2.6%
= 36.2%. -We can choose patients from the "true diagnose" group or "false diagnose group". Use the addition rule.) - P(positive) = 36.2% (0.362)
Final calculation:
P(COVID-19|positive) = (P(positive|COVID-19) * P(COVID-19))/P(positive)
P(COVID-19|positive)
= (0.96 * 0.35)/0.362 = 0.9281768 = 92.81768% = 92.3% (rounded to the one decimal point).
¡Gracias por tus comentarios!