1.5 Thinking like a Bayesian 4/4
1.5.1 Asking question
What’s the chance that I actually have the disease (a)? Versus I do not have the disease, What’s the chance that I would have gotten this positive test results (b)?
# building data
<- c(rep("disease", 4), rep("no disease", 96))
disease <- "test positive" ; b <- "test negative"
a <- c(rep(a, 3), b, rep(a, 9), rep(b, 87))
test <- data.frame(disease, test)
disease_status # contingency table
<- table(disease_status)
contingency_disease <- addmargins(contingency_disease)
contingency_disease ::kable(contingency_disease ) knitr
test negative | test positive | Sum | |
---|---|---|---|
disease | 1 | 3 | 4 |
no disease | 87 | 9 | 96 |
Sum | 88 | 12 | 100 |
(a): 3 / 12
(b): 9 / 96
Analogy between (b) and p-value: it is more natural to study the uncertainty of a yet-unproven hypothesis than the uncertainty of data we have already observed.(authors’opinion)