# Exercise involving Bayes' Theorem

Consider the problem

During exam time, in a certain school, only 25% of the teachers warn their students in writing that they are not allowed to get up to ask questions during exam time. in writing to their students that they are not allowed to stand up and ask questions during the test. However, it has been observed that despite this warning, 20% of students do so. students do so. For mentors who do not provide such a warning, the corresponding figure is 70%. If during a test given by teacher X, an inspector suddenly bursts into the room and observes that an inspector bursts into the room and observes that there are students breaking the rule, what is the probability that the teacher did not warn in writing that it is forbidden to ask questions in the exams?

For this, consider the events

A: Teachers warn their students in writing that they are not allowed to stand up and ask questions during the test. B: Students ask a question during the test. C: An inspector in the classroom and observes that there are students who break the rule.

So, note that

$$P(C)=P(C \mid A)P(A)+P(C \mid A^c)P(A^c)$$

from where

$$P(C \mid A)=0.7$$, $$P(C \mid A^c)=0.2$$ and $$P(A^c)=0.75$$

So $$P(C) \approx 0.32$$, and finally

$$P(A \mid C) \approx 0.538$$ or $$53.8$$% is the searched value

Can this work? thanks!!

• *Stands up and asks question* What does it mean that the inspector observes that there are students breaking the rule? Like the inspector sees right at the moment a student standing up, or the inspector waits untill seing a student standing up (which happens in nearly every class)? Feb 23 at 21:26

The introduction of event $$C$$, which describes the inspector entering the room and observing rule-breaking, does not fundamentally change the calculation. Since the observation of students asking questions ($$B$$) is effectively the same as the inspector observing rule-breaking ($$C$$). Therefore, the calculation focused on determining the probability that a teacher did not provide a written warning ($$A^c$$) given that students are observed breaking the rule ($$B$$).

Let $$A$$ be the event that a teacher warns their students in writing about the rule. Let $$B$$ be the event that students get up to ask questions during the exam. We are given:

• $$P(A) = 0.25$$, which is the probability that a teacher gives a written warning.
• $$P(A^c) = 0.75$$, which is the probability that a teacher does not give a written warning
• $$P(B|A) = 0.20$$, which is the probability that students get up to ask questions given that they were warned.
• $$P(B|A^c) = 0.70$$, which is the probability that students get up to ask questions given that they were not warned.

We want to find $$P(A^c|B)$$, the probability that a teacher did not warn in writing, given that students are observed breaking the rule.

Bayes' Theorem is given by:

$$P(A^c|B) = \frac{P(B|A^c) \cdot P(A^c)}{P(B)}$$

To find $$P(B)$$, we need to calculate the total probability of students getting up to ask questions, which is:

$$P(B) = P(B|A) \cdot P(A) + P(B|A^c) \cdot P(A^c)= 0.20 \times 0.25 + 0.70 \times 0.75$$