Read · 2 min

The magical two-way table

The reason why conditional probability is hard at first is that one is confused by all the different scenarios and probabilities. A two-way table, however, can make an otherwise complicated problem quite simple.

An Example

To demonstrate, let's start with a problem that perennially perplexes doctors.

A horrible disease is spreading around that affects 1 in 100,000 people. Scientists have created a test that will predict whether you have the disease with 99% accuracy. If you have it, there is a 99% chance it returns positive and 1% chance it returns negative, and vice versa if you don't have it. You take the test, and suddenly, the test returns positive! Do you panic?

Guess the chance that you actually have the disease.

About one in one thousand. Little reason to worry about.

But wait! The test had 99% accuracy! Maybe it could work better...

That is our intuition misleading us, as with all conditional probability problems. However, we can clarify that by using a two-way table.

The columns will separate the people who have or don't have the disease in actuality, and the rows will separate the people by test result.

Has DiseaseDoesn’t Have DiseasePositiveNegative\begin{array}{c|c|c|} & \text{Has Disease} & \text{Doesn't Have Disease} \\ \hline \text{Positive} & & \\ \hline \text{Negative} & & \\ \hline \end{array}

Now to fill our table. Let's say we have 10 million people who take the test. Since 1 in 100,000 people have the disease, there will be about 100 people in the sample with the disease. 99 will have tests returning positive, and 1 unfortunate victim will have a test saying negative.

Has DiseaseDoesn’t Have DiseasePositive99Negative1\begin{array}{c|c|c|} & \text{Has Disease} & \text{Doesn't Have Disease} \\ \hline \text{Positive} & 99 & \\ \hline \text{Negative} & 1 & \\ \hline \end{array}

Now let's think about the remaining 9,999,900 people. 99% of those will have a negative result (9,899,901 people), and 1% (99,999 people) will get a false positive.

Has DiseaseDoesn’t Have DiseasePositive9999,999Negative19,899,901\begin{array}{c|c|c|} & \text{Has Disease} & \text{Doesn't Have Disease} \\ \hline \text{Positive} & 99 & 99,999 \\ \hline \text{Negative} & 1 & 9,899,901 \\ \hline \end{array}

So now we can answer: given that you have a positive result, what is the chance you have the disease?

We can safely throw away the negative row, since the result was positive. So are you more likely to be part of: the 99 true positives, or the 99,999 false positives?

Well, the chance you have the disease is the number of true positives over the total, or 99100098\frac{99}{100098}, which is about one in 1000.

Think about this: why do tests become worse when the likelihood of something becomes rarer?

We can also use the two-way table when looking at probability of something being randomly selected.

Video

(Video) Two Way Tables in Conditional Probability

by Joel Speranza Math

In this video by Joel Speranza Math, you will learn how to use two-way tables to solve for conditional probability.

Illustrated · 1 min

Conditional Probability: Two-Way Tables

A two-way table helps organize information about two different groups or choices. It can also help us find conditional probability, which is the probability of one event happening when we already know that another event is true. In the table, the condition tells us which row or column to focus on.

Conditional Probabilities: Two Way Tables

Image source: by Anusha Rahman

For example, suppose we want to know the probability that a student plays an instrument, given that the student plays a sport. We should only look at the students who play a sport. In this group, 2020 students play an instrument out of 5050 students total.

So, the conditional probability is: 2050=25\frac{20}{50} = \frac{2}{5}.

The phrase “given that” is an important clue because it tells us to shrink our group before finding the probability. Instead of using everyone in the table, we use only the people who match the condition. This is what makes conditional probability different from regular probability.

In the next lesson, we will learn how to use conditional probability to find independence. We will then round out this set of lessons with the binomial theorem.

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems