- (Bayesian). A new test for multinucleoside-resistant (MNR) human immunodeficiency virus type 1 (HIV-1) variants was recently developed. The test maintains 96% sensitivity, meaning that, for those with the disease, it will correctly report “positive” for 96% of them. The test is also 98% specific, meaning that, for those without the disease, 98% will be correctly reported as “negative.” MNR HIV-1 is considered to be rare (albeit emerging), with about a .1% or .001 prevalence rate. Given the prevalence rate, sensitivity, and specificity estimates, what is the probability that an individual who is reported as positive by the new test actually has the disease? If the median cost (consider this the best point estimate) is about $100,000 per positive case total and the test itself costs $1000 per administration, what is the total first-year cost for treating 100,000 individuals?
round((.96*.001)/((.96*.001)+(.02*.999)),3)
## [1] 0.046
For the second part of the question you can’t use the prevalence because the test isn’t perfect so we are going to miss people
Pt<-100000*.001*.96
Test_Cost <- 1000*100000
Pt_Cost <- Pt*100000
Total <- Test_Cost + Pt_Cost
Total
## [1] 109600000
- (Binomial). The probability of your organization receiving a Joint Commission inspection in any given month is .05. What is the probability that, after 24 months, you received exactly 2 inspections? What is the probability that, after 24 months, you received 2 or more inspections? What is the probability that your received fewer than 2 inspections? What is the expected number of inspections you should have received? What is the standard deviation?
Exactly two:
round(dbinom(2,24,.05),3)
## [1] 0.223
Two or more:
round(1-pbinom(1,24,.05),3)
## [1] 0.339
Fewer than 2:
round(pbinom(1,24,.05),3)
## [1] 0.661
Expected:
24*.05
## [1] 1.2
Variance:
round(24*.05*.95, 3)
## [1] 1.14
SD:
round((24*.05*.95)^.5,3)
## [1] 1.068
- (Poisson). You are modeling the family practice clinic and notice that patients arrive at a rate of 10 per hour. What is the probability that exactly 3 arrive in one hour? What is the probability that more than 10 arrive in one hour? How many would you expect to arrive in 8 hours? What is the standard deviation of the appropriate probability distribution? If there are three family practice providers that can see 24 templated patients each day, what is the percent utilization and what are your recommendations?
Exactly 3
dpois(3,10)
## [1] 0.007566655
More than 10
round(1-dpois(0,10)-dpois(1,10)-dpois(2,10)-dpois(3,10)-dpois(4,10)-dpois(5,10)-dpois(6,10)-dpois(7,10)-dpois(8,10)-dpois(9,10)-dpois(10,10),3)
## [1] 0.417
Expected in 8 hours
10*8
## [1] 80
SD:
round((8^2 * 10)^.5, 3)
## [1] 25.298
80/72*100
## [1] 111.1111
We are overbooked too many patients are showing up
- (Hypergeometric). Your supervisor with 30 subordinates was recently accused of favoring nurses. 15 of the supervisor’s workers are nurses and 15 are other than nurses. As evidence of malfeasance, the accuser stated that there were 6 company-paid trips to Disney World for which everyone was eligible. The supervisor sent 5 nurses and 1 non-nurse. If your supervisor acted innocently, what was the probability he/she would have selected five nurses for the trips? How many nurses would we have expected your supervisor to send? How many non-nurses would we have expected your supervisor to send?
round(dhyper(5,15,15,6,log=FALSE), 3)
## [1] 0.076
6*15/30
## [1] 3
6-3
## [1] 3
- (Geometric). The probability of being seriously injured in a car crash in an unspecified location is about .1% per hour. A driver is required to traverse this area for 1200 hours in the course of a year. What is the probability that the driver will be seriously injured during the course of the year? In the course of 15 months? What is the expected number of hours that a driver will drive before being seriously injured? Given that a driver has driven 1200 hours, what is the probability that he or she will be injured in the next 100 hours?
#what is the prob that x less than 1200
round(pgeom(1200,.001),3)
## [1] 0.699
round(pgeom(1500,.001),3)
## [1] 0.777
1/.001
## [1] 1000
round(((pgeom(1300,.001)-pgeom(1200,.001))*(pgeom(1200,.001)))/(pgeom(1200,.001)),3)
## [1] 0.029
- You are working in a hospital that is running off of a primary generator which fails about once in 1000 hours. What is the probability that the generator will fail more than twice in 1000 hours? What is the expected value?
round(1-ppois(2,1),3)
## [1] 0.08
lamda:
1
## [1] 1
- A surgical patient arrives for surgery precisely at a given time. Based on previous analysis (or a lack of knowledge assumption), you know that the waiting time is uniformly distributed from 0 to 30 minutes. What is the probability that this patient will wait more than 10 minutes? If the patient has already waited 10 minutes, what is the probability that he/she will wait at least another 5 minutes prior to being seen? What is the expected waiting time?
round(1-punif(10,0,30),3)
## [1] 0.667
PA<-1-punif(15,10,30)
PB<-1-punif(10,10,30)
round(PA/PB,3)
## [1] 0.75
.5*(0+30)
## [1] 15
- Your hospital owns an old MRI, which has a manufacturer’s lifetime of about 10 years (expected value). Based on previous studies, we know that the failure of most MRIs obeys an exponential distribution. What is the expected failure time? What is the standard deviation? What is the probability that your MRI will fail after 8 years? Now assume that you have owned the machine for 8 years. Given that you already owned the machine 8 years, what is the probability that it will fail in the next two years?
lambda<-1/10
SD:
lambda
## [1] 0.1
Failure after 8 years
round(1-pexp(8,.1),3)
## [1] 0.449
Failure after 2 years
round(1-pexp(2,.1),3)
## [1] 0.819