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
Dn per celltotalmonths at 10,000/cellmain-effect n
0.00532,063128,2523.28,016
0.0108,37933,5160.82,095
0.0153,88415,5360.4971
0.0202,2749,0960.2569
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