document.write( "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! \r
\n" );
document.write( "\n" );
document.write( " 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\r
\n" );
document.write( "\n" );
document.write( "Employee uses illegal drugs\r
\n" );
document.write( "\n" );
document.write( "Tests Positive:\r
\n" );
document.write( "\n" );
document.write( "Tests Negative:\r
\n" );
document.write( "\n" );
document.write( "Total:100\r
\n" );
document.write( "
\n" );
document.write( "\n" );
document.write( "Employee does not use illegal drugs \r
\n" );
document.write( "\n" );
document.write( "tests positive: 198\r
\n" );
document.write( "\n" );
document.write( "tests negative: \r
\n" );
document.write( "\n" );
document.write( "Total: 9900\r
\n" );
document.write( "\n" );
document.write( "Overall total: 10000\r
\n" );
document.write( "\n" );
document.write( "What is the probability that a random employee is an illegal drug user and tests positive?\r
\n" );
document.write( "\n" );
document.write( "What is the probability that an employee tests positive, given the employee uses illegal drugs?\r
\n" );
document.write( "\n" );
document.write( "What is the probability that an employee uses illegal drugs, given the employee tests positive?\r
\n" );
document.write( "\n" );
document.write( " \n" );
document.write( "
Algebra.Com's Answer #852328 by CPhill(1987) 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).\r \n" ); document.write( "\n" ); document.write( "Let's first complete the table with the counts based on the total of 10,000 employees, which will make calculating the probabilities straightforward.\r \n" ); document.write( "\n" ); document.write( "## 1. Completing the Contingency Table\r \n" ); document.write( "\n" ); document.write( "Define the events: \n" ); document.write( "* $D$: Employee uses illegal drugs (Drug User) \n" ); document.write( "* $D^c$: Employee does not use illegal drugs (Non-User) \n" ); document.write( "* $T^+$: Employee tests positive \n" ); document.write( "* $T^-$: Employee tests negative\r \n" ); document.write( "\n" ); document.write( "We are given: \n" ); document.write( "* Total Employees: 10,000 \n" ); document.write( "* Prevalence, $P(D)$: 1% or $0.01$ \n" ); document.write( "* Sensitivity (True Positive Rate), $P(T^+ | D)$: 99% or $0.99$ \n" ); document.write( "* 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.) \n" ); document.write( " * **Assumption:** False Positive Rate, $P(T^+ | D^c)$: 2% or $0.02$.\r \n" ); document.write( "\n" ); document.write( "### Step-by-Step Calculation of Counts\r \n" ); document.write( "\n" ); document.write( "1. **Total Drug Users (D):** \n" ); document.write( " $$1\% \text{ of } 10,000 = 0.01 \times 10,000 = 100$$ \n" ); document.write( " (This matches the total you provided in the first row.)\r \n" ); document.write( "\n" ); document.write( "2. **Total Non-Users ($\mathbf{D^c}$):** \n" ); document.write( " $$10,000 - 100 = 9,900$$ \n" ); document.write( " (This matches the total you provided in the second row.)\r \n" ); document.write( "\n" ); document.write( "| Category | Drug User (D) | Non-User ($\mathbf{D^c}$) | Total | \n" ); document.write( "| :--- | :--- | :--- | :--- | \n" ); document.write( "| **Count** | **100** | **9,900** | 10,000 |\r \n" ); document.write( "\n" ); document.write( "***\r \n" ); document.write( "\n" ); document.write( "### Completing the Drug User Row (D)\r \n" ); document.write( "\n" ); document.write( "* **Tests Positive ($\mathbf{T^+} | D$):** $99\%$ of drug users test positive. \n" ); document.write( " $$0.99 \times 100 = \mathbf{99}$$ \n" ); document.write( "* **Tests Negative ($\mathbf{T^-} | D$):** $100 - 99 = \mathbf{1}$\r \n" ); document.write( "\n" ); document.write( "| Employee uses illegal drugs | Tests Positive ($\mathbf{T^+}$) | Tests Negative ($\mathbf{T^-}$) | Total | \n" ); document.write( "| :--- | :--- | :--- | :--- | \n" ); document.write( "| **Count** | **99** | **1** | 100 |\r \n" ); document.write( "\n" ); document.write( "### Completing the Non-User Row ($\mathbf{D^c}$)\r \n" ); document.write( "\n" ); document.write( "* **Tests Positive ($\mathbf{T^+} | D^c$):** $2\%$ of non-users test positive (False Positive Rate). \n" ); document.write( " $$0.02 \times 9,900 = \mathbf{198}$$ \n" ); document.write( " (This matches the number you provided.) \n" ); document.write( "* **Tests Negative ($\mathbf{T^-} | D^c$):** $9,900 - 198 = \mathbf{9,702}$\r \n" ); document.write( "\n" ); document.write( "| Employee does not use illegal drugs | Tests Positive ($\mathbf{T^+}$) | Tests Negative ($\mathbf{T^-}$) | Total | \n" ); document.write( "| :--- | :--- | :--- | :--- | \n" ); document.write( "| **Count** | **198** | **9,702** | 9,900 |\r \n" ); document.write( "\n" ); document.write( "### Final Completed Contingency Table\r \n" ); document.write( "\n" ); document.write( "| | Tests Positive ($\mathbf{T^+}$) | Tests Negative ($\mathbf{T^-}$) | **Total** | \n" ); document.write( "| :--- | :--- | :--- | :--- | \n" ); document.write( "| **Drug User (D)** | **99** | **1** | **100** | \n" ); document.write( "| **Non-User ($\mathbf{D^c}$)** | **198** | **9,702** | **9,900** | \n" ); document.write( "| **Total** | **297** | **9,703** | **10,000** |\r \n" ); document.write( "\n" ); document.write( "***\r \n" ); document.write( "\n" ); document.write( "## 2. Answering the Probability Questions\r \n" ); document.write( "\n" ); document.write( "We will use the counts from the completed table (or the initial probability definitions) to answer your questions.\r \n" ); document.write( "\n" ); document.write( "### 1. What is the probability that a random employee is an illegal drug user and tests positive?\r \n" ); document.write( "\n" ); document.write( "This is the **joint probability**, $P(D \text{ and } T^+)$.\r \n" ); document.write( "\n" ); document.write( "$$P(D \text{ and } T^+) = \frac{\text{Number of Drug Users who Test Positive}}{\text{Overall Total}}$$ \n" ); document.write( "$$P(D \text{ and } T^+) = \frac{99}{10,000} = \mathbf{0.0099}$$\r \n" ); document.write( "\n" ); document.write( "***\r \n" ); document.write( "\n" ); document.write( "### 2. What is the probability that an employee tests positive, given the employee uses illegal drugs?\r \n" ); document.write( "\n" ); document.write( "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.\r \n" ); document.write( "\n" ); document.write( "$$P(T^+ | D) = 99\% = \mathbf{0.99}$$ \n" ); document.write( "(Using the counts: $\frac{99}{100} = 0.99$)\r \n" ); document.write( "\n" ); document.write( "***\r \n" ); document.write( "\n" ); document.write( "### 3. What is the probability that an employee uses illegal drugs, given the employee tests positive?\r \n" ); document.write( "\n" ); document.write( "This is the **posterior probability** or **Positive Predictive Value (PPV)**, $P(D | T^+)$, which requires Bayes' Theorem.\r \n" ); document.write( "\n" ); document.write( "$$P(D | T^+) = \frac{\text{Number of Drug Users who Test Positive}}{\text{Total Number of Employees who Test Positive}}$$\r \n" ); document.write( "\n" ); document.write( "1. **Numerator:** Number of Drug Users who Test Positive is $99$. \n" ); document.write( "2. **Denominator:** Total number of employees who test positive is $99 (\text{True Positives}) + 198 (\text{False Positives}) = 297$.\r \n" ); document.write( "\n" ); document.write( "$$P(D | T^+) = \frac{99}{297}$$\r \n" ); document.write( "\n" ); document.write( "$$\frac{99}{297} = \frac{1}{3} \approx \mathbf{0.3333}$$\r \n" ); document.write( "\n" ); document.write( "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. \n" ); document.write( " |