Free preview
23 lessons
Essential Probability & Statistics for ML
Free preview
Essential Probability & Statistics for ML · 23 lessons
No surprise gaps
Actually remember it
Skip what you know
One subscription. All learning paths included.
Our content is best on a larger screen
Counting sequential choices
Suppose we pick one of shirts, white or blue, and one of pairs of trousers: jeans, chinos or shorts. The white shirt can go with any of the pairs, which gives outfits. The blue shirt also gives . So there are outfits.
A tree diagram draws a choice like this. It starts at a single point and splits into one branch for each shirt, and each of those branches splits into one branch for each pair of trousers. The endpoints on the bottom row are the leaves, and each leaf is one outcome: the leaf reached through white and then jeans is the outfit .
Taking the trousers first instead gives , the same outfits. The order in which we take the stages does not change the count.
Each of the branches splits into , so the bottom row has outcomes.
The same reasoning applies to a choice made in any number of stages.
Theorem
A process carried out in stages, with options at stage , has
possible outcomes.
An ice cream shop offers cake cones and waffle cones, and chocolate, vanilla and strawberry ice cream. One cone is ordered with one flavour. Count the possible cones, taking the cone first and then taking the flavour first.
Solution
Taking the cone first, the choice has two stages:
The multiplication principle gives
The tree shows the cones on its bottom row.
Each of the branches splits into , so the bottom row has outcomes.
Taking the flavour first, the stages swap:
The multiplication principle gives
the same cones in a tree of a different shape.
Practice questions
4 questions
A set lunch has starters, main courses and puddings. A diner takes one of each. How many different set lunches are possible?
Select the correct answer:
+ 3 more questions
When multiplication applies
The multiplication principle only requires each stage to offer the same number of options whatever was chosen before it, not the same options. For example, a bike shop sells a road frame in red, black or silver, and a mountain frame in green, blue or orange. The colours differ between the frames, but each frame offers of them. In the tree of choices, each frame splits into leaves, one per bike, so the tree has leaves and there are bikes.
Now suppose the mountain frame comes in green or blue only. We are still counting the leaves of the tree, but the road frame splits into and the mountain frame into , so no single number describes the second stage and there is no product to form. Instead, we count the leaves under each frame and add the counts:
There are bikes. Whenever the branches in a row split unevenly, we count the leaves under each branch and add them.
The options differ from branch to branch, but each of the branches splits into , so the bottom row has outcomes.
A car hire firm offers a hatchback and an estate. The hatchback comes in red, white or grey, and the estate in black, blue or silver. The hatchback can be hired with a manual or an automatic gearbox, but the estate is automatic only. Does the multiplication principle count the possible hires? How many are there?
Solution
We take the stages in turn and ask of each whether it offers the same number of options whatever was chosen before it.
The third stage fails the check, so the multiplication principle does not apply, and is not the number of hires. We count car by car and add. The hatchback gives hires and the estate gives , so
There are possible hires.
Practice questions
4 questions
A phone shop sells two tariffs. The monthly tariff can be taken with any of handsets, and the yearly tariff can be taken with any of different handsets. Does the multiplication principle count the tariff-and-handset pairs on sale, and if so, how many are there?
Select the correct answer:
+ 3 more questions