Conditional probability

On first pass, Bayes rule would seem to be just a trivial extension of the concept of conditional probability. I begin by reviewing the definition of conditional probability.

Let Fig. 1 represent a sample space S consisting of 12 equally likely sample points. The events A and B are the subsets of sample points shown in the figure. Under the equally likely assumption we have the following.

Conditional probabilities effectively change the sample space. For instance, P(A|B) restricts the sample space to B and is calculated under the equally likely scenario by counting up the number of sample points that are both in A and B and dividing by the number of sample points in B. Formally we have

 

 

Example of Bayes' Rule

An example of the use of Bayes' theorem is the evaluation of drug test results. Suppose a certain drug test is 99% sensitive and 99% specific, that is, the test will correctly identify a drug user as testing positive 99% of the time, and will correctly identify a non-user as testing negative 99% of the time. This would seem to be a relatively accurate test, but Bayes' theorem can be used to demonstrate the relatively high probability of misclassifying non-users as users. Let's assume a corporation decides to test its employees for drug use, and that only 0.5% of the employees actually use the drug. What is the probability that, given a positive drug test, an employee is actually a drug user?