Suppose that 1% of the employees of a certain company use illegal drugs. This company performs random drug tests that return positive results 99% of the time if the person is a drug user. However, it also has a 2% false positive rate. The results of the drug test are known to be independent from test to test for a given person.

a) Steve, an employee at the company, has a positive test. What is the probability that he is a drug user?

b) Knowing he failed his first test, what is the probability that Steve will fail his next drug test?

c) Steve just failed his second drug test. Now, what is the probability that he is a drug user?

Respuesta :

Answer:

a) Pr(drug user| positive test) = 0.3333

b) The probability that he will failed his first test = 0.9703

c) the probability that he is a drug user since  failed his second drug test

= 0.961165

Step-by-step explanation:

From the given information:

Suppose that 1% of the employees of a certain company use illegal drugs.

Probability of illegal drug user = 0.01

Probability of user that do not use drug = 1 - 0.01 = 0.99

From the person that is a illegal drug user, the company performs random drug tests that return positive results = 0.99

Therefore, the negative result for illegal drug user = 1 - 0.99 = 0.01

However, it also has a 2% false positive rate.

i.e the probability of the user that do not use drug has a positive result of 2% = 0.02

Thus, the probability of the user that do not use drug has a negative result of = 1 - 0.02

= 0.98

We are tasked to answer the following questions.

a) Steve, an employee at the company, has a positive test. What is the probability that he is a drug user?

i.e This employee we are taking about is a drug user and he has a positive test.

Thus;

Pr(drug user| positive test) = [tex]\dfrac{0.99 \times 0.01}{0.99 \times 0.01+ 0.02 \times 0.99}[/tex]

Pr(drug user| positive test) = [tex]\dfrac{0.0099}{0.0099+0.0198}[/tex]

Pr(drug user| positive test) = [tex]\dfrac{0.0099}{0.0297}[/tex]

Pr(drug user| positive test) = 0.3333

b) Knowing he failed his first test, what is the probability that Steve will fail his next drug test?

The probability that he will failed his first test = ((0.01 × 0.01) + (0.99×0.98))

The probability that he will failed his first test = ( 1 × 10⁻⁴ + 0.9702)

The probability that he will failed his first test = 0.9703

c)  Steve just failed his second drug test. Now, what is the probability that he is a drug user?

the probability that he is a drug user since he  failed his second drug test using Bayes theorem can be expressed as:

= [tex]\dfrac{0.01 \times(0.99\times 0.99)}{0.01 \times (0.99 \times0.99)+ 0.99(0.02 \times0.02)}[/tex]

the probability that he is a drug user since failed his second drug test

= [tex]\dfrac{0.01 \times(0.9801)}{0.01 \times (0.9801)+ 0.99(4 \times 10^{-4})}[/tex]

the probability that he is a drug user since  failed his second drug test

= [tex]\dfrac{0.009801}{0.009801+ 3.96 \times 10^{-4}}[/tex]

the probability that he is a drug user since  failed his second drug test

= 0.961165