ViewWiki

Lesson 2 of 4

Trees with conditions.

About 25 minutes · 5 practice questions

A tree with a conditional chance on every branch: split a hall of $1000$ people into ill and healthy, then by test result, multiply along a path, add paths, and draw marbles without putting back.

Step 1 of 5 · Splitting by illness

Step 1 of 5

Splitting by illness

In a sports hall 10001000⁠ people stand and take a test for a disease. The chart beside the Scene is a tree of the situation: from the root, 10001000⁠, two branches go out, ill and healthy, and from each of those two more, a positive and a negative result. Instead of chances, the branches carry numbers of people, which makes the sums much easier.

Here How common the disease is is 10%10\%⁠, and Test accuracy 90%90\%⁠: the test catches 90%90\%⁠ of the ill and clears 90%90\%⁠ of the healthy. The ill are shown in red.

The rate on every second branch is a conditional chance: 90%90\%⁠ is the chance of a positive result given that the person is ill.

To the question

Step 2 of 5

The other branch

The healthy take the test too, and it gets 10%10\%⁠ of them wrong. Someone healthy who tests positive is a false positive. Someone ill who tests negative is a false negative.

To the question

Step 3 of 5

Every positive

The board now walks every positive out to the two mats at the front: the ill on the left, the healthy on the right. Two paths on the tree end in a positive result, and the number of positives is the sum of both.

To the question

Step 4 of 5

Without putting back

The same trees work for any experiment in stages. On every branch write the chance given everything that happened earlier on the path, and multiply along a path:

P(A∩B)=P(A)⋅P(B∣A)P(A \cap B) = P(A) \cdot P(B \mid A)⁠

This is the multiplication rule in full. When the stages are independent, P(B∣A)=P(B)P(B \mid A) = P(B)⁠, and it goes back to the simple rule. When you draw marbles from a bag without putting them back, the second stage depends on the first.

To the question

Step 5 of 5

Along a path

Back to the hall, this time with a disease that affects 5%5\%⁠. The path “ill, then positive” is two branches in a row, so multiply the two rates.

To the question

Still of the Bayesian reasoning and evidence 3D scene
Interactive scene

Loading the interactive version…

Each step sets up the Scene for you, and a control marked “fixed” stays put for that step.

To the experiment

Practice · Calculate

There are 10001000⁠ people in the hall, and 10%10\%⁠ of them are ill. The test catches 90%90\%⁠ of the ill. How many people are ill and test positive?

To the experiment

Practice · Calculate

The test clears 90%90\%⁠ of the healthy, and gets 10%10\%⁠ of them wrong. How many healthy people test positive?

To the experiment

Practice · Calculate

One person is picked at random from the hall. What is the chance their result is positive? Give it as a per cent, the number only.

To the experiment

Practice · Calculate

A bag holds 55⁠ marbles, 22⁠ of them red. You draw two marbles one after the other, without putting back. What is the chance both are red? Give it as a per cent, the number only.

To the experiment

Practice · Calculate

Now 5%5\%⁠ of the hall are ill, and the test is still 90%90\%⁠ accurate. What is the chance that a random person is both ill and positive? Give it as a per cent, the number only.