Probability trees, with and without replacement ·… | StemPy Lab
Course 3.2·Lesson 2 of 3
Probability trees, with and without replacement
A probability tree shows an experiment step by step: multiply along a path, add the paths you want. Drawing without replacement changes the branches after the first draw. From a big population, though, the change is so small that the draws are almost independent, which is what every survey relies on.
about 25 min1 simulation1 practice question
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
draw a probability tree and use it: multiply along a path, add across paths;
find chances for draws with and without replacement;
explain why draws from a big population can be treated as independent.
Two phones from a batch
A made-up batch holds 10 phones, and 3 of them are faulty. An inspector picks 2 phones, one after the other, and does not put the first back. What is the chance that both are faulty?
The first phone is faulty with probability 103. If it is, the batch now holds 2 faulty phones among 9. So the second is faulty with probability 92. Both are faulty with probability
103×92=906=151≈0.0667
Probability trees
A probability tree draws each step as a set of branches.
The branches from one point add up to 1.
Multiply along a path to get the chance of that whole path.
Add the paths that make the event you want.
A probability tree for picking two phones without replacement from a batch of 10 phones with 3 faulty. The first pick is faulty with probability 3 over 10 or good with 7 over 10. After a faulty phone, the second pick is faulty with 2 over 9 or good with 7 over 9. After a good phone, it is faulty with 1 over 3 or good with 2 over 3, which are 3 over 9 and 6 over 9 in lowest terms. The four ends show the product along each path.
For the phones, the three results are both faulty 151, exactly one faulty 157 and none faulty 157. Exactly one has two paths, faulty then good and good then faulty. Each is 103×97=307, and together they make 3014=157. Check: 151+157+157=1.
With and without replacement
If the inspector put the first phone back, the batch would be the same for the second pick. The picks would be independent, and both faulty would have probability 0.3×0.3=0.09. Without replacement it is 0.0667. In a small batch, the difference is large.
Now take a big batch: 10000 phones, with the same share of 30% faulty. Without replacement,
100003000×99992999≈0.08998
That is almost exactly 0.09. Taking one phone out of 10000 hardly changes the share that is left. This is why a survey of 1000 people from a whole country can treat the people as independent picks, even though nobody is asked twice. A common rule of thumb says this is safe when the sample is less than about a tenth of the population.
Try it in Python
The program works out the two phone answers in exact fractions, and then the big batch.
A tree with data on its branches
Trees are not only for bags and batches. A made-up record says that a train is late on 20% of days. On a late day, a student misses the start of the first lesson with probability 0.5. On other days, the chance is 0.05. The two paths that end in "misses" give 0.2×0.5+0.8×0.05=0.1+0.04=0.14.
Your turn
The usual mistakes
Keeping the first chance for the second draw. Without replacement, both the top and the bottom of the fraction change.
Adding along a path. Along a path you multiply. You add only different paths.
Missing an order. "Exactly one faulty" can happen as faulty then good, or good then faulty.
Worrying about replacement in a huge population. Then the two kinds of draw give almost the same answer.
Remember these
In a tree, the branches from a point add up to 1; multiply along a path; add the paths.
Without replacement, the branches after the first draw use the new counts.
From a big population, draws without replacement are almost independent.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
A bag holds 4 red and 6 white beads. Two are taken without replacement. Find the probability that both are white.
The same bag is used, but the first bead is put back. Find the probability that both are white.
In a tree, the branches from one point are 0.35, 0.4 and a third branch. What is the third branch?
A made-up company has 8000 workers, and 20% of them cycle to work. Two workers are picked at random without replacement. About how likely is it that both cycle?
Why do the paths of a tree always add up to 1?
References
OpenStax, Introductory Statistics, Chapter 3, the sections on independent events and on tree and Venn diagrams.
Enroll free in Independence, Trees and Streaks
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.