What does Conformal Intervals for Orders conclude, in numbers, about “Closing the Loop: the Weekly Order-Count Interval Sheet, the Conformal Interval Calculator and a Pre-Registered Test”?

Answer: Chapter 8 gives a weekly order-count interval sheet, the distilled Conformal Interval Calculator and a pre-registered test; stocking to a one-sided 95 per cent bound, the normal bound runs out 0.0657 of the time and the conformal bound 0.0382. Marked boxes separate published evidence, runnable Python calculations (23 programs), classical sources and the author's hypotheses.

Scope of the numbers: Parameters are illustrative; all calculations are generated by the book's programs; the book is general business analysis, not individualised business advice. 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: 0.0382, 0.0657, 95

95% one-sided stock bound, 62 past weeks, 6000 histories
methodstock-out ratemean stock / median demand
normal0.06571.725
conformal0.03821.999
target stock-out 0.05; conformal mean cover k/(m+1) = 0.9623
Show the full program
# Chapter 8. p83: one-sided upper bounds for weekly stock.
# Model (illustrative): weekly demand 500 * exp(e), e normal sd 0.3,
# plus one bulk week in twenty at 1.8 times. From 62 past weeks a
# shop sets stock to a 95% upper bound: normal theory mean + t * s *
# sqrt(1 + 1/n) with t = 1.670 (Student t, 61 df, 0.95 point, from
# standard tables), or one-sided split conformal (10 weeks fit the
# median, 52 calibrate the signed score y - centre, k = ceil(53 *
# 0.95) = 51). Over 6,000 histories we count stock-outs in the next
# week and the mean stock held, in units of the median demand.
import math
import random
import statistics


def week(rng):
    bulk = 1.8 if rng.random() < 0.05 else 1.0
    return 500 * bulk * math.exp(rng.gauss(0.0, 0.3))


if __name__ == "__main__":
    rng = random.Random(20261113)
    out = {"normal": [], "conformal": []}
    held = {"normal": [], "conformal": []}
    for _ in range(6000):
        xs = [week(rng) for _ in range(62)]
        nxt = week(rng)
        ub_n = statistics.fmean(xs) + 1.670 * statistics.stdev(xs) \
            * math.sqrt(1 + 1 / 62)
        c = statistics.median(xs[:10])
        sc = sorted(x - c for x in xs[10:])
        ub_c = c + sc[math.ceil(53 * 0.95) - 1]
        for name, ub in (("normal", ub_n), ("conformal", ub_c)):
            out[name].append(nxt > ub)
            held[name].append(ub / 500)
    print("95% one-sided stock bound, 62 past weeks, 6000 histories")
    print("method      stock-out rate  mean stock / median demand")
    for name in ("normal", "conformal"):
        print("{:<10s}  {:.4f}          {:.3f}".format(
            name, len([x for x in out[name] if x]) / 6000,
            statistics.fmean(held[name])))
    print("target stock-out 0.05; conformal mean cover k/(m+1) = {:.4f}"
          .format(51 / 53))

Single source and citation

Fan, Y. (2026). Conformal Prediction and Distribution-Free Intervals: Finite-Sample Coverage Guarantees for Order Counts and Order Values (Version 1.0.0), Chapter 8: Closing the Loop: the Weekly Order-Count Interval Sheet, the Conformal Interval Calculator and a Pre-Registered Test. 5D Library. DOI pending

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

BibTeX
@book{fan2026306,
  author    = {Fan, Yafu},
  title     = {Conformal Prediction and Distribution-Free Intervals: Finite-Sample Coverage Guarantees for Order Counts and Order Values},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book