document.write( "Question 1166560: Due to the high incidence of crime, a company is giving its employees new and secured access to the company. Instead of leaving the doors open, they are installing a card system. To open the door, employees must insert a card into a slot. If a green light comes on, it is okay to turn the handle and open the door; if a yellow light comes on it indicates the door is locked from inside and you cannot enter. Suppose that 90% of the time when the card is inserted, the door should open because it is not locked from the inside. When the door should open, the system makes errors 2% of the time. That is, the green light will appear 98% of the time. When the door should not open, the system makes errors 5% of the time (green light appears). Suppose you inserted the card and the light is green, what is the probability the door will open?
\n" );
document.write( " \n" );
document.write( "
Algebra.Com's Answer #852744 by CPhill(2030) You can put this solution on YOUR website! The probability that the door will open, given that the light is green, is approximately **99.71%**.\r \n" ); document.write( "\n" ); document.write( "This is a classic problem that can be solved using **Bayes' Theorem**.\r \n" ); document.write( "\n" ); document.write( "## 🧠 Setup and Given Probabilities\r \n" ); document.write( "\n" ); document.write( "Let $O$ be the event that the door **Should Open** (i.e., it is not locked). \n" ); document.write( "Let $L$ be the event that the door **Should Not Open** (i.e., it is locked). \n" ); document.write( "Let $G$ be the event that the **Green Light** appears.\r \n" ); document.write( "\n" ); document.write( "### 1. Prior Probabilities (What *should* happen)\r \n" ); document.write( "\n" ); document.write( "* $P(O) = 0.90$ (90% of the time the door should open). \n" ); document.write( "* $P(L) = 1 - P(O) = 1 - 0.90 = 0.10$ (10% of the time the door should not open).\r \n" ); document.write( "\n" ); document.write( "### 2. Conditional Probabilities (Accuracy and Error Rates)\r \n" ); document.write( "\n" ); document.write( "* **Case 1: Door Should Open ($O$)** \n" ); document.write( " * System is correct (Green light $G$ appears): $P(G|O) = 0.98$. \n" ); document.write( " * System makes an error (Yellow light appears): $1 - 0.98 = 0.02$.\r \n" ); document.write( "\n" ); document.write( "* **Case 2: Door Should Not Open ($L$)** \n" ); document.write( " * System makes an error (Green light $G$ appears): $P(G|L) = 0.05$. \n" ); document.write( " * System is correct (Yellow light appears): $1 - 0.05 = 0.95$.\r \n" ); document.write( "\n" ); document.write( "### 3. Goal\r \n" ); document.write( "\n" ); document.write( "We want to find the probability that the door **will open** (event $O$) given that the **light is green** (event $G$). This is the posterior probability, $P(O|G)$.\r \n" ); document.write( "\n" ); document.write( "## 🧮 Applying Bayes' Theorem\r \n" ); document.write( "\n" ); document.write( "Bayes' Theorem states: \n" ); document.write( "$$P(O|G) = \frac{P(G|O) \cdot P(O)}{P(G)}$$\r \n" ); document.write( "\n" ); document.write( "We first need to find the **Total Probability of the Green Light ($P(G)$)** using the Law of Total Probability: \n" ); document.write( "$$P(G) = P(G|O) \cdot P(O) + P(G|L) \cdot P(L)$$\r \n" ); document.write( "\n" ); document.write( "### Step 1: Calculate $P(G)$\r \n" ); document.write( "\n" ); document.write( "$$P(G) = (0.98) \cdot (0.90) + (0.05) \cdot (0.10)$$ \n" ); document.write( "$$P(G) = 0.882 + 0.005$$ \n" ); document.write( "$$P(G) = 0.887$$\r \n" ); document.write( "\n" ); document.write( "The overall probability of seeing a green light is $88.7\%$.\r \n" ); document.write( "\n" ); document.write( "### Step 2: Calculate $P(O|G)$\r \n" ); document.write( "\n" ); document.write( "Now substitute $P(G)$ into Bayes' Theorem: \n" ); document.write( "$$P(O|G) = \frac{0.98 \cdot 0.90}{0.887}$$ \n" ); document.write( "$$P(O|G) = \frac{0.882}{0.887}$$ \n" ); document.write( "$$P(O|G) \approx 0.99436$$\r \n" ); document.write( "\n" ); document.write( "---\r \n" ); document.write( "\n" ); document.write( "## ⚠️ Interpretation of the Question\r \n" ); document.write( "\n" ); document.write( "The question asks for the probability the door **will open** given the light is green. The event \"the door should open\" ($O$) is equivalent to the event \"the door will open\" if the system is reliable.\r \n" ); document.write( "\n" ); document.write( "**If the question assumes the system is $100\%$ reliable when the light is green (which it usually does in such contexts, where $G$ means permission to open):** \n" ); document.write( "The probability the door **should open** ($O$) given the green light ($G$) is $P(O|G) \approx \mathbf{0.9944}$.\r \n" ); document.write( "\n" ); document.write( "**If the question assumes the door can *only* open if the *system allows it* (i.e., the system is a perfect intermediary):** \n" ); document.write( "$P(\text{Door will open }| G) = 1$ \n" ); document.write( "This is not the intended statistical question.\r \n" ); document.write( "\n" ); document.write( "The intended answer is the probability that the door is unlocked when the light is green:\r \n" ); document.write( "\n" ); document.write( "$$P(\text{Door will open } | G) \approx \mathbf{0.9944}$$ \n" ); document.write( " |