What does Card Cost Regression and Cyclic Counters conclude, in numbers, about “Cost-Benefit Regression: Least Squares Finds the Under-Costed and the Over-Costed”?

Answer: Chapter 1 uses least squares to find under-costed and over-costed cards: each point of cost buys 1.858 stat points on average, and a multiple regression shows that health is dearer than attack and that keywords are worth far less than assumed.

Scope of the numbers: Its card pool, win rates and prices are illustrative; all calculations are generated by its programs; the book is not legal, financial or investment advice and recommends no purchase. Marked boxes separate published evidence, runnable Python calculations (21 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: 1.858

cards 24   fit: value = 1.533 + 1.858 * cost
R^2 = 0.900   residual sd = 1.212 stat points
card cost value fitted resid  student
Y07     3    10   7.11 +2.89    +2.45
A09     5     7  10.82 -3.82    -3.25
faction Y mean residual +0.203 over 12 cards
faction A mean residual -0.203 over 12 cards
flagged: Y07, A09  (positive = under-costed, too strong)
one cost step buys 1.858 stat points; a keyword is worth 1.08 cost
Show the full program
# Chapter 1. p11: Least-squares cost-benefit line for an invented card pool.
# The game "Hengshu" and its 24 creature cards (two asymmetric factions,
# Y and A) are invented for this book; every number is illustrative.
# Value v = attack + health + 2 * keyword (a keyword is priced at two
# stat points, an assumption). We fit v = a + b * cost by ordinary least
# squares (closed form, math.fsum), then flag cards whose studentized
# residual exceeds 2 in absolute value.
import math

POOL = [
    ("Y01", 1, 2, 1, 0), ("Y02", 1, 1, 2, 0), ("Y03", 2, 2, 3, 0),
    ("Y04", 2, 1, 2, 1), ("Y05", 3, 3, 3, 0), ("Y06", 3, 2, 3, 1),
    ("Y07", 3, 4, 4, 1), ("Y08", 4, 4, 5, 0), ("Y09", 4, 3, 4, 1),
    ("Y10", 5, 5, 5, 1), ("Y11", 6, 6, 6, 0), ("Y12", 7, 7, 7, 1),
    ("A01", 1, 1, 3, 0), ("A02", 2, 3, 2, 0), ("A03", 2, 2, 2, 1),
    ("A04", 3, 3, 4, 0), ("A05", 3, 1, 4, 1), ("A06", 4, 4, 4, 1),
    ("A07", 4, 3, 5, 0), ("A08", 5, 5, 6, 0), ("A09", 5, 3, 4, 0),
    ("A10", 6, 5, 6, 1), ("A11", 7, 6, 8, 0), ("A12", 7, 6, 7, 1),
]
KW = 2

cost = [float(c) for _, c, _, _, _ in POOL]
val = [float(a + h + KW * k) for _, _, a, h, k in POOL]
n = len(POOL)
mc = math.fsum(cost) / n
mv = math.fsum(val) / n
sxx = math.fsum((c - mc) ** 2 for c in cost)
sxy = math.fsum((c - mc) * (v - mv) for c, v in zip(cost, val))
syy = math.fsum((v - mv) ** 2 for v in val)
b = sxy / sxx
a = mv - b * mc
res = [v - (a + b * c) for c, v in zip(cost, val)]
sse = math.fsum(r * r for r in res)
s = math.sqrt(sse / (n - 2))
r2 = 1 - sse / syy
print("cards {}   fit: value = {:.3f} + {:.3f} * cost".format(n, a, b))
print("R^2 = {:.3f}   residual sd = {:.3f} stat points".format(r2, s))
print("card cost value fitted resid  student")
flag = []
for (name, c, _, _, _), v, r in zip(POOL, val, res):
    h = 1 / n + (c - mc) ** 2 / sxx
    t = r / (s * math.sqrt(1 - h))
    if abs(t) > 2:
        flag.append(name)
        print("{:4} {:4d} {:5.0f} {:6.2f} {:+5.2f} {:+8.2f}".format(
            name, c, v, a + b * c, r, t))
for fac in ("Y", "A"):
    rs = [r for (nm, *_), r in zip(POOL, res) if nm[0] == fac]
    print("faction {} mean residual {:+.3f} over {} cards".format(
        fac, math.fsum(rs) / len(rs), len(rs)))
print("flagged: {}  (positive = under-costed, too strong)".format(
    ", ".join(flag)))
print("one cost step buys {:.3f} stat points; a keyword is worth"
      " {:.2f} cost".format(b, KW / b))

Single source and citation

Fan, Y. (2026). Cost-Benefit Regression for Asymmetric Strategy Cards, Hypergeometric Brick-Rate Bounds in Deck Building and Cyclic Counters to Dominant Strategies (Version 1.0.0), Chapter 1: Cost-Benefit Regression: Least Squares Finds the Under-Costed and the Over-Costed. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-179 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026179,
  author    = {Fan, Yafu},
  title     = {Cost-Benefit Regression for Asymmetric Strategy Cards, Hypergeometric Brick-Rate Bounds in Deck Building and Cyclic Counters to Dominant Strategies},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book