What does Supermodular Chaining of Stock Assets conclude, in numbers, about “Testing Complementarity: the 2×2 Factorial Test, Standard Errors and Sample Size”?
Answer: Chapter 6 designs a 2×2 factorial test; detecting a cross-difference of 0.010 needs 8,379 visitors per cell.
Scope of the numbers: In the illustrative model, twelve of the fifteen pairs of six assets are complements and three are substitutes, and with all six switched on the monthly value is 23,104 against a stand-alone sum of 13,668. Parameters are illustrative and correspond to no real business, customer, creator or sale; 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.010, 8379
| z_a + z_b = 2.8016 | ||||
| D | n per cell | total | months at 10,000/cell | main-effect n |
| 0.005 | 32,063 | 128,252 | 3.2 | 8,016 |
| 0.010 | 8,379 | 33,516 | 0.8 | 2,095 |
| 0.015 | 3,884 | 15,536 | 0.4 | 971 |
| 0.020 | 2,274 | 9,096 | 0.2 | 569 |
| ratio cross / main at D = 0.010: 4.00 | ||||
| power at 4,000 per cell, D = 0.010: 0.490 |
Show the full program
# Chapter 6. p62: how many visitors a 2x2 complementarity test needs.
# Two-sided alpha 0.05, power 0.80. For the cross-difference
# D = p11 - p10 - p01 + p00, Var(D-hat) = sum p_c (1 - p_c) / n
# with n visitors per cell, so n = (z_a + z_b)^2 * sum p(1-p) / D^2.
# A main effect of the same size, estimated from the same four cells as
# ((p10 + p11) - (p00 + p01)) / 2, has a quarter of that variance: a
# cross-difference needs about four times the sample of a main effect
# of equal size. Monthly traffic of 40,000 split four ways gives 10,000
# per cell a month (illustrative).
import math
from statistics import NormalDist
Z = NormalDist().inv_cdf(0.975) + NormalDist().inv_cdf(0.80)
BASE = 0.020
def cells(d, lift_k=0.006, lift_f=0.004):
return [BASE, BASE + lift_k, BASE + lift_f, BASE + lift_k + lift_f + d]
def n_cross(d):
var = math.fsum(p * (1 - p) for p in cells(d))
return math.ceil(Z * Z * var / (d * d))
def n_main(m, d):
var = math.fsum(p * (1 - p) for p in cells(d)) / 4.0
return math.ceil(Z * Z * var / (m * m))
if __name__ == "__main__":
print("z_a + z_b = {:.4f}".format(Z))
print(" D n per cell total months at 10,000/cell "
"main-effect n")
for d in (0.005, 0.010, 0.015, 0.020):
n = n_cross(d)
print(" {:.3f} {:>11,} {:>9,} {:>14.1f} {:>22,}".format(
d, n, 4 * n, n / 10000.0, n_main(d, d)))
n = n_cross(0.010)
print("ratio cross / main at D = 0.010: {:.2f}".format(
n / n_main(0.010, 0.010)))
print("power at 4,000 per cell, D = 0.010: {:.3f}".format(
NormalDist().cdf(0.010 / math.sqrt(math.fsum(
p * (1 - p) for p in cells(0.010)) / 4000.0) -
NormalDist().inv_cdf(0.975))))Single source and citation
Fan, Y. (2026). Supermodular Weapon-Arsenals, Adjacent-Possible Recombination Graphs and Cross-Asset Cashflow Chaining (Version 1.0.0), Chapter 6: Testing Complementarity: the 2×2 Factorial Test, Standard Errors and Sample Size. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-375 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026375,
author = {Fan, Yafu},
title = {Supermodular Weapon-Arsenals, Adjacent-Possible Recombination Graphs and Cross-Asset Cashflow Chaining},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Matrix of Pairwise Gains: Cross-Differences Separate Complements, Independents and Substitutes
- Chapter 2 · Supermodular Functions on a Lattice: Topkis's Monotone Comparative Statics and the Single-Practice Pilot Trap
- Chapter 3 · A Graph of the Adjacent Possible: One-Step Combinations and the Trade-off of Unfamiliarity
- Chapter 4 · The Best Chaining Set: Choosing Under Caps on Working Hours and Contact Frequency
- Chapter 5 · Chaining Cash Flow: the Bottleneck of a Cross-Asset Funnel, Quantiles for the Doubling Slogan and Single-Level Commission
- Chapter 7 · Classical Sources: Regular and Unusual Forces in the Sunzi, Aristotle on Wholes and Adam Smith on the Extent of the Market
- Chapter 8 · Field Tools and Checker Specifications: the Monthly Chaining Ledger, a Pre-Registered Test and Refutation Conditions