User:Kgmip/IFRS 2

conditional probability can be used to improve our prediction of events going forward. That is, knowing whether or not a runner is in scoring position helps us to predict more accurately whether or not Bernie Williams gets a hit.

Bayes' Theorem, published posthumously in the eighteenth century by Reverend Thomas Bayes, says that you can use conditional probability to make predictions in reverse! That is, if you know that Bernie Williams got a hit, you can "predict" the probability that he came up with a runner in scoring position.

Bayes' Theorem, sometimes called the Inverse Probability Law, is an example of what we call statistical inference. It is very powerful. In many situations, people make bad intuitive guesses about probabilities, when they could do much better if they understood Bayes' Theorem. Recall that the definition of conditional probability is:

[1] P(B|A) = P(A and B)/P(A) Bayes' Theorem is used to solve for the inverse conditional probability, P(A|B). By definition, [2] P(A|B) = P(A and B)/P(B) Solving [1] for P(A and B) and substituting into [2] gives Bayes' Theorem: P(A|B) = [P(B|A)][P(A)]/P(B)

We can use Bayes' Theorem to find the conditional probability of event A given the conditional probability of event B and the unconditional probabilities of events A and B.

For example, we said that Bernie Williams is a .400 hitter with a runner in scoring position. In other words, P(B|A) = 0.4. We also said that the unconditional probability of Bernie Williams coming up with a runner in scoring position is 0.2, and that the unconditional probability of Bernie Williams getting a hit is 0.3.

Therefore, if you are given the information that Bernie Williams got a hit, you can infer something about the probability that there was a runner in scoring position. Using Bayes' Theorem, P(A|B) = [P(B|A)][P(A)]/P(B) = [0.4][0.2]/[0.3] = .267

What this says is that when we are given the information that Bernie Williams got a hit, we should estimate the probability that he came up with a runner in scoring position as .267, which is higher than the unconditional probability of 0.2 that he will come up with a runner in scoring position.

Although the derivation for Bayes' theorem is straightforward, not everyone is comfortable with it. The difficult aspect to accept is that instead of using probability to predict the future, you are using it to make inferences about the past. People who think in terms of causality have trouble with this. Everyone understands what it means to say, "Bernie Williams is batting with a runner in scoring position. He has a .400 chance of getting a hit." Can you interpret the statement, "Bernie Williams got a hit. Therefore, there is a .267 chance that there was a runner in scoring position"?

Here is a classic illustration of Bayes' Theorem. Suppose that you are given two drawers. You cannot see the contents of the drawers, but you are told that one drawer contains two gold coins and the other drawer contains one gold coin and one silver coin. If someone pulls a coin at random out of drawer A and it turns out to be gold, what is the probability that drawer A is the drawer with two gold coins?

Many people would say, "The chances are fifty-fifty that drawer A is the drawer with two gold coins." However, that is not the correct answer. Although there are many ways to get the correct answer, we will use Bayes' Theorem. event 	description 	probability A 	Drawer A has two gold coins 	0.5 B 	Person chooses a gold coin out of the four coins 	0.75 B|A 	Conditional probability of choosing a gold coin from A if it has two gold coins 	1.0

Using Bayes' Theorem, we have P(A|B) = [P(B|A)][P(A)]/P(B) = [1.0][0.5]/[0.75] = 2/3

What other lines of reasoning can lead you to the correct answer that when someone picks a gold coin out of a drawer chosen at random the chances are two out of three that the drawer contains two gold coins? Very few doctors understand that a symptom is meaningless if as many as 10 percent of healthy patients have that symptom and the disease is relatively rare. Too bad they do not know Bayes' Theorem.

Here is another illustration of Bayes' Theorem. Suppose that you are diagnosed with microscopic hematuria (blood in the urine that is only visible under a microscope). This symptom occurs in 10 percent of all people and 100 percent of people with kidney cancer. You would like to know the probability that you have kidney cancer, which occurs in 0.0002 percent of all people. Remember that if we express a probability in percent, then we must multiply by .01 to get the probability as a fraction of one. event 	description 	probability A 	Someone has kidney cancer 	0.000002 B 	Someone has microscopic hematuria 	0.10 B|A 	Conditional probability of having hematuria given kidney cancer 	1.0

Using Bayes' Theorem, we have P(A|B) = [P(B|A)][P(A)]/P(B) = [1.0][0.000002]/[0.1] = .00002 That is, you still have a very low probability of kidney cancer. The reason is that the symptom of microscopic hematuria is relatively common in the healthy population. If it were true that only one hundredth of one percent of all people had microscopic hematuria, then microscopic hematuria would be a much more powerful indicator of kidney cancer. What would be the probability of kidney cancer if this were the case?

We use a contingency table to represent the probabilities of two events, A and B, which may or may not be independent. For example, event A could be that Ronit does all of her homework and event B is that Ronit passes her first quiz. The contingency table might look like this: Event	Ac	A	Row Sum B	0.3	0.4	0.7 Bc	0.2	0.1	0.3 column sum	0.5	0.5	1.0

In the contingency table, an important square is the intersection of A and B. This is the probability of the event (A and B), which in this example is 0.4, or 40 percent. The upper-left corner gives the probability of event B occurring without event A, which in this example is 0.3, or 30 percent.

The lower-left corner gives the probability that neither A nor B occurs, which is 20 percent in this example. Finally, at the intersection of A and Bc we have event A occurring without event B occurring, which in this example is a 10 percent probability.

Overall, event A has a probability of 0.5, which is the column sum under the A column. Event B has a probability of 0.7 (70 percent), which is the sum of row B. Visible Relationships

Some important relationships are visible in the contingency table. In particular:

1. P(A) = P(A and B) + P (A and Bc). 2. P(B) = P(A and B) + P (B and Ac). 3. P(A) + P (Ac) = 1. 4. P(B) + P (Bc) = 1.

Often, you are given information in a contingency table that is incomplete. You can use these relationships to fill in the rest of the information.

You can use the information in a contingency table to test for statistical independence. In particular, compare P(A and B) with P(A)P(B). In the example above, P(A and B) is 0.4, which is greater than P(A)P(B) = (0.5)(0.7) = .35, which means that A and B are positively related. In words, Ronit getting a passing grade on the test is positively related to her doing her homework. When P(A and B) is less than P(A)P(B), then the two events are negatively related. When P(A and B) = P(A)P(B), the two events are statistically independent.

Conditional Probability

Conditional probability is an invisible component of a contingency table. It can easily be calculated from the table.

The conditional probability of B given A, written as P(B|A) = P(A and B)/P(A). In the example, P(B|A) = .4/.5 = .8, or 80 percent.

The conditional probability of A given B, written as P(A|B) = P(A and B)/P(B). In the example, P(B|A) = .4/.7 = .43, or 43 percent.

Sometimes, you will be given three pieces of information: P(A), P(B), and P(B|A). You can use this information to fill out the entire contingency table.

1. Compute P(A and B) by multiplying P(B|A) times P(A). 2. Compute P(Ac and B) by subtracting P(A and B) from P(A). 3. Compute P(Bc and A) by subtracting P(A and B) from P(B). 4. Compute P(Ac and Bc) by subtracting the the sum of the probabilities calculated in the first three steps from 1.0.