Problem 1:

(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?

Solution

\(P(Disease∣Positive)= P(Postive|Disease)*P(Disease)|P(Positive)\)

\(P(Disease∣Positive)\ is\ the\ probability\ of\ having\ the\ disease\ given\ a\ positive\ test\ result\)

\(P(Positive|Disease)\ is\ the\ sensitivity\ of\ the\ test\)

\(P(Disease)\ is\ the\ prevalence\ rate\ of\ the\ disease\)

\(P(Positive)\ is\ the\ probability\ of\ testing\ positive\)

\(P(Positive∣NoDisease)\ is\ the\ probability\ of\ having\ no\ disease\ but\ given\ a\ positive\ test\ result\)

\(P(Positive∣NoDisease = 1 - specificity = 1-0.98 = 0.02\)

\(P(NoDisease) = 1 - P(Disease)\)

\(Mathematically:\ \)

\(P(Positive) = 0.96*0.00001+0.02*(1−0.00001)=0.0000096+0.0198 = 0.0197996\)

\[P(Disease∣Positive) = \frac{0.96*0.00001}{0.0197996} = 0.0004855\]

\[The\ probability\ of\ having\ the\ disease\ is\ approximately\ 0.04855\ percent \]

First - year cost for treating 100,000 people

\(Total\ Cost\ = (Number\ of\ Individuals) * (Cost\ per\ Positive\ Case) + (Number\ of\ People) * (cost\ of\ test\ )\)

Total Cost = 100,000 x $100,000 + 100,000 x $1,000

Total Cost = $10,000,000,000 + $100,000,000

Total Cost = $10,100,000,000

Problem 2:

(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?

Solution

In binomial distribution, n is the number of trials which is the 24 number of months.While p is the probability of success which is given as 0.05. k is the number of success to find

\(Mathematically:\)

\[P_{k} = \binom{n}{k}p^{k}k^{n-k}\]

P = binomial probability

k = number of times for a specific outcome within n trials

= number of combinations

p = probability of success on a single trial

q = probability of failure on a single trial

n = number of trials

  1. Probability that, after 24 months, you received exactly 2 inspections

\[P(X=2) = \binom{24}{2}0.05^{2}(1-0.05)^{24-2} = 0.2214\]

  1. Probability that, after 24 months, you received 2 or more inspections

\[P(X≥2) = 1−P(X<2) = 0.7786\]

  1. probability that your received fewer than 2 inspections

\[P(X=0) = \binom{24}{0}0.05^{0}(1-0.05)^{24-0}\]

\[P(X=1) = \binom{24}{1}0.05^{1}(1-0.05)^{24-1}\]

\[P(X<2) = P(X=0)+P(X=1) = 0.2214\]

  1. The expected number of inspections

\[E(X) = n*p = 24*0.05 = 1.2\]

  1. The standard deviation

\[σ = \sqrt{n*p*(1-P)} = \sqrt{24*0.05*(1-0.05)} = 1.09\]

Problem 3:

(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?

Solution

Poisson distribution uses the formula:

\[P(X=k)= \frac{λ^{k}e^{-λ}}{k!}\]

λ = 10

e = Euler’s constant = 2.718

  1. Probability that exactly 3 patients arrive in one hour?

\[P(X=3)= \frac{10^{3}e^{-10}}{3!} = 0.0075\]

  1. Probability that more than 10 arrive in one hour

\[P(X=10)= \frac{10^{10}e^{-10}}{10!}\]

\[P(X>10)= 1 - \frac{10^{10}e^{-10}}{10!} = 0.522\]

  1. How many would you expect to arrive in 8 hours?

\[E(X) = λ*time = 10*8 = 80\]

  1. The standard deviation

\[σ = \sqrt{λ} = \sqrt{10} = 3.16\]

  1. Percent utilization and recommendations for three family practice providers

\[Percent\ Utilization = \frac{80}{72} * 100\% = 111\% \]

Problem 4:

(Hypergeometric). Your subordinate with 30 supervisors was recently accused of favoring nurses. 15 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? How many nurses would we have expected your subordinate to send? How many non-nurses would we have expected your subordinate to send?

Solution

\[P(X=k) = \frac{\binom{n_{1}}{k}\binom{n_{2}}{k}}{\binom{n_{3}}{k}}\]

\(n_{1}\) = The number of nurses in the company

\(n_{2}\) = The number of non-nurses in the company

\(n_{3}\) = Total number of subordinates in the company

k = The number of selections made (trips to Disney World)

  1. Probability that your subordinate would have selected five nurses for the trips

\[P(X=5) = \frac{\binom{15}{5}\binom{15}{6-5}}{\binom{15}{5}} = 0.0759\]

  1. Expected number of nurses that should have been sent:

\[E(X) = \frac{N_{1}*n}{N} \]

\(N_{1}\) = Number of nurses in the company = 15

\(n\) = Number of selection made = 6

\(N\) = Total people involved = 30

\[E(N) = \frac{15*6}{30} = 3 \]

  1. Expected number of non-nurses that should have been sent:

\[E(nN) = n - E(N)\]

\[E(nN) = 6 - 3 = 3 \]

Problem 5:

(Geometric). 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? 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?

Solution

  1. Probability that the driver will be seriously injured during the course of the year

Probability of being seriously injured in a car crash per hour = 0.1%

Probability of no injury for 1200 hours = \((1-p)^{1200} = (1 - 0.001)^{1200} = 0.999^{1200} = 0.3010\)

P(Injury in a year) = 1 − P(No Injury for 1200 hours = 0.698)

  1. Probability that the driver will be seriously injured during the course of 15 months:

15 months transverse is equivalent to 4500 hrs.

Probability of no injury for 1200 hours = \((1-p)^{4500} = (1 - 0.001)^{4500} = 0.999^{4500} = 0.0111\)

  1. Expected number of hours that a driver will drive before being seriously injured:

\[E(X) = \frac{1}{p}\]

\[E(X) = \frac{1}{0.001} = 1000 \]

  1. Probability that the driver will be injured in the next 100 hours, given that they have driven 1200 hours:

\[P(Injury\ in\ next\ 100\ hours∣No\ Injur\ in\ first\ 1200\ hours)= 1- (1−p)^{100}\]

\[1 - (0.999)^{100} = 0.095\]

Problem 6:

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?

Solution

Using Poisson distribution which uses the formula:

\[P(X=k)= \frac{λ^{k}e^{-λ}}{k!}\]

λ = 1

e = Euler’s constant = 2.718

The summation of the probability for k=3,4,5,… gives the total probability of failing more than twice.

Programmatically

# Average rate of generator failure
λ <- 1/1000  # 1 failure per 1000 hours

# Probability of failing more than twice in 1000 hours
prob_more_than_two <- 1 - ppois(2, λ)

# The Expected value (average number of failures) in 1000 hours
expected_value <- λ

cat("Probability of failing more than twice in 1000 hours:", prob_more_than_two, "\n")
## Probability of failing more than twice in 1000 hours: 1.665418e-10
cat("Expected value (average number of failures) in 1000 hours:", expected_value, "\n")
## Expected value (average number of failures) in 1000 hours: 0.001

Problem 7:

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?

Solution

# Define max and min wait times
min_wait_time <- 0
max_wait_time <- 30

# Probability that the patient will wait more than 10 minutes
pr_wait_more_than_10 <- 1 - (10 / (max_wait_time - min_wait_time))


# Probability that the patient will wait at least another 5 minutes after waiting for 10 minutes
prob_wait_at_least_another_5 <- 1 - (5 / (max_wait_time - 10))

# Expected waiting time
expected_waiting_time <- (min_wait_time + max_wait_time) / 2

cat("Probability that the patient will wait more than 10 minutes:", pr_wait_more_than_10, "\n")
## Probability that the patient will wait more than 10 minutes: 0.6666667
cat("Probability that the patient will wait at least another 5 minutes after 10 minutes of waiting:", prob_wait_at_least_another_5, "\n")
## Probability that the patient will wait at least another 5 minutes after 10 minutes of waiting: 0.75
cat("Expected waiting time:", expected_waiting_time, "minutes\n")
## Expected waiting time: 15 minutes

Problem 8:

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?

Solution

# Reciprocal of the manufacturer's lifetime
λ <- 1/10

# Expected failure time
exptd_failure_time <- 1 / λ

# Standard deviation
std_ <- 1 / λ

# Probability of failure after 8 years
prob_failure_after_8_years <- 1 - exp(-λ * 8)

# Probability of failure in the next 2 years, given 8 years have already passed
prob_failure_next_2_years <- (1 - exp(-λ * 10)) / (1 - exp(-λ * 8))

cat("Expected failure time:", exptd_failure_time, "years\n")
## Expected failure time: 10 years
cat("Standard deviation:", std_, "years\n")
## Standard deviation: 10 years
cat("Probability of failure after 8 years:", prob_failure_after_8_years, "\n")
## Probability of failure after 8 years: 0.550671
cat("Probability of failure in the next 2 years, given 8 years have already passed:", prob_failure_next_2_years, "\n")
## Probability of failure in the next 2 years, given 8 years have already passed: 1.14791