Go to the appex-08-[GITHUB USERNAME] repo, clone it, and
start a new project in RStudio.
library(tidyverse)
Use R as a calculator for the exercises in this AE.
Suppose in a class that 80% of the students identified as male and 20% identify as female. 60% of the male students are Econ majors and 80% of the female students are Econ majors.
What is the probability that a randomly selected student in this class is an Econ major?
Given that a student is an Econ major, what is the probability that they are male?
The global coronavirus pandemic illustrates the need for accurate testing of COVID-19, as its extreme infection rate poses a significant public health threat. Due to the time-sensitive nature of the situation, the FDA enacted emergency authorization of a number of serological tests for COVID-19. Full details of these tests may be found on its website here.
The Abbott Alinity test has an estimated sensitivity of 100% and specificity of 99%. Let \(D\) be the event that a patient has the disease, and let \(T\) be the event that the test is positive for that disease.
Suppose the prevalence of COVID-19 in the general population is 2%. What are the positive and negative predictive values of the Abbott Alinity test?
Now suppose the prevalence of COVID-19 in the general population is 8%. Repeat the same calculations as in Exercise 3. Can you reuse code from Exercise 3 somehow?
In the context of COVID-19, would you prefer to have a test with perfect sensitivity and good specificity or would you rather have a test with perfect specificity and good sensitivity? Explain your answer.