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 | |||
| control | treated | per arm | total |
| 0.040 | 0.050 | 6745 | 13490 |
| 0.040 | 0.055 | 3156 | 6312 |
| 0.040 | 0.060 | 1863 | 3726 |
| 0.080 | 0.100 | 3213 | 6426 |
| 0.080 | 0.110 | 1499 | 2998 |
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
- Chapter 1 · Sparse Yet Completable: How Many Entries a Low-Rank Matrix Needs
- Chapter 2 · Alternating Least Squares: Breaking a Hard Problem into a Chain of Small Systems
- Chapter 3 · Power Iteration and the Leading Singular Vector: A Good Start for Alternating Least Squares
- Chapter 4 · Incoherence: How Best-Sellers, Small Niches and Long Tails Defeat Completion
- Chapter 5 · Missing Not at Random: How Far Seeing Only Purchases Leads Inference Astray
- Chapter 6 · Cold Start: Catching New Customers and New Products with Means and Category Priors
- Chapter 7 · Eastern and Western Sources: "Things of a Kind Gather Together" and Spearman's General Factor