Probability — Chance & Counting
Counting — permutations & combinations
continues from lesson 1 — values defined earlier in the course stay live here
ELI5: before you can take a fraction of outcomes, you must count them.
- Permutations = arrangements where order matters (a podium: gold, silver, bronze).
- Combinations = groups where order does not (a committee of 3).
The engine has both built in.
= 10 runners, ordered top-3: 720
= unordered groups of 3: 120
✓ pass each unordered trio can be ordered 3! = 6 ways
Real-world hook: combinations give lottery odds (combinations(49, 6) ≈ 14 million) and the number of possible poker hands; permutations count passwords and race finishes.
Try it yourself: a pizza shop has 6 toppings. How many ways can you choose 3 of them (order doesn't matter)?
= ✏️ Your turn: count the 3-topping choices from 6. Order doesn't matter, so use combinations(6, 3).
✓ pass green when it matches combinations(6, 3)