What does Completing Preferences from Sparse Purchases conclude, in numbers, about “The Buyer's Recommendation Sheet and a Plan to Refute the Book: A Loop on the Shop's Own Data”?

Answer: Chapter 8 gives the buyer's recommendation sheet, the distilled Preference Completion Recommender and a pre-registered test needing 3156 customers per arm. Marked boxes separate published evidence, runnable Python calculations (23 programs), classical sources and the author's hypotheses.

Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (23 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: 3156

z(0.975) = 1.9600, z(0.80) = 0.8416
controltreatedper armtotal
0.0400.050674513490
0.0400.05531566312
0.0400.06018633726
0.0800.10032136426
0.0800.11014992998
Show the full program
# Chapter 8. p83: sample size for a pre-registered shelf test.
# Model: customers are randomised to a recommendation slot filled by
# popularity (control) or by the completed matrix (treatment); the
# outcome is whether the customer buys from the slot within 14 days.
# Two-sided two-proportion test, alpha 0.05, power 0.80 (normal
# approximation). Baseline and uplift values are illustrative.
import math
from statistics import NormalDist

za = NormalDist().inv_cdf(1 - 0.05 / 2)
zb = NormalDist().inv_cdf(0.80)


def n_arm(p1, p2):
    pb = (p1 + p2) / 2
    a = za * math.sqrt(2 * pb * (1 - pb))
    b = zb * math.sqrt(p1 * (1 - p1) + p2 * (1 - p2))
    return math.ceil((a + b) ** 2 / (p1 - p2) ** 2)


print("z(0.975) = {:.4f}, z(0.80) = {:.4f}".format(za, zb))
print("  control   treated   per arm    total")
for p1, p2 in ((0.040, 0.050), (0.040, 0.055), (0.040, 0.060),
               (0.080, 0.100), (0.080, 0.110)):
    n = n_arm(p1, p2)
    print("   {:.3f}     {:.3f}    {:6d}   {:6d}".format(p1, p2, n, 2 * n))

Single source and citation

Fan, Y. (2026). Low-Rank Matrix Completion and Alternating Least Squares: Inferring Unstated Preferences from Sparse Purchase Records (Version 1.0.0), Chapter 8: The Buyer's Recommendation Sheet and a Plan to Refute the Book: A Loop on the Shop's Own Data. 5D Library. DOI pending

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

BibTeX
@book{fan2026328,
  author    = {Fan, Yafu},
  title     = {Low-Rank Matrix Completion and Alternating Least Squares: Inferring Unstated Preferences from Sparse Purchase Records},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book