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?
rate = 0.001
sense = 0.96
spec = 0.98
prob = sense*rate/((sense*rate)+(1-spec)*(1-rate))
prob
## [1] 0.04584527
There is a 4.58% 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?
test_cost <- 1000*100000
treatment_cost <- 100000*100000*0.001
tc <- test_cost + treatment_cost
tc
## [1] 1.1e+08
There are two ways to calculate this, the first is assuming we had
perfect knowledge of the situation, and then it would require the test
cost * population + treatment_costpopulationprevalence. This
assumes that we know exactly who is sick and who is not. However, if we
do not have perfect knowledge:
people <- 100000
tp = sense*people*rate
fp = (1-sense)*people*rate
cost = 1000*people+100000*(tp+fp)
cost
## [1] 1.1e+08
Practically we look at the prevailing rate of infection, then split
it up into true positives and false positives, we receive the same
answer!
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?
p <- dbinom(2,24,0.05)
p
## [1] 0.2232381
The probability that there will be exactly 2 inspection is 22%
What is the probability that, after 24 months, you received 2 or more
inspections?
p_2p <- 1 - (dbinom(1, 24, 0.05) + dbinom(0, 24, 0.05))
p_2p
## [1] 0.3391827
The probability is 33%
What is the probability that your received fewer than 2 inspections?
p_2l <- dbinom(0,24,.05) + dbinom(1,24,.05)
p_2l
## [1] 0.6608173
The probability that there is less than 2 inspections is 66%, which
aligns with the prior question.
What is the expected number of inspections you should have received?
n <- 24
r <- 0.05
i <- 1 - 0.05
num_inspect <- n * r * i
num_inspect
## [1] 1.14
The expected number of inspections is 1.
What is the standard deviation?
(n*r*i)^0.5
## [1] 1.067708
The Standard deviation is 1.06
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?
(p_exactly_3 <- dpois(3,10))
## [1] 0.007566655
There is a 0.7% chance of exactly 3.
What is the probability that more than 10 arrive in one hour?
P_greater_10 <- 1-sum(dpois(0:10,10))
P_greater_10
## [1] 0.4169602
There is a 41.6% chance of more than 10 visits per hour.
How many would you expect to arrive in 8 hours?
EV is 10/hour * 8 hours yields 80 Visits.
What is the standard deviation of the appropriate probability
distribution?
sqrt(10)
## [1] 3.162278
The standard deviation is 3.16
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?
If the three family practice providers can see 24 patients per day,
it would equate to a rate of 8 per provider per day, or an effective
rate or 1 per hour, which is approximately a 12% utilization rate. My
recommendation would be to increase staffing as these providers will
have a serious backlog.
Your subordinate with 30 supervisors was recently accused of favoring
nurses. 10 of the subordinate’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 subordinate acted innocently, what was the probability he/she
would have selected five nurses for the trips?
phyper(4,15,15,6)
## [1] 0.9157088
There is a about a 90% chance that is valid.
How many nurses would we have expected your subordinate to send?
I would expect my subordinate to send 3 nurses as that is
representative of the available population.
How many non-nurses would we have expected your subordinate to send?
I would expect my subordinate to send 3 non-nurses as that is
representative of the available population.
The probability of being seriously injured in a car crash in an
unspecified location is about 0.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?
(1-(1-0.001)^1200)
## [1] 0.6989866
There is a 69.9% chance that the driver will be injured in the course
of a year.
In the course of 15 months?
(1-(1-0.001)^1500)
## [1] 0.7770372
There is a 77.7% chance the driver will be injured in the course of 15
months
What is the expected number of hours that a driver will drive before
being seriously injured?
1/0.001
## [1] 1000
It is expected the driver will be injured around the 1000 hour mark.
Given that a driver has driven 1200 hours, what is the probability that
he or she will be injured in the next 100 hours?
1-((1-0.001)^100)
## [1] 0.09520785
There is a 9.5% chance
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?
(1 - (pbinom (2, size = 1000, prob = 0.001)))
## [1] 0.08020934
There is a 8% chance of that failure condition.
What is the expected value?
The expected value of a binomial distribution is attempts *
probability, so I believe the expected value would be 0.001.
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?
Given the uniform distribution, I believe there is a 30-10/30= 66.67%
chance the patient will wait more than 10 minutes. But I can guarantee
you it will certainly feel a lot more than 10 minutes to them.
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?
This is the same as will the patient have already waited at least 15
minutes, or 50%.
What is the expected waiting time?
The expected wait time is 15 minutes.
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?
The expected failure time is 10 years.
What is the standard deviation?
The standard deviation is 0.1.
What is the probability that your MRI will fail after 8 years?
1-pexp(8,.1)
## [1] 0.449329
There is a 45% chance that the machine 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?
pexp(2,.1)
## [1] 0.1812692
There is an 18% chance that the machine will fail in the next two
years.