What does Hexagram and Star-Palace Mathematics conclude, in numbers, about “Yarrow Stalks and Coins: the Exact Odds of the Two Methods”?

Answer: Chapter 2 computes the two casting methods exactly: the number of moving lines is binomial under both, with no moving line at 0.1780; with coins old yin and old yang are 1/8 each, with yarrow old yang at 3/16 is three times old yin at 1/16, so the changed hexagram leans yin; the factor of three holds to four decimals under a natural split of the stalks and becomes 4.082 under an evenly spread split.

Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 16

line yarrow coins
old yin (6, moving)1/16 = 0.0625 1/8 = 0.1250
young yang (7)5/16 = 0.3125 3/8 = 0.3750
young yin (8)7/16 = 0.4375 3/8 = 0.3750
old yang (9, moving)3/16 = 0.1875 1/8 = 0.1250
yarrow: P(yang)1/2, P(moving) = 1/4, P(yang after change) = 3/8
coins : P(yang)1/2, P(moving) = 1/4, P(yang after change) = 1/2
yarrow: old yang / old yin3
Reading: both methods give yang and yin equally often and the
same chance (1/4) that a line moves. They differ in which lines
move: with coins old yang and old yin are equally likely; with
yarrow old yang is three times as likely, so a yang line moves
more often than a yin line and the changed hexagram leans yin.
Show the full program
# Chapter 2. Yarrow stalks against three coins: the line probabilities.
# Yarrow (Zhu Xi's procedure): of 50 stalks one is set aside; the 49 are
# split in two, one stalk is hung between the fingers, each heap is
# counted off by fours and the remainder (1-4, a remainder of 0 counting
# as 4) is set aside. First change: 1 + remainders = 5 or 9; second and
# third changes: 4 or 8. What is left after three changes is 36, 32, 28
# or 24 stalks = 4 x (9, 8, 7, 6).
# The usual analysis assumes each heap's count mod 4 is equally likely.
# In the first change the two remainders must add to 4 or 8 (48 stalks);
# 8 needs both heaps divisible by 4: probability 1/4. In the later
# changes (39 or 43 stalks, = 3 mod 4) the sum is 3 or 7: 1/2 each.
# Three coins: heads = 3, tails = 2; the sum of three is 6, 7, 8 or 9.
from fractions import Fraction as F
from itertools import product

def yarrow():
    first = {5: F(3, 4), 9: F(1, 4)}
    later = {4: F(1, 2), 8: F(1, 2)}
    out = {}
    for a, b, c in product(first, later, later):
        v = (49 - a - b - c) // 4
        out[v] = out.get(v, 0) + first[a] * later[b] * later[c]
    return out

def coins():
    out = {}
    for faces in product((2, 3), repeat=3):
        out[sum(faces)] = out.get(sum(faces), 0) + F(1, 8)
    return out

if __name__ == "__main__":
    y, c = yarrow(), coins()
    names = {6: "old yin  (6, moving)", 7: "young yang (7)",
             8: "young yin (8)", 9: "old yang (9, moving)"}
    print("   line                    yarrow           coins")
    for v in (6, 7, 8, 9):
        print("   {:22s}  {:>5} = {:.4f}   {:>5} = {:.4f}".format(
            names[v], str(y[v]), float(y[v]), str(c[v]), float(c[v])))
    for label, d in (("yarrow", y), ("coins", c)):
        yang = d[7] + d[9]
        moving = d[6] + d[9]
        after = d[7] + d[6]                    # yang once moving lines flip
        print("   {:6s}: P(yang) = {}, P(moving) = {}, P(yang after change)"
              " = {}".format(label, yang, moving, after))
    print("   yarrow: old yang / old yin = {}".format(y[9] / y[6]))
    print("\nReading: both methods give yang and yin equally often and the")
    print("same chance (1/4) that a line moves. They differ in which lines")
    print("move: with coins old yang and old yin are equally likely; with")
    print("yarrow old yang is three times as likely, so a yang line moves")
    print("more often than a yin line and the changed hexagram leans yin.")

Single source and citation

Fan, Y. (2026). Six-Dimensional Hypercube Walks, Hexagram Mutation Markov Chains and Modular Star-Palace Lattices (Version 1.0.0), Chapter 2: Yarrow Stalks and Coins: the Exact Odds of the Two Methods. 5D Library. https://doi.org/10.5281/zenodo.24090176

DOI: 10.5281/zenodo.24090176 · Read the monograph · 5DL-B-064 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026064,
  author    = {Fan, Yafu},
  title     = {Six-Dimensional Hypercube Walks, Hexagram Mutation Markov Chains and Modular Star-Palace Lattices},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.24090176},
  url       = {https://doi.org/10.5281/zenodo.24090176}
}

Other chapter answers in this book