关于「期望信息增益:探针价格该设在学得最多的地方」,《先手探针与隐藏事实》给出的定量结论是什么?
结论:第三章用林德利信息比较探针价格:信息最多的价格是 45,收入最高的价格是 35。
数据口径:书中参数为示意,全部计算由书中程序生成,数据全部是合成数据。 本书是非个人化经营建议,不构成法律、税务或投资意见,不向任何人承诺收入。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 35, 45
| prior entropy 3.462 bits, prior mean theta 46.02 | ||
| price | EIG n=40 (bits) | revenue per visitor |
| 15 | 0.801 | 14.54 |
| 20 | 1.128 | 18.78 |
| 25 | 1.468 | 22.22 |
| 30 | 1.783 | 24.47 |
| 35 | 2.035 | 25.26 |
| 40 | 2.196 | 24.55 |
| 45 | 2.253 | 22.57 |
| 50 | 2.207 | 19.68 |
| 55 | 2.072 | 16.34 |
| 60 | 1.868 | 12.91 |
| 65 | 1.619 | 9.68 |
| 70 | 1.350 | 6.85 |
| 75 | 1.080 | 4.50 |
| 80 | 0.826 | 2.72 |
| 85 | 0.600 | 1.49 |
| best probe price 45 with 2.253 bits | ||
| n = | 10: EIG at 45 = 1.419 bits | |
| n = | 40: EIG at 45 = 2.253 bits | |
| n = 160: EIG at 45 = 3.024 bits |
查看完整验算程序
# Chapter 3. p31: expected information gain of a probe price (Lindley).
# Illustrative. The unknown is the median willingness to pay theta of a
# segment, on a grid from 20 to 80 units in steps of 5, with a prior near
# 40 (log-normal shape, spread 0.35). A visitor shown price p buys
# with chance 1 / (1 + exp((p - theta) / 6)). A probe shows one real,
# purchasable price to n visitors and counts buyers k ~ Binomial(n, .).
# EIG(p) = mutual information between theta and k, in bits.
import math
THETAS = list(range(20, 81, 5))
S = 6.0
def prior():
w = [math.exp(-(math.log(t) - math.log(40.0)) ** 2 / (2 * 0.35 ** 2))
for t in THETAS]
tot = math.fsum(w)
return [x / tot for x in w]
def p_buy(p, t):
return 1.0 / (1.0 + math.exp((p - t) / S))
def eig(pri, p, n):
like = []
for t in THETAS:
q = p_buy(p, t)
like.append([math.comb(n, k) * q ** k * (1 - q) ** (n - k)
for k in range(n + 1)])
marg = [math.fsum(pri[i] * like[i][k] for i in range(len(THETAS)))
for k in range(n + 1)]
terms = []
for i in range(len(THETAS)):
for k in range(n + 1):
if like[i][k] > 0 and marg[k] > 0:
terms.append(pri[i] * like[i][k]
* math.log2(like[i][k] / marg[k]))
return math.fsum(terms)
def entropy(pr):
return -math.fsum(x * math.log2(x) for x in pr if x > 0)
if __name__ == "__main__":
pri = prior()
mean = math.fsum(t * w for t, w in zip(THETAS, pri))
print("prior entropy {:.3f} bits, prior mean theta {:.2f}".format(
entropy(pri), mean))
print(" price EIG n=40 (bits) revenue per visitor")
best = None
for p in range(15, 86, 5):
g = eig(pri, p, 40)
rev = p * math.fsum(w * p_buy(p, t) for t, w in zip(THETAS, pri))
print(" {:>3} {:.3f} {:>6.2f}".format(p, g, rev))
if best is None or g > best[1]:
best = (p, g)
print("best probe price {} with {:.3f} bits".format(*best))
for n in (10, 40, 160):
print(" n = {:>3}: EIG at {} = {:.3f} bits".format(
n, best[0], eig(pri, best[0], n)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《高能动性主动推理、意念强度先手扰动与商业隐藏事实勘探母典》第 3 章「期望信息增益:探针价格该设在学得最多的地方」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-395 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026395,
author = {Fan, Yafu},
title = {High-Agency Active Inference, Intentional Perturbation Probes and Hidden Market-Truth Exploration},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}