SOLUTION: I tried this problem but I ended up with different answers, and I confused myself. If you can understand this problem, you're a genius! But really, help is greatly appreciated. I'm

Algebra ->  Probability-and-statistics -> SOLUTION: I tried this problem but I ended up with different answers, and I confused myself. If you can understand this problem, you're a genius! But really, help is greatly appreciated. I'm      Log On


   



Question 1167453: I tried this problem but I ended up with different answers, and I confused myself. If you can understand this problem, you're a genius! But really, help is greatly appreciated. I'm not sure what I am doing with this problem. Am I finding the numbers that add up to the total? Again, any help is greatly appreciated!
A large corporation has 10,000 employees that were told to take a drug test. Research shows that the test is known to be 99% effective (that is, 99% of illegal drug users will test positive). The test is also known to have a false positive rate of 2% (that is, 2% of the time those employees who test positive are not drug users). The same. Suppose that 1% of the employees in the company used illegal drugs
Employee uses illegal drugs
Tests Positive:
Tests Negative:
Total:100

Employee does not use illegal drugs
tests positive: 198
tests negative:
Total: 9900
Overall total: 10000
What is the probability that a random employee is an illegal drug user and tests positive?
What is the probability that an employee tests positive, given the employee uses illegal drugs?
What is the probability that an employee uses illegal drugs, given the employee tests positive?

Answer by CPhill(1987) About Me  (Show Source):
You can put this solution on YOUR website!
This is a classic problem in **Bayes' Theorem** and **conditional probability**. It's easy to get confused because you are working with several related probabilities (true positive, false positive, overall prevalence).
Let's first complete the table with the counts based on the total of 10,000 employees, which will make calculating the probabilities straightforward.
## 1. Completing the Contingency Table
Define the events:
* $D$: Employee uses illegal drugs (Drug User)
* $D^c$: Employee does not use illegal drugs (Non-User)
* $T^+$: Employee tests positive
* $T^-$: Employee tests negative
We are given:
* Total Employees: 10,000
* Prevalence, $P(D)$: 1% or $0.01$
* Sensitivity (True Positive Rate), $P(T^+ | D)$: 99% or $0.99$
* False Positive Rate (The question is slightly ambiguous here, but standardly, a "false positive rate of $2\%$ (that is, $2\%$ of the time those employees who test positive are not drug users)" *should* mean $P(T^+ | D^c) = 0.02$. The wording "those employees who test positive are not drug users" sounds like it's trying to describe $P(D^c | T^+)$, but given the structure of these problems, we assume it's the standard false positive rate used in medical testing.)
* **Assumption:** False Positive Rate, $P(T^+ | D^c)$: 2% or $0.02$.
### Step-by-Step Calculation of Counts
1. **Total Drug Users (D):**
$$1\% \text{ of } 10,000 = 0.01 \times 10,000 = 100$$
(This matches the total you provided in the first row.)
2. **Total Non-Users ($\mathbf{D^c}$):**
$$10,000 - 100 = 9,900$$
(This matches the total you provided in the second row.)
| Category | Drug User (D) | Non-User ($\mathbf{D^c}$) | Total |
| :--- | :--- | :--- | :--- |
| **Count** | **100** | **9,900** | 10,000 |
***
### Completing the Drug User Row (D)
* **Tests Positive ($\mathbf{T^+} | D$):** $99\%$ of drug users test positive.
$$0.99 \times 100 = \mathbf{99}$$
* **Tests Negative ($\mathbf{T^-} | D$):** $100 - 99 = \mathbf{1}$
| Employee uses illegal drugs | Tests Positive ($\mathbf{T^+}$) | Tests Negative ($\mathbf{T^-}$) | Total |
| :--- | :--- | :--- | :--- |
| **Count** | **99** | **1** | 100 |
### Completing the Non-User Row ($\mathbf{D^c}$)
* **Tests Positive ($\mathbf{T^+} | D^c$):** $2\%$ of non-users test positive (False Positive Rate).
$$0.02 \times 9,900 = \mathbf{198}$$
(This matches the number you provided.)
* **Tests Negative ($\mathbf{T^-} | D^c$):** $9,900 - 198 = \mathbf{9,702}$
| Employee does not use illegal drugs | Tests Positive ($\mathbf{T^+}$) | Tests Negative ($\mathbf{T^-}$) | Total |
| :--- | :--- | :--- | :--- |
| **Count** | **198** | **9,702** | 9,900 |
### Final Completed Contingency Table
| | Tests Positive ($\mathbf{T^+}$) | Tests Negative ($\mathbf{T^-}$) | **Total** |
| :--- | :--- | :--- | :--- |
| **Drug User (D)** | **99** | **1** | **100** |
| **Non-User ($\mathbf{D^c}$)** | **198** | **9,702** | **9,900** |
| **Total** | **297** | **9,703** | **10,000** |
***
## 2. Answering the Probability Questions
We will use the counts from the completed table (or the initial probability definitions) to answer your questions.
### 1. What is the probability that a random employee is an illegal drug user and tests positive?
This is the **joint probability**, $P(D \text{ and } T^+)$.
$$P(D \text{ and } T^+) = \frac{\text{Number of Drug Users who Test Positive}}{\text{Overall Total}}$$
$$P(D \text{ and } T^+) = \frac{99}{10,000} = \mathbf{0.0099}$$
***
### 2. What is the probability that an employee tests positive, given the employee uses illegal drugs?
This is the **conditional probability**, $P(T^+ | D)$, which is the definition of the **test sensitivity** (True Positive Rate). This value was given in the problem statement.
$$P(T^+ | D) = 99\% = \mathbf{0.99}$$
(Using the counts: $\frac{99}{100} = 0.99$)
***
### 3. What is the probability that an employee uses illegal drugs, given the employee tests positive?
This is the **posterior probability** or **Positive Predictive Value (PPV)**, $P(D | T^+)$, which requires Bayes' Theorem.
$$P(D | T^+) = \frac{\text{Number of Drug Users who Test Positive}}{\text{Total Number of Employees who Test Positive}}$$
1. **Numerator:** Number of Drug Users who Test Positive is $99$.
2. **Denominator:** Total number of employees who test positive is $99 (\text{True Positives}) + 198 (\text{False Positives}) = 297$.
$$P(D | T^+) = \frac{99}{297}$$
$$\frac{99}{297} = \frac{1}{3} \approx \mathbf{0.3333}$$
This result shows that even with a highly accurate test (99% sensitivity), because the drug use rate is so low (1%), only about **33.33%** of employees who test positive are actually drug users. Most positive results are false positives.