关于「从门店账本估计两种半径:转介距离与同店蚕食」,《图灵斑图与据点间距》给出的定量结论是什么?
结论:第四章从转介距离与开店记录估出口碑半径 0.551 公里、蚕食半径 2.343 公里,比值单侧下界 3.863,并给出判断所需的数据量。
数据口径:书中半径、衰减率、城市长度与数据均为示意;全部计算由书中程序生成;本书属非个人化经营方法,不构成投资、法律或选址决策建议。 书中以标注框区分已发表的证据、可运行的 Python 计算(17 段程序)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.551, 2.343, 3.863
referrals 240: la_hat 0.551 km, 95% interval 0.487 to 0.627 openings 30: slope -0.4267 (se 0.0169), lh_hat 2.343 km 95% interval for lh 2.167 to 2.551 km loss share at d = 0: 0.306 (truth 0.300) reach ratio 4.257, log sd 0.076 one-sided 90% lower bound 3.863 vs threshold 2.414: above spacing from estimates: onset formula 7.14 km
查看完整验算程序
# Chapter 4. p41: estimating the two reaches from a shop's own records.
# Model: on a line the steady response to a point source of a field
# with diffusion D and decay rate m is exp(-|x| / l) with l = sqrt(D/m).
# (1) Word-of-mouth reach la: distances from a referring customer's
# home to the referred customer's home are drawn as Exp(mean la);
# the maximum-likelihood estimate is the mean distance and
# 2 n la_hat / la is chi-square with 2 n degrees of freedom.
# (2) Cannibalisation reach lh: when a sibling outpost opens at
# distance d, the old outpost loses a sales share 0.30 exp(-d / lh)
# times log-normal noise (sd 0.30); fit ln(loss) on d by least
# squares, lh_hat = -1 / slope.
# Truth la = 0.6 km, lh = 2.4 km; 240 referrals, 30 openings. The data
# are simulated and illustrative; the seed is fixed.
import math
import random
from statistics import NormalDist
rng = random.Random(20261116)
LA, LH = 0.6, 2.4
z = NormalDist().inv_cdf
def chi2_q(p, df):
# Wilson-Hilferty approximation to the chi-square quantile
c = 2.0 / (9.0 * df)
return df * (1.0 - c + z(p) * math.sqrt(c)) ** 3
ref = [rng.expovariate(1.0 / LA) for _ in range(240)]
n = len(ref)
la_hat = math.fsum(ref) / n
lo = 2 * n * la_hat / chi2_q(0.975, 2 * n)
hi = 2 * n * la_hat / chi2_q(0.025, 2 * n)
print("referrals %d: la_hat %.3f km, 95%% interval %.3f to %.3f"
% (n, la_hat, lo, hi))
d = [0.5 + 8.5 * rng.random() for _ in range(30)]
y = [math.log(0.30) - x / LH + rng.gauss(0.0, 0.30) for x in d]
md, my = math.fsum(d) / 30, math.fsum(y) / 30
sxx = math.fsum((x - md) ** 2 for x in d)
sxy = math.fsum((x - md) * (v - my) for x, v in zip(d, y))
b = sxy / sxx
res = [v - my - b * (x - md) for x, v in zip(d, y)]
se = math.sqrt(math.fsum(r * r for r in res) / 28 / sxx)
t28 = 2.048 # t quantile 0.975, 28 df
lh_hat = -1.0 / b
print("openings 30: slope %.4f (se %.4f), lh_hat %.3f km"
% (b, se, lh_hat))
print(" 95%% interval for lh %.3f to %.3f km"
% (-1.0 / (b - t28 * se), -1.0 / (b + t28 * se)))
print("loss share at d = 0: %.3f (truth 0.300)" % math.exp(my - b * md))
ratio = lh_hat / la_hat
v = 1.0 / n + (se / b) ** 2 # delta method on the log scale
print("reach ratio %.3f, log sd %.3f" % (ratio, math.sqrt(v)))
low90 = ratio * math.exp(-z(0.90) * math.sqrt(v))
print("one-sided 90%% lower bound %.3f vs threshold %.3f: %s"
% (low90, 1 + math.sqrt(2), "above" if low90 > 1 + 2 ** 0.5
else "not above"))
print("spacing from estimates: onset formula %.2f km"
% (2 * math.pi * math.sqrt(la_hat * lh_hat)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《图灵反应扩散斑图、小众口碑品牌陌生城市据点涌现与区域垄断扩散比条件母典》第 4 章「从门店账本估计两种半径:转介距离与同店蚕食」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-247 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026247,
author = {Fan, Yafu},
title = {Turing Reaction-Diffusion Patterns: How the Outposts of a Niche Word-of-Mouth Brand Emerge in a New City, and the Diffusion-Ratio Condition for Regional Dominance},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}