We were given the sensitivity, specificity, and prevalence.
| Table | \(D+\) | \(D-\) | Total |
|---|---|---|---|
| \(T+\) | \(0.00085\) | \(0.04995\) | \(0.0508\) |
| \(T-\) | \(0.00015\) | \(0.94905\) | \(0.9492\) |
| Total | \(0.001\) | \(0.999\) | \(1\) |
| Table | $D+$ | $D-$ | Total |
| ----- | -- | -- | ----- |
| $T+$ | $0.00085$ | $0.04995$ | $0.0508$ |
| $T-$ | $0.00015$ | $0.94905$ | $0.9492$ |
| Total | $0.001$ | $0.999$ | $1$
\[P(D- \| T-) = \frac{P(T- \cap
D-)}{P(T-)} = 0.99984\]
$$P(D- \| T-) = \frac{P(T- \cap D-)}{P(T-)} = 0.99984$$
This means that if the test yields a negative result, there is a high probability that the true status is also negative.
The positive predictive value with the default prevalence of \(P(D+) = 0.001\) is \(\frac{0.00085}{0.05080} = 0.0167\). This means there are high chances of false positives. This is not because the test is necessarily a bad one, but because it is such a rare condition that there are more likely to be false positives than true positives.
We can study the behavior of positive predictive value if we make it into a function of an increasing variable \(P(D+)\). After reviewing the code done in class, I recreated this plot under this context.
# constant for sensitivity and specificity
sensitivity <- 0.85
specificity <- 0.95
# predictive positive value function
ppv <- function(x, sen, spec){
sen*x/(sen*x+(1-spec)*(1-x))
}
# plotting
xxx <- seq(0.001,1,by = 0.01)
yyy <- ppv(xxx, sensitivity, specificity)
plot(xxx,yyy, type = "l", lwd = 2, col = "red", xlab = "Prevalence", ylab = "Positive Predictive Value")
This code yielded this plot: http://127.0.0.1:26887/graphics/e16ee78b-1027-4ab1-85ae-65bd907580c2.png
We were given the sensitivity, specificity, and prevalence.
| Table | \(D+\) | \(D-\) | Total |
|---|---|---|---|
| \(T+\) | \(0.00085\) | \(0.04995\) | \(0.0508\) |
| \(T-\) | \(0.00015\) | \(0.94905\) | \(0.9492\) |
| Total | \(0.001\) | \(0.999\) | \(1\) |
| Table | $D+$ | $D-$ | Total |
| ----- | -- | -- | ----- |
| $T+$ | $0.00085$ | $0.04995$ | $0.0508$ |
| $T-$ | $0.00015$ | $0.94905$ | $0.9492$ |
| Total | $0.001$ | $0.999$ | $1$ |
\[P(D- \| T-) = \frac{P(T- \cap
D-)}{P(T-)} = 0.99984\]
$$P(D- \| T-) = \frac{P(T- \cap D-)}{P(T-)} = 0.99984$$
This means that if the test yields a negative result, there is a high probability that the true status is also negative.
The positive predictive value with the default prevalence of \(P(D+) = 0.001\) is \(\frac{0.00085}{0.05080} = 0.0167\). This means there are high chances of false positives. This is not because the test is necessarily a bad one, but because it is such a rare condition that there are more likely to be false positives than true positives.
We can study the behavior of positive predictive value if we make it into a function of an increasing variable \(P(D+)\). After reviewing the code done in class, I recreated this plot under this context.
# constant for sensitivity and specificity
sensitivity <- 0.85
specificity <- 0.95
# predictive positive value function
ppv <- function(x, sen, spec){
sen*x/(sen*x+(1-spec)*(1-x))
}
# plotting
xxx <- seq(0.001,1,by = 0.01)
yyy <- ppv(xxx, sensitivity, specificity)
plot(xxx,yyy, type = "l", lwd = 5, col = "navy", xlab = "Prevalence", ylab = "Positive Predictive Value")
This code yielded this plot: http://127.0.0.1:26887/graphics/ba64323d-aa40-4c9d-a58f-8f95c43acda5.png