BAYES’ THEOREM

Bayes’ Theorem is a mathematical formula that deals with conditional probabilities. That is, it provides a means for updating probabilities based on relevant evidence that has occurred. Also, the theorem is useful when trying to solve a probability problem that seems intractable if not unsolvable at first pass. For example, suppose you find yourself standing outside of three darkened rooms labeled A, B, and C, and you know that in each room there are two people, either male (MM), female (FF), or one of each (MF). Therefore, P(M|A)=1.0; P(M|B)=0.5 and P(M|C)=0. See the following diagram:

You take a flashlight and enter a room at random where you first shine the light on a male. What is the probability that you have entered room A? In other words, find .P(A|M)

Seeing that we know the probability rule where P(M and A)=P(M∩A)=P(M)P(A│M), solving for P(A│M), we get

but here, we are stuck in a circular loop! We need to use Bayes’ Theorem to solve the problem:

 

represents the Bayes’ Theorem. So,

Bayes’ Theorem can be generalized to:

 

Hawai’ian Bar Card Trick

Other simple example applications are the Hawaiian bar card trick that I just made up or the old Monty Hall television game show. In the bar trick, suppose you take a nice trip to Maui and hang out at a local bar. Three hours later, you are bored and start thinking about a game to play with the attractive hostess. You take out three blank cards and write something down on each of the six sides. On the first card, you have Red and Red, the second card has Black and Black, and the third card has Red and Black. You then cover the cards with a napkin, and shuffle them, and proceed to ask the hostess to take one card out, showing only the top. Neither of you sees the bottom of the card. Now, suppose the top of the card says Red. You then insist that being the gentleman you are, you will also follow the young lady’s lead and select Red on the bottom. If the bottom is indeed Red, you win, but if it is Black, the hostess wins. You then proceed to tell a fake statistical tale. You say that since the top card is Red, there is no way it is the Black-Black card. Therefore, it must be either the Red-Red or Red-Black card, thereby having a 50:50 chance of being either Red or Black. And the payoff is that if you win, she brings you a free drink, but if she wins, you will double her tip (by the way, you have not yet told her what her tip was going to be, so, the double of nothing is still nothing, or the double of something fairly little is still little). The question is, what is the probability that you win or that she wins? In this situation, a Bayes-update calculation is needed, and we can boldly say that the chances of being Red or Black are not 50%.

The calculations are shown next, however, before we jump into the math, it would be nice to understand the concept a little better and see if we can answer the question as to who wins (i.e., is the bottom of the card Red or Black) using basic logic. As mentioned, it can never be the Black-Black card. Hence, we are left with only the Red-Black or Red-Red card. Now, if you had selected the Red-Black card with the Red showing, then the other side must be Black. Score one for the Black team. Next, if she had selected the Red-Red card, you both could have been looking at the first side of the Red-Red card, or the second side of the Red-Red card. And in either scenario, the other side is Red, meaning there are two possible Red outcomes. Hence, the probability of Red at the bottom is 2/3 and the probability of Black at the bottom is 1/3.

Monty Hall Game Show

In the final segment of the old Monty Hall television game show, the host, Monty, would show the contestant three closed doors. Behind these doors were three rooms, where one room had a brand new car and the other two a Billy goat each. Clearly, to win the grand prize, the contestant must select the room with the shiny new car. Now, suppose the contestant selects Room 1. Monty then proceeds to the back and sees where the car is actually located. And he then opens a room door that was not previously chosen by the contestant, and which has a goat. Monty then gives the contestant a choice: stay with your current selection or switch to the last remaining room. The question is, should the contestant stay or switch? Which option provides a higher probability of winning?

Let’s use some basic logic on this one. In the figure below, the car can be in any of the rooms and the other two rooms will be the goats. Now, suppose Room 1 was selected, and if the car is in Room 1, then staying will win and switching will lose the car. Score one for staying. In this case, Monty will open either Room 2 or Room 3 as both have Billy goats. However, if the car is in Room 2, Monte has no choice but to open Room 3 because Room 2 has the car and the contestant has already selected Room 1. Hence, switching will guarantee a win as the only room the contestant can switch to is Room 2. The same happens when the car is in Room 3, where Monty has no choice but to open Room 2, and, hence, if the switch is made, only Room 3 can be selected and it is a win. Therefore, there is a 2/3 probability of winning if the contestant switches and 1/3 if the contestant stays put.

COVID-19 TESTS: FALSE POSITIVES AND FALSE NEGATIVES

COVID-19 is highly contagious and at one point, 25% of the population has been infected. Suppose there is a low-priced rapid test kit that claims to have 99% accuracy in detecting the COVID-19 virus without PCR. Accuracy in this case means that if a person is truly sick, the test returns a positive result. However, the kit also has a possibility of false positives, creating mistakes in diagnosing healthy persons and identifying them as sick (i.e., the test shows a positive result even if the person is really not sick or infected). In the case of a person being tested with this kit shows a positive result, what is the probability that the person is really sick or infected, or shows negative when the person is, in fact, not sick or infected (correct diagnosis)? What is the probability of false positives and false negatives (incorrect diagnosis)? Is Type I or Type II error a bigger problem in this case?

An interesting phenomenon occurs in this case. Rare diseases (low population with the sickness) even with higher levels of test accuracy tend to create a higher probability of false positives, but the false negatives are still relatively low. This is why it is so hard to diagnose exotic and uncommon illnesses. With a regular percentage of the population infected and sick (e.g., 25%), a lower accuracy test will yield significantly high false positives and false negatives. However, false positives usually outweigh false negatives in this situation.