Reconciling alternate derivations

Execute bounded stopping paths, rearrange their contributions and locate a missing term instead of averaging disagreeing answers.

20 minutes · advanced · Original Poker4Quant lesson

What you will learn

Reconcile an outcome-weighted expectation with survival-column counting and diagnose a boundary error under the same finite model.

Prerequisites: Explaining a model aloud · Stopping-time models · Constructing valid counterexamples

Two methods must answer the same question

A useful cross-check changes the representation while preserving the random experiment and target. Here three independent fair coin faces are generated in advance. A rule stops execution at or before flip three. T counts executed flips, including the final one, even when the stopping pattern never appears before the cap. It is neither the number of failures nor the uncapped waiting time.

There are eight equally likely full H/T strings. If execution stops after the first H, HHH and HHT both have T=1. Their unused suffixes are not extra executed flips, but the distinct full strings still carry separate probability mass. Collapsing all short stopped prefixes and weighting each prefix equally would silently change the experiment. This is exact enumeration, not a simulation estimate or a model of actual poker hands.

Count the same occupied cells by rows and columns

For any path with T=t, draw one occupied cell for each executed position 1 through t. Its row contains t cells. Summing row lengths across all eight paths and dividing by eight gives E[T]. Grouping rows by stopping time instead gives (n1+2n2+3n3)/8, where nt counts paths stopping at t. These histogram counts sum to eight.

Now count the same occupied cells vertically. Column one exists when T>0, column two when T>1, and column three when T>2. Their counts s0,s1,s2 need not sum to eight: a long path contributes to more than one column. The identical cell total is s0+s1+s2. For this finite positive-integer T, E[T]=P(T>0)+P(T>1)+P(T>2). This is a pathwise counting identity before taking expectations; it does not require independent survival indicators.

An exact discrepancy needs a diagnosis

A proposed calculation might add only P(T>1)+P(T>2). It omits the always-occupied first column, P(T>0)=1. Its result is exactly one flip too small for every rule in this workshop. Extra decimal precision or more random trials cannot repair a missing term. Do not average the two answers and call that a compromise. Identify which target, weight, endpoint or arithmetic step changed.

Check boundaries with a deterministic T=1: the correct mean is one, while the omitted-column method returns zero. Equivalently, summing P(T≥k) is valid when k starts at one; combining that non-strict inequality with a start at zero would add an unwanted term. The inequality and index origin must be matched. This lesson uses only the finite three-column identity, without a claim about convergence for arbitrary unbounded or signed variables.

A changed stopping rule needs new path accounting

Stopping at the first adjacent HH can occur at flip two; a single H does not stop the process. Stopping at the first change of face also requires at least two flips. Both rules still cap T at three, but they produce different histograms and survival counts. Reusing the first-head distribution because the same fair coin is used would be a model error.

Agreement between two ledgers is a useful local check, not independent evidence that a fair coin models a real opponent. Both methods share the same full-string weights and rule interpreter. In software, compare against a separately constructed branch tree and test deterministic boundary cases. In an explanation, separate the proven identity from the assumptions that make its numbers relevant.

Worked example

Stop at the first H, capped at three flips. Reconcile the histogram and survival methods, then diagnose the sum starting at k=1.

  1. The eight strings give stopping counts n1=4, n2=2, n3=2. The two last strings include both success at three and no success by the cap.
  2. Row counting gives (4+2×2+3×2)/8=14/8=1.75 executed flips.
  3. The survival columns contain 8,4,2 paths, so their total is also (8+4+2)/8=1.75.
  4. Starting at k=1 leaves only (4+2)/8=0.75. It omits one executed flip from every route, not a rounding correction.

Both valid ledgers count the same fourteen occupied path-position cells. Restore the missing first column and retain the cap and probability weights.

Hands-on: Count executed paths two ways and repair a missing column

Step all eight fair-bit routes under three stopping rules, build histogram and strict-survival ledgers, then quantify and diagnose an omitted baseline term.

Reading derivation workshop…

Common mistakes

  • Weighting short stopped prefixes equally rather than preserving their full-string mass.
  • Executing the unused suffix after the stopping condition has fired.
  • Omitting the k=0 term while using strict T>k.
  • Treating survival columns as disjoint events whose counts must sum to eight.
  • Assuming linearity needs independent survival indicators.
  • Averaging disagreeing formulas instead of locating their different premises or terms.

Keep these ideas

  • Fix the experiment, target and cap before comparing methods.
  • Rows and survival columns count the same executed cells.
  • Match strictness with the starting index.
  • Cross-check assumptions separately from arithmetic.

Further reading

  • Data140 Textbook — Applying the Definition, tail sum formula ↗

    Bounded section8.2.5 review: nonnegative integer expectation by rearranging row contributions into strict survival columns. Our capped H/T rules, eight-route execution, discrepancy cases and illustrations are original. No source exercise, video or full-textbook review claimed. Checked 2026-10-22.

Check your understanding

Untimed · 3 checks · Guest progress stays in this browser. Sign in to save account snapshots.

Loading saved lesson…