05/04/2017
***
***
or
***
| Total | |||
|---|---|---|---|
| 43 | 9 | 52 | |
| 44 | 4 | 48 | |
| Total | 87 | 13 | 100 |
The probability of an event A conditioned by an event B is equal to the joint probability of A & B over the probability of B.
example from wikipedia (https://en.wikipedia.org/wiki/Contingency_table)
(U.S. military style)
(x2)
(x2)
(x2)
HIV+
(U.S. military style)
ELISA sensitivity (TP) = 93%
ELISA specificity (TN) = 99%
HIV+ prevalence = 1.48/1000
Posterior probability
Prior probability
Prior probability
0.00148
0.99852
0.93
0.07
0.99
0.01
Posterior probability
1st ELISA
Prior probability
1st ELISA
Prior probability
2n ELISA
Prior probability
1st ELISA
2n ELISA
3rd ELISA
Prior probability
Prior probability
Prior probability
40
20 standard
20 pill
9 months
16
4
p:
probability of a pregnancy coming from the treatment group.
| p | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 |
|---|---|---|---|---|---|---|---|---|---|
| prior | 0.06 | 0.06 | 0.06 | 0.06 | 0.52 | 0.06 | 0.06 | 0.06 | 0.06 |
k:
number of pregnancies in the treatment group.
What's the value of p?
Likelihood:
probability of the observed data given a particular model.
| p | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 |
|---|---|---|---|---|---|---|---|---|---|
| prior | 0.06 | 0.06 | 0.06 | 0.06 | 0.52 | 0.06 | 0.06 | 0.06 | 0.06 |
| L | 0.0898 | 0.2182 | 0.1304 | 0.035 | 0.0046 | 0.0003 | 0 | 0 | 0 |
| p | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 |
|---|---|---|---|---|---|---|---|---|---|
| prior | 0.06 | 0.06 | 0.06 | 0.06 | 0.52 | 0.06 | 0.06 | 0.06 | 0.06 |
| L | 0.0898 | 0.2182 | 0.1304 | 0.035 | 0.0046 | 0.0003 | 0 | 0 | 0 |
| post. | 0.1748 | 0.4248 | 0.2539 | 0.0681 | 0.0780 | 0.0005 | 0 | 0 | 0 |