Skip to the quick start

Waiting times & non-transitivity (Riis–Paterson)

Choose three length-3 patterns A, B, C over {H,T}, and give each its own biased coin: pA=P(H on coin A), pB=P(H on coin B), pC=P(H on coin C). In each run we flip the three coins independently until each pattern appears; then we compare who “wins first”. Pairwise wins can form non-transitive cycles: A beats B, B beats C, yet C beats A (with random tie-breaks).

← Research demos

Can A beat B, B beat C, and C beat A?

Watch the coin-race overview →
First visit · three things to try
  1. Read one comparison. Each pattern has its own independent coin. P(A beats B) above 0.5 means A usually finishes first; simultaneous finishes count half each.
  2. Keep the opening example. HHH / HTH / HHT with biases 0.61 / 0.71 / 0.51 gives a small cycle. Check all three numerical probabilities, not just the mean waiting times.
  3. Compare calculation with simulation. The effect is close to 0.5, so sampling noise can reverse it. Look at the confidence intervals; changing settings clears old simulation results.
How to read the results

Bias means probability of Heads. The sliders cover 0.01–0.99 so every pattern eventually occurs. Numerical probabilities solve a finite joint waiting-time model without truncating the tail. Simulations are capped at one million runs and an estimated workload limit. The optional 3D picture always describes the fixed opening pattern triple.

Controls & simulation

Run N Monte Carlo games with the selected independent coin biases pA, pB, and pC.

Runtime: ready.

Optional 3D workshop · explore the fixed pattern triple

Optional: the region for HHH / HTH / HHT

Drag to rotate, scroll to zoom, or click a point to set the three biases. The probability table also works without this picture.

This picture always uses A = HHH, B = HTH, C = HHT. Changing the pattern controls affects the probability table, not this region. The sliders provide a keyboard-accessible way to explore probabilities.

Sampling: ready.

Region definition: 0<pA,pB,pC<1 and G_AB(pA,pB)>0, G_BC(pB,pC)>0, G_CA(pC,pA)>0. (These polynomials correspond to the classic length-3 example A=HHH, B=HTH, C=HHT.)

At current (pA,pB,pC)

Means and initial pairwise probabilities are calculated numerically. “Estimate pairwise matrix” replaces the pairwise values with Monte Carlo estimates and approximate 95% confidence intervals.

P(A beats B)
—
—
P(B beats C)
—
—
P(C beats A)
—
—
Non-transitive?
—
E[τ(A)]
—
E[τ(B)]
—
E[τ(C)]
—
Ordering by mean
—

Simulation results (N runs)

Counts based on first occurrence times in each run.

Comparison Wins Estimated P
A < B — —
B < C — —
C < A — —

Each run flips 3 independent coins (A/B/C) until all three patterns have appeared, then records the three pairwise outcomes. A tie in each comparison is resolved with an independent fair tie-break. A cycle of tie-break outcomes within one trial is not evidence of non-transitivity between the waiting-time distributions. At the default biases the probabilities are very close to 1/2, so simulation noise can hide or reverse the effect.