Join · scan

OTTO-PR3

ottolearn.org/join

Module 2 · Probability Foundations · PR-3

Counting Techniques
"How many ways can a week of nights unfold?"

The reader said yes: he'll keep a two-week sleep diary. Maya sketches the follow-up piece and hits a wall immediately — one week of nights, each either short or okay, can unfold in more ways than she can list, and she still has to schedule interviews and pick a feature group from her volunteers. Earlier in this module, listing outcomes worked. Today it stops working — and three formulas take over.

Live session · join with code OTTO-PR3 · ottolearn.org/join

Same rules as always: vote before I explain, every poll is anonymous, and changing your mind after discussion is the goal.

Today · the diary follow-up Maya is planning

One follow-up piece, five counting questions.

Five questions, three formulas, one decision test. Every one starts with your vote.

Recall · last class · 45 seconds

Warm-up · 60 seconds · anonymous

Hold your vote — the first concept settles it. And notice the stakes: if Maya can't count the possible weeks, she can't say whether the reader's week was unusual.

Core concept 1 · C1

The Fundamental Counting Principle: choices in sequence multiply

Maya's diary week is a process in stages: night 1 has 2 outcomes; for each of those, night 2 has 2; for each of those pairs, night 3 has 2 — and so on.

Multiply the stages

A multi-stage process with \(m_1\) choices at stage 1, then \(m_2\), then \(m_3\)… has \(m_1 \times m_2 \times \cdots\) complete sequences. The diary week: \(2 \times 2 \times \cdots \times 2 = 2^7 = 128\) patterns — the warm-up, settled.

\(m_1 \times m_2 \times \cdots \times m_k\)

Why multiply, not add

Each stage-1 choice pairs with every stage-2 choice — a tree fanning out. Adding counts the branches at one stage; multiplying counts the complete paths, and an outcome is a complete path.

The fine print: independence

The count at each stage must not depend on earlier choices. A 4-digit code with repeats allowed: \(10^4\). Require four different digits and the stages start shrinking — \(10 \times 9 \times 8 \times 7\). That shrinking pattern gets its own name in concept 3.

One habit: read any counting problem as stages, and ask what each stage offers. If the offers never shrink, the counting principle finishes the job on its own.

See it · C1

Watch the tree fan out

Predict first: the tree shows every complete path. Set stage 1 to 4 and stage 2 to 3 — how many paths appear? Then switch on No repeats — what happens to each stage's count, and why?

Interactive tree diagram for the Fundamental Counting Principle. Use the buttons to set the number of choices at Stage 1 and Stage 2, optionally add a Stage 3, and switch on no-repeats mode to make each stage draw from a depleting pool. The tree, its description, and the running product update automatically.

Stage 1   =
Stage 2   =
2 Stage-1 branches, each fanning into 3 Stage-2 outcomes — 6 paths.
Running product

Practice · the counting principle · fresh numbers on demand

Core concept 2 · C2

Factorials: the arrange-everything number

What \(n!\) counts

Line up all \(n\) objects: \(n\) choices for first place, \(n-1\) for second, down to 1. It's the counting principle with shrinking stages — and it earns its own symbol because it appears everywhere.

\(n! = n \times (n-1) \times \cdots \times 1\)

It grows violently

\(3! = 6\). \(5! = 120\). \(10! = 3{,}628{,}800\) — ten people can line up in more ways than Maya's campus has students, times 400. This explosion is why listing fails and formulas take over.

The convention that saves the formulas

There is exactly one way to arrange nothing: do nothing. The two formulas ahead divide by factorials, and \(0! = 1\) is what keeps them from breaking at the edges — it is never 0.

\(0! = 1\)

Factorials are rarely the final answer — they're the gears inside the two formulas coming next. Watch how they cancel:

See it · C2

The cancellation, live

Predict first: expand \(\frac{n!}{(n-r)!}\) into its terms, then click Show cancellation. How many terms survive the strike-through? Count before you click.

Interactive fraction showing n! divided by (n minus r) factorial, expanded as individual terms. Choose n and r, then click "Show cancellation" to see the denominator terms strike through against the matching numerator terms, leaving the r highlighted terms that multiply to give the permutation count.

n =
r =

Core concept 3 · C3

Permutations: when order is part of the outcome

The plan grows: 10 volunteers from the survey signed up for diary follow-ups. Maya must fill 3 interview slots — Monday, Tuesday, Wednesday.

Shrinking stages

Monday's slot: 10 candidates. Tuesday: 9 remain. Wednesday: 8. The counting principle with the shrinkage built in — each choice uses someone up.

\(10 \times 9 \times 8 = 720\)

The compact form

Selecting \(r\) of \(n\) objects in order: start from \(n!\) and cancel the unused tail, \((n-r)!\). The cancellation you just watched is this formula at work.

\(_nP_r = \dfrac{n!}{(n-r)!}\)

When it applies

Only when swapping two selections gives a different outcome. Ali on Monday, Ben on Tuesday is a different schedule from Ben on Monday, Ali on Tuesday — order is part of the outcome here.

Signal words: arrange, rank, schedule, sequence, 1st–2nd–3rd. But signal words can lie — the reliable test comes at concept 5.

See it · C3

Build one, watch the pool shrink

Predict first: each position shows a live choices badge. Fill the slots one click at a time — what number will the badge show at the third position, and where does that number come from?

Interactive visualization with 5 labelled objects A through E. Click an object to place it in the next position slot. The badge above each slot shows how many choices were available at that step. Click a filled slot to remove it and all slots after it. Use the r tabs to change the number of positions.

We do · you finish it

Price the interview schedule

Maya's editor asks: "How many different schedules for the three interview days can you build from the 10 volunteers?"

  1. Order matters: the same three people on different days is a different schedule — swap test says permutation.
  2. The stages shrink — each booking uses up a volunteer: \(10\), then \(9\), then \(8\).
  3. Finish it: \(_{10}P_3 = ?\)

    \(10 \times 9 \times 8 = 720\) schedules. Formula check: \(\dfrac{10!}{7!} = 720\) ✓ — the \(7!\) tail cancels, exactly as the strip showed.

Practice · permutations · fresh numbers on demand

Core concept 4 · C4

Combinations: when only membership matters

Plan B: no interview days. Maya just needs a group of 3 volunteers to feature in the piece — no slots, no order, no roles.

The overcount

The 720 schedules keep re-listing the same trio: Ali–Ben–Cléo shows up in \(3! = 6\) different orders, but it's one group. Every trio is counted exactly 6 times.

Divide the order out

Count ordered, then divide by the orderings each group has: \(720 \div 6 = 120\) groups. That division is the combination formula — \(_nC_r = {}_nP_r / r!\), always.

\(_nC_r = \dfrac{n!}{r!\,(n-r)!}\)

Symmetry for free

Choosing 3 to feature is the same act as choosing 7 to leave out: \(\binom{10}{3} = \binom{10}{7} = 120\). When \(r\) is large, count the small side instead.

\(\dbinom{n}{r} = \dbinom{n}{n-r}\)

Permutation and combination aren't rivals — a combination is a permutation with the order divided out. The only question is whether order deserved to be counted.

See it · C4

Watch the orderings collapse

Predict first: the left panel lists ordered arrangements, tinted by which objects they contain. Switch to Grouped — how many orderings fall into each group, and what does that number have to do with \(r!\)?

Interactive comparison for 4 objects A, B, C, D at r = 2. The left panel lists all 12 ordered arrangements (permutations); the right panel lists all 6 unordered selections (combinations). Every group of 2! = 2 orderings of the same objects collapses to one combination: 12 divided by 2! equals 6. Use the r tabs to change the selection size and the group view control to tint or collapse the groups.

Ordered — ₄Pr 12
    12 ÷ 2! = 6
    Unordered — ₄Cr 6
      Group view:

      We do · you finish it

      From schedules to groups

      Same 10 volunteers — but now Maya only needs a group of 3, no interview days attached.

      1. The ordered count, from two slides ago: \(_{10}P_3 = 720\).
      2. Each group of 3 appears once per ordering of its members — \(3! = 6\) times.
      3. Finish it: \(\dbinom{10}{3} = ?\)

        \(720 \div 6 = 120\) groups. Same three people in any order — one group. Keep the number 120 warm: it comes back tonight as a denominator.

      Commit first · today's summit

      Core concept 5 · C5

      The decision: one test beats every signal word

      The swap test

      Swap two of the selected items and ask: is the outcome different? Different → order matters → permutation. Same → only membership matters → combination.

      Order matters

      Schedules, rankings, codes, playlists — being first is different from being second. The keypad: 1-5-8-2 opens and 2-5-8-1 fails, so the "combination" lock counts permutations.

      \(_nP_r\)

      Only membership

      Teams, committees, samples, toppings — the same members in any listing order are one outcome. Maya's feature group of 3 is a combination, whatever order she writes the names in.

      \(_nC_r\)

      "Combination lock" proves the vocabulary can't be trusted. Run the swap test every time — it never lies.

      I do · watch the whole decision

      Two requests from the editor, decided out loud

      Step 1 · Say the outcome

      The editor asks for (a) a running order for 4 of Maya's 9 story ideas in the next issue, and (b) 3 of her 10 volunteers to receive thank-you gift cards. Before any formula, I say what one outcome is: (a) an ordered lineup of 4 ideas; (b) a set of 3 names.

      Step 2 · Run the swap test

      (a) Swap ideas #1 and #4 in the lineup — the issue reads differently: different outcome, order matters. (b) Swap two names on the gift list — the same three people get cards: same outcome, order is noise.

      Step 3 · Pick the tool and compute

      (a) Permutation: \(_9P_4 = 9 \times 8 \times 7 \times 6 = 3024\) running orders. (b) Combination: \(\binom{10}{3} = \dfrac{10 \times 9 \times 8}{3!} = 120\) gift lists.

      Step 4 · Sanity-check the size

      Ordered counts always dwarf their unordered twins — bigger by exactly \(r!\). Check: \(\binom{9}{4} = 126\) and \(126 \times 4! = 3024\) ✓. If a "permutation" ever comes out smaller than the matching combination, a formula got swapped.

      The habit: outcome first, swap test second, formula last. Never let a scenario's vocabulary pick the formula for you.

      See it · C5

      The decision, as a flowchart

      Trace the keypad code and the gift list through the chart before expanding the worked checks — do both land where the swap test said they would?

      First: can the same item be chosen again (repetition allowed)?
      YES → use the FCP (multiply choices per stage). NO → continue ↓ to the order question.
      Does swapping two selected items
      produce a different outcome?
      Permutation
      nPr = n! / (n − r)!
      arrangement ranking ordered list schedule code (no repeats)
      Electing a president, VP, and secretary from 12 — which branch? Check

      Swapping president and VP gives a different outcome — order matters, so Permutation.
      12P3 = 12 × 11 × 10 = 1320

      Combination
      C(n, r) = n! / [r! · (n − r)!]
      group team committee set selection
      Choosing a 3-person committee from 12 — which branch? Check

      {Ann, Bob, Carl} and {Carl, Ann, Bob} are the same committee — order doesn't matter, so Combination.
      C(12, 3) = 12! / (3! · 9!) = 220
      Note: 220 = 1320 ÷ 3! — the same 12 · 11 · 10 selections, with each group's 6 orderings collapsed into one.

      "Combination lock" is a misnomer — it is actually a permutation lock, because 3‑7‑4 ≠ 4‑7‑3.

      Practice · which tool? · fresh numbers on demand

      Core concept 6 · C6

      Counting-based probability: the payoff

      The formula you already own

      Equally-likely outcomes: favorable count over total count — the first formula of this module. Nothing about it changes; only the counting gets industrial.

      \(P(A) = \dfrac{n(A)}{n(S)}\)

      Same method, top and bottom

      If the denominator counts unordered groups, the numerator must count unordered groups too. Mixing a permutation over a combination silently inflates the answer by \(r!\) — the flaw hunt in a moment turns on exactly this.

      Multiply the sub-choices

      Inside a favorable count, independent choices multiply: picking 2 part-timers and 1 other volunteer is \(\binom{4}{2} \times \binom{6}{1}\) — the counting principle working inside a combination count.

      Maya's group of 3 from her 10 volunteers: all \(\binom{10}{3} = 120\) groups equally likely. Which means she can now put a probability on who ends up featured.

      See it · C6

      Every possible committee, sorted

      The same move at lesson scale: 3 students drawn from a class of 20, split by how many of the 8 athletes are included. Predict first: which segment is bigger — "exactly 1 athlete" or "no athletes"? Click the segments to check the formula behind each.

      Proportional bar showing all four outcomes when choosing 3 students from 20 (8 athletes, 12 non-athletes). Each segment width is proportional to the number of equally-likely committees in that category. Click a segment to see the formula and probability.

      Click a segment to see the probability formula

      Find the flaw · one line is wrong

      Which tool decides? · mixes earlier classes + today

      See it · C6

      "At least one" is everything but one slice

      The bar splits all committees by how many athletes they include — the lesson's bigger example again. Predict first: which single slice is the complement of "at least one athlete"? Everything else needs no counting at all.

      Practice · counting probabilities · fresh numbers on demand

      Production task · write the reply

      Exit ticket · 60 seconds · anonymous

      What Maya files

      What Maya can now count

      Stages multiply: a diary week has \(2^7 = 128\) possible patterns — counted in seconds, listed never.

      One test picks the formula: swap two selections. Different outcome → \(_{10}P_3 = 720\) schedules; same outcome → \(\binom{10}{3} = 120\) groups. Vocabulary lies; the swap test doesn't.

      Counts become probabilities: same method top and bottom, and "at least one" flips to one subtraction — \(P \approx 0.83\) that a part-timer's voice makes the piece.

      The reader's week: 35 of the 128 patterns — if every pattern is equally likely. That "if" is a claim about how random nights actually behave. Next class: random variables and probability distributions — putting honest weights on the 128.

      Vote counts on today's slides are simulated for rehearsal; live sessions show the room's real votes.