What does Hard Water, Chelation and Lather conclude, in numbers, about “The Empirical Loop: a Weekly Water-Fit Ledger, Field Tools and Checker Specifications, and Pre-Registered Tests”?
Answer: Chapter 8 delivers a weekly water-fit ledger, the distilled Hard-Water Loss and Chelant Dosing Calculator, checker specifications for the four kits and pre-registered tests; a triangle test needs 42 assessors to detect pd = 0.3, and the smoothness study enrols 64. Parameters are illustrative and all calculations are generated by the book's programs. This is not a formula safety assessment or regulatory advice: every formula needs assessment by qualified people, and regulations must be read in their current official text. The book gives no home recipes, rates no brand and makes no claim about skin or hair beyond lather and feel. Marked boxes separate published evidence, runnable Python calculations (20 programs), classical sources and the author's hypotheses.
Scope of the numbers: Chapter 1 covers units of hardness, six illustrative waters and the activity of calcium. Parameters are illustrative and all calculations are generated by the book's programs.
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: 0.3, 20, 42
| alpha 0.05 one-sided; n = first / stable | ||||
| pd | triangle 80% | triangle 90% | paired 80% | paired 90% |
| 0.2 | 87/94 | 117/124 | 158/169 | 213/224 |
| 0.3 | 40/42 | 53/57 | 69/76 | 93/102 |
| 0.4 | 23/25 | 30/34 | 37/42 | 53/58 |
| 0.5 | 16/16 | 20/22 | 23/28 | 33/35 |
| triangle n = 60: reject chance at 27 or more correct |
Show the full program
# Chapter 8. p82: panel sizes for triangle and paired-comparison tests.
# Model: guessing model with a proportion pd of true discriminators.
# Triangle: P(correct) = pd + (1 - pd) / 3, chance 1/3. Paired
# directional comparison: P(correct) = pd + (1 - pd) / 2, chance 1/2.
# For each n the exact one-sided binomial critical count at alpha = 0.05
# is found and the exact power computed (math.comb, math.fsum). The
# table gives the smallest n reaching the target power and, because
# exact power saw-tooths, the smallest n from which every larger n up
# to n + 30 also reaches it.
import math
def pmf(n, p):
return [math.comb(n, k) * p ** k * (1 - p) ** (n - k)
for k in range(n + 1)]
def crit(n, p0, alpha):
probs = pmf(n, p0)
lo, hi = 0, n + 1 # tail(c) falls as c rises
while lo < hi:
mid = (lo + hi) // 2
if math.fsum(probs[mid:]) <= alpha:
hi = mid
else:
lo = mid + 1
return lo
def power(n, p0, p1, alpha=0.05):
c = crit(n, p0, alpha)
return math.fsum(pmf(n, p1)[c:]) if c <= n else 0.0
def sizes(p0, pd, target):
p1 = pd + (1 - pd) * p0
ok = [power(n, p0, p1) >= target for n in range(1, 331)]
first = ok.index(True) + 1
stable = next(n for n in range(1, 301)
if all(ok[n - 1:n + 30]))
return first, stable
if __name__ == "__main__":
print("alpha 0.05 one-sided; n = first / stable")
print(" pd triangle 80% triangle 90% paired 80% paired 90%")
for pd in (0.2, 0.3, 0.4, 0.5):
cells = []
for p0 in (1 / 3, 1 / 2):
for target in (0.8, 0.9):
a, b = sizes(p0, pd, target)
cells.append("{:>4}/{:<4}".format(a, b))
print(" {:.1f} {:>12} {:>12} {:>10} {:>10}".format(pd, *cells))
n, p0 = 60, 1 / 3
c = crit(n, p0, 0.05)
print("triangle n = 60: reject chance at {} or more correct".format(c))Single source and citation
Fan, Y. (2026). Water-Hardness Chemistry in Personal-Care Formulations, Calcium-Magnesium Chelation and Surfactant Foam-Deposition Enhancement (Version 1.0.0), Chapter 8: The Empirical Loop: a Weekly Water-Fit Ledger, Field Tools and Checker Specifications, and Pre-Registered Tests. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-389 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026389,
author = {Fan, Yafu},
title = {Water-Hardness Chemistry in Personal-Care Formulations, Calcium-Magnesium Chelation and Surfactant Foam-Deposition Enhancement},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Four Units of Hardness and Six Illustrative Waters: the Effective Concentration of Calcium in Shower Water
- Chapter 2 · Critical Micelle Concentration, Solubility Products and the Loss Curves of Five Surfactant Classes
- Chapter 3 · From Lost Shares to Foam Height: Precipitated Particles and Foam Half-Life
- Chapter 4 · The Stoichiometry of Chelation and the Ceiling on Coverage: How Much Water Can a Formula's Chelant Soften?
- Chapter 5 · Conditional Stability Constants, the Contest between Calcium and Magnesium, and Dilution by Rinsing: Why a Chelant Neither Grips Hard nor Keeps Up
- Chapter 6 · The Deposition of Cationic Polymers: Charge Screening, Competition for Sites and the Coacervation Window
- Chapter 7 · Classical Sources: Lu Yu on Waters, the Guanzi on Water, Hippocrates on Hard Water and Clark's Soap Test