跳到正文
验证

统计验证 · 独立 oracle验证矩阵:正确性是独立对照的可复现结果,不是自述

统计验证在这里只有一个含义:自己批改作业的统计工具不算已验证。这里每个用户可见数字都对照项目之外的实现,在确定性 fixture 上,以比较前固定的容差。本页展示实时门禁输出。

已验证行
92ok
未验证行
6ok
失败行
0ok
覆盖缺口
0ok
门禁状态
通过ok

实时门禁输出

这些行由最近一次 `npm run verify:gate` 产生。参考值在本项目之外计算;TypeScript 引擎从不提供自己的 oracle。

实时门禁输出
statisticoracleKindoraclerefValuetolerancefixtureIdstatus
acflibrarystatsmodels 0.14.4statsmodels.tsa.stattools.acf(x, nlags=10, fft=False)[array n=10]1e-10
rationaleBoth use the biased 1/n autocovariance convention.
ar1_n120_phi0.6ValidatedVALIDATED
adf.criticallibrarystatsmodels 0.14.4statsmodels.tsa.stattools.adfuller(x, regression='c', autolag='AIC') [4][array n=3]1e-10
rationaleMacKinnon (2010) closed-form coefficients evaluated at 1/nobs.
ar1_n120_phi0.6ValidatedVALIDATED
adf.criticallibrarystatsmodels 0.14.4statsmodels.tsa.stattools.adfuller(x, regression='c', autolag='AIC') [4][array n=3]1e-10
rationaleMacKinnon (2010) closed-form coefficients evaluated at 1/nobs.
random_walk_n200ValidatedVALIDATED
adf.plibrarystatsmodels 0.14.4statsmodels.tsa.stattools.adfuller(x, regression='c', autolag='AIC') [1]0.0000209927860.000001
rationaleMacKinnon regression surface p-value; tolerance covers the normal-CDF approximation.
ar1_n120_phi0.6ValidatedVALIDATED
adf.plibrarystatsmodels 0.14.4statsmodels.tsa.stattools.adfuller(x, regression='c', autolag='AIC') [1]0.735692270.000001
rationaleMacKinnon regression surface p-value; tolerance covers the normal-CDF approximation.
random_walk_n200ValidatedVALIDATED
adf.statlibrarystatsmodels 0.14.4statsmodels.tsa.stattools.adfuller(x, regression='c', autolag='AIC')-5.01218991e-8
rationaleLeast-squares t statistic; QR and SVD solvers agree to ~1e-10 on this fixture, 1e-8 gives headroom.
ar1_n120_phi0.6ValidatedVALIDATED
adf.statlibrarystatsmodels 0.14.4statsmodels.tsa.stattools.adfuller(x, regression='c', autolag='AIC')-1.04712191e-8
rationaleLeast-squares t statistic; QR and SVD solvers agree to ~1e-10 on this fixture, 1e-8 gives headroom.
random_walk_n200ValidatedVALIDATED
adf.usedlaglibrarystatsmodels 0.14.4statsmodels.tsa.stattools.adfuller(x, regression='c', autolag='AIC') [2]00
rationaleLag selection is discrete and must match exactly (integer comparison).
ar1_n120_phi0.6ValidatedVALIDATED
adf.usedlaglibrarystatsmodels 0.14.4statsmodels.tsa.stattools.adfuller(x, regression='c', autolag='AIC') [2]00
rationaleLag selection is discrete and must match exactly (integer comparison).
random_walk_n200ValidatedVALIDATED
bhFdr.qValueslibrarystatsmodels 0.14.4statsmodels.stats.multitest.multipletests(p, method='fdr_bh')[1][array n=12]1e-12
rationaleSame step-up running-minimum algorithm; exact arithmetic comparison.
pvalues_listValidatedVALIDATED
difference.valueslibraryNumPy 2.2.6np.diff(x)[array n=199]1e-12
rationaleFirst difference; exact arithmetic apart from representation.
random_walk_n200ValidatedVALIDATED
harmonic.amplitude1librarystatsmodels 0.14.4statsmodels.regression.linear_model.OLS(y, [1, t, sin(2*pi*t/7), cos(2*pi*t/7)]).fit() [hypot(params[2], params[3])]1.92390701e-9
rationaleAmplitude of the first harmonic, sqrt(a^2 + b^2).
seasonal_stl_n365_p7ValidatedVALIDATED
harmonic.interceptlibrarystatsmodels 0.14.4statsmodels.regression.linear_model.OLS(y, [1, t, sin(2*pi*t/7), cos(2*pi*t/7)]).fit() [params[0]]0.0130454411e-9
rationaleThe Fourier design with period 7 is the harmonic regression specification; the estimator and the covariance come from statsmodels.
seasonal_stl_n365_p7ValidatedVALIDATED
harmonic.slopelibrarystatsmodels 0.14.4statsmodels.regression.linear_model.OLS(y, [1, t, sin(2*pi*t/7), cos(2*pi*t/7)]).fit() [params[1]]0.199921201e-9
rationaleThe Fourier design with period 7 is the harmonic regression specification; the estimator and the covariance come from statsmodels.
seasonal_stl_n365_p7ValidatedVALIDATED
harmonic.slopeSelibrarystatsmodels 0.14.4statsmodels.stats.sandwich_covariance.cov_hac_simple(model, nlags=L, use_correction=True)[1,1]0.000375181281e-9
rationaleBartlett-weighted Newey–West covariance with the small-sample correction.
seasonal_stl_n365_p7ValidatedVALIDATED
integrity.duplicateStampsreference-vectorreference-vector: integrity audit specificationcount(intervals == 0)10
rationaleThe reference vector implements the audit specification of the workspace directly: the median sampling interval, gaps beyond 1.5 intervals, duplicated stamps, the missing slots implied by a regular grid, the known sentinel codes and runs of identical readings.
ingest_dirty_n180ValidatedVALIDATED
integrity.gapCountreference-vectorreference-vector: integrity audit specificationcount(intervals > 1.5 * median interval)20
rationaleThe reference vector implements the audit specification of the workspace directly: the median sampling interval, gaps beyond 1.5 intervals, duplicated stamps, the missing slots implied by a regular grid, the known sentinel codes and runs of identical readings.
ingest_dirty_n180ValidatedVALIDATED
integrity.missingSlotsreference-vectorreference-vector: integrity audit specificationmax(0, round(span/median)+1 - observed)10
rationaleThe reference vector implements the audit specification of the workspace directly: the median sampling interval, gaps beyond 1.5 intervals, duplicated stamps, the missing slots implied by a regular grid, the known sentinel codes and runs of identical readings.
ingest_dirty_n180ValidatedVALIDATED
integrity.nonMonotonicStampsreference-vectorreference-vector: integrity audit specificationcount(intervals < 0)00
rationaleThe reference vector implements the audit specification of the workspace directly: the median sampling interval, gaps beyond 1.5 intervals, duplicated stamps, the missing slots implied by a regular grid, the known sentinel codes and runs of identical readings.
ingest_dirty_n180ValidatedVALIDATED
integrity.sentinelCountreference-vectorreference-vector: integrity audit specificationcount(value in known sentinel codes)20
rationaleThe reference vector implements the audit specification of the workspace directly: the median sampling interval, gaps beyond 1.5 intervals, duplicated stamps, the missing slots implied by a regular grid, the known sentinel codes and runs of identical readings.
ingest_dirty_n180ValidatedVALIDATED
integrity.stuckRunCountreference-vectorreference-vector: integrity audit specificationcount(runs of >= 3 identical consecutive readings)10
rationaleThe reference vector implements the audit specification of the workspace directly: the median sampling interval, gaps beyond 1.5 intervals, duplicated stamps, the missing slots implied by a regular grid, the known sentinel codes and runs of identical readings.
ingest_dirty_n180ValidatedVALIDATED
iqr.iqrlibraryNumPy 2.2.6np.quantile(x, .75) - np.quantile(x, .25)3.18689291e-10
rationaleDerived from two identical quantile conventions.
quantile_n101ValidatedVALIDATED
iqr.q1libraryNumPy 2.2.6np.quantile(x, 0.25)-2.05608861e-10
rationaleSame quantile convention; tolerance is numerical only.
quantile_n101ValidatedVALIDATED
iqr.q3libraryNumPy 2.2.6np.quantile(x, 0.75)1.13080431e-10
rationaleSame quantile convention; tolerance is numerical only.
quantile_n101ValidatedVALIDATED
its.hacLaglibraryreference-vector: Newey & West (1994) rulefloor(4 * (n/100) ** (2/9))40
rationaleThe automatic bandwidth is a discrete rule and must match exactly.
intervention_n240_cp120ValidatedVALIDATED
its.postSlopelibrarystatsmodels 0.14.4statsmodels.regression.linear_model.OLS(y, [1, t, post*(t-tau), post]).fit() [params[1] + params[2]]1.19650551e-9
rationaleThe design matrix is the segmented-regression specification of Berndt & Lavis (1991); the ordinary least-squares solver and the Newey–West covariance come from statsmodels, so only the design is specified here.
intervention_n240_cp120ValidatedVALIDATED
its.preSlopelibrarystatsmodels 0.14.4statsmodels.regression.linear_model.OLS(y, [1, t, post*(t-tau), post]).fit() [params[1]]0.299929091e-9
rationaleThe design matrix is the segmented-regression specification of Berndt & Lavis (1991); the ordinary least-squares solver and the Newey–West covariance come from statsmodels, so only the design is specified here.
intervention_n240_cp120ValidatedVALIDATED
its.slopeChangelibrarystatsmodels 0.14.4statsmodels.regression.linear_model.OLS(y, [1, t, post*(t-tau), post]).fit() [params[2]]0.896576391e-9
rationaleThe design matrix is the segmented-regression specification of Berndt & Lavis (1991); the ordinary least-squares solver and the Newey–West covariance come from statsmodels, so only the design is specified here.
intervention_n240_cp120ValidatedVALIDATED
its.slopeChangeSelibrarystatsmodels 0.14.4statsmodels.stats.sandwich_covariance.cov_hac_simple(model, nlags=L, use_correction=True)[2,2]0.00410993551e-9
rationaleBartlett-weighted Newey–West covariance with the n/(n-k) small-sample correction; the bandwidth is the automatic rule of Newey & West (1994).
intervention_n240_cp120ValidatedVALIDATED
kpss.criticallibrarystatsmodels 0.14.4statsmodels.tsa.stattools.kpss(x, regression='c', nlags='auto') [3][array n=4]0
rationalePublished table values, exact comparison.
ar1_n120_phi0.6ValidatedVALIDATED
kpss.criticallibrarystatsmodels 0.14.4statsmodels.tsa.stattools.kpss(x, regression='c', nlags='auto') [3][array n=4]0
rationalePublished table values, exact comparison.
random_walk_n200ValidatedVALIDATED
kpss.lagslibrarystatsmodels 0.14.4statsmodels.tsa.stattools.kpss(x, regression='c', nlags='auto') [2]50
rationaleAutomatic lag rule is discrete and must match exactly.
ar1_n120_phi0.6ValidatedVALIDATED
kpss.lagslibrarystatsmodels 0.14.4statsmodels.tsa.stattools.kpss(x, regression='c', nlags='auto') [2]90
rationaleAutomatic lag rule is discrete and must match exactly.
random_walk_n200ValidatedVALIDATED
kpss.plibrarystatsmodels 0.14.4statsmodels.tsa.stattools.kpss(x, regression='c', nlags='auto') [1]0.100000001e-10
rationaleBoth interpolate the same Kwiatkowski et al. (1992) table.
ar1_n120_phi0.6ValidatedVALIDATED
kpss.plibrarystatsmodels 0.14.4statsmodels.tsa.stattools.kpss(x, regression='c', nlags='auto') [1]0.0100000001e-10
rationaleBoth interpolate the same Kwiatkowski et al. (1992) table.
random_walk_n200ValidatedVALIDATED
kpss.statlibrarystatsmodels 0.14.4statsmodels.tsa.stattools.kpss(x, regression='c', nlags='auto')0.179074431e-10
rationaleDeterministic sums under the Newey–West estimator; only summation order differs.
ar1_n120_phi0.6ValidatedVALIDATED
kpss.statlibrarystatsmodels 0.14.4statsmodels.tsa.stattools.kpss(x, regression='c', nlags='auto')0.883061171e-10
rationaleDeterministic sums under the Newey–West estimator; only summation order differs.
random_walk_n200ValidatedVALIDATED
kurtosislibrarySciPy 1.16.1scipy.stats.kurtosis(x, fisher=True, bias=True)-0.259537321e-10
rationaleFisher excess kurtosis with the biased moment estimator.
random_walk_n200ValidatedVALIDATED
linear.interceptlibraryNumPy 2.2.6np.polyfit(t, x, 1)9.90152541e-9
rationaleLeast-squares intercept; preset absolute tolerance 1e-9.
trend_ar1_n150_slope0.5ValidatedVALIDATED
linear.residuallibraryNumPy 2.2.6x - np.polyval(np.polyfit(t, x, 1), t)[array n=150]1e-9
rationaleResiduals from the same fit; preset absolute tolerance 1e-9.
trend_ar1_n150_slope0.5ValidatedVALIDATED
linear.slopelibraryNumPy 2.2.6np.polyfit(t, x, 1)0.499678761e-9
rationaleLeast-squares slope; two solvers, preset absolute tolerance 1e-9.
trend_ar1_n150_slope0.5ValidatedVALIDATED
madlibrarySciPy 1.16.1scipy.stats.median_abs_deviation(x, scale=1)1.49051131e-10
rationaleUnscaled median absolute deviation; convergence factor is applied separately in the modified Z-score.
quantile_n101ValidatedVALIDATED
mannKendall.exactPlibrarySciPy 1.16.1scipy.stats.kendalltau(x, arange(n), method='exact').pvalue0.0311507941e-12
rationaleBoth enumerate the same permutation null distribution (Mahonian numbers) for n=8 without ties.
small_n8ValidatedVALIDATED
mannKendall.plibrarypymannkendall 1.4.3pymannkendall.original_test(x) → (s, var_s, z, tau, p)00.000001
rationaleTwo-sided normal p-value; tolerance covers the normal-CDF approximation used in the browser.
trend_ar1_n150_slope0.5ValidatedVALIDATED
mannKendall.Slibrarypymannkendall 1.4.3pymannkendall.original_test(x) → (s, var_s, z, tau, p)109090
rationaleInteger discordance sum; exact comparison.
trend_ar1_n150_slope0.5ValidatedVALIDATED
mannKendall.taulibrarypymannkendall 1.4.3pymannkendall.original_test(x) → (s, var_s, z, tau, p)0.976196871e-12
rationaleRatio of two exactly matched quantities.
trend_ar1_n150_slope0.5ValidatedVALIDATED
mannKendall.varSlibrarypymannkendall 1.4.3pymannkendall.original_test(x) → (s, var_s, z, tau, p)378708.331e-10
rationaleSame tie correction formula; only summation order differs.
trend_ar1_n150_slope0.5ValidatedVALIDATED
mannKendall.zlibrarypymannkendall 1.4.3pymannkendall.original_test(x) → (s, var_s, z, tau, p)17.7252631e-10
rationaleContinuity-corrected z from matched S and variance.
trend_ar1_n150_slope0.5ValidatedVALIDATED
mkc3.plibrarynone — no independent implementation availableUNVALIDATED—0
rationaleDepends on the unvalidated MKC3 variance.
trend_ar1_n150_slope0.5UnvalidatedUNVALIDATED
mkc3.zlibrarynone — no independent implementation availableUNVALIDATED—0
rationaleNo installed or published reference implementation of MKC3 is available for comparison.
trend_ar1_n150_slope0.5UnvalidatedUNVALIDATED
mkrd.plibrarynone — no independent implementation availableUNVALIDATED—0
rationaleDepends on the unvalidated MKRD variance.
trend_ar1_n150_slope0.5UnvalidatedUNVALIDATED
mkrd.zlibrarynone — no independent implementation availableUNVALIDATED—0
rationaleNo installed or published reference implementation of MKRD is available for comparison.
trend_ar1_n150_slope0.5UnvalidatedUNVALIDATED
movingAverage.valuesreference-vectorreference-vector: centred mean with truncated edgesmean(x[max(0,i-2):min(n,i+3)])[array n=150]1e-10
rationaleThe edge rule is part of the UI contract; the reference vector evaluates that exact rule.
trend_ar1_n150_slope0.5ValidatedVALIDATED
pacflibrarystatsmodels 0.14.4statsmodels.tsa.stattools.pacf(x, nlags=10, method='ywm')[array n=10]1e-10
rationaleDurbin–Levinson recursion on the same biased autocorrelations.
ar1_n120_phi0.6ValidatedVALIDATED
pearsonlibrarySciPy 1.16.1scipy.stats.pearsonr(x, y)0.716413111e-10
rationaleSame definition; only summation order differs.
corr_pair_n200ValidatedVALIDATED
pearson.plibrarySciPy 1.16.1scipy.stats.pearsonr(x, y).pvalue8.6965947e-330.000001
rationalep-value uses a t approximation; the preset tolerance covers the normal-CDF polynomial used by the browser engine.
corr_pair_n200ValidatedVALIDATED
pelt.breakpointslibraryruptures 1.1.10ruptures.Pelt(model='l2', min_size=round(sqrt(n)), jump=1).fit(x).predict(pen=2*sigma^2*log(n))[array n=3]0
rationalePELT is exact: the optimal segmentation under this cost and penalty is unique, so the boundaries must match exactly rather than within a tolerance.
ar1_n120_phi0.6ValidatedVALIDATED
pelt.breakpointslibraryruptures 1.1.10ruptures.Pelt(model='l2', min_size=round(sqrt(n)), jump=1).fit(x).predict(pen=2*sigma^2*log(n))[array n=5]0
rationalePELT is exact: the optimal segmentation under this cost and penalty is unique, so the boundaries must match exactly rather than within a tolerance.
random_walk_n200ValidatedVALIDATED
pelt.breakpointslibraryruptures 1.1.10ruptures.Pelt(model='l2', min_size=round(sqrt(n)), jump=1).fit(x).predict(pen=2*sigma^2*log(n))[array n=2]0
rationalePELT is exact: the optimal segmentation under this cost and penalty is unique, so the boundaries must match exactly rather than within a tolerance.
regime_shift_n180ValidatedVALIDATED
pelt.penaltylibraryruptures 1.1.102 * (SSE/(n-1)) * log(n)13.3607171e-10
rationaleThe modified BIC penalty in the additive cost scale; derived from the same residual variance.
ar1_n120_phi0.6ValidatedVALIDATED
pelt.penaltylibraryruptures 1.1.102 * (SSE/(n-1)) * log(n)225.205021e-10
rationaleThe modified BIC penalty in the additive cost scale; derived from the same residual variance.
random_walk_n200ValidatedVALIDATED
pelt.penaltylibraryruptures 1.1.102 * (SSE/(n-1)) * log(n)652.239221e-10
rationaleThe modified BIC penalty in the additive cost scale; derived from the same residual variance.
regime_shift_n180ValidatedVALIDATED
pelt.sigma2libraryruptures 1.1.10SSE/(n-1)1.39537761e-10
rationaleUnbiased residual variance of the whole series.
ar1_n120_phi0.6ValidatedVALIDATED
pelt.sigma2libraryruptures 1.1.10SSE/(n-1)21.2525041e-10
rationaleUnbiased residual variance of the whole series.
random_walk_n200ValidatedVALIDATED
pelt.sigma2libraryruptures 1.1.10SSE/(n-1)62.8003701e-10
rationaleUnbiased residual variance of the whole series.
regime_shift_n180ValidatedVALIDATED
qnreference-vectorreference-vector: Rousseeuw & Croux (1993) with R robustbase 0.99 dn table2.2219 * dn * sorted_pairwise_differences[k-1]2.24376561e-10
rationaleThe reference vector implements the published estimator and the dn constants published in R robustbase; no installed Python package provides Qn.
quantile_n101ValidatedVALIDATED
quantile.q25libraryNumPy 2.2.6np.quantile(x, 0.25)-2.05608861e-10
rationaleBoth implementations use linear interpolation; the tolerance only absorbs floating-point summation order.
quantile_n101ValidatedVALIDATED
quantile.q50libraryNumPy 2.2.6np.quantile(x, 0.50)-0.820320151e-10
rationaleBoth implementations use linear interpolation; the tolerance only absorbs floating-point summation order.
quantile_n101ValidatedVALIDATED
quantile.q75libraryNumPy 2.2.6np.quantile(x, 0.75)1.13080431e-10
rationaleBoth implementations use linear interpolation; the tolerance only absorbs floating-point summation order.
quantile_n101ValidatedVALIDATED
sdlibraryNumPy 2.2.6np.std(x, ddof=1)2.13802231e-10
rationaleBoth use the n-1 denominator; only summation order differs.
quantile_n101ValidatedVALIDATED
skewnesslibrarySciPy 1.16.1scipy.stats.skew(x, bias=True)0.512985981e-10
rationaleBiased population moment, identical formula.
random_walk_n200ValidatedVALIDATED
smk.plibrarynone — no independent implementation availableUNVALIDATED—0
rationaleDepends on the unvalidated covariance-adjusted variance.
seasonal_trend_n168_p12UnvalidatedUNVALIDATED
smk.Slibrarypymannkendall 1.4.3pymannkendall.seasonal_test(x, period=12)10920
rationaleSum of per-season integer scores; exact comparison.
seasonal_trend_n168_p12ValidatedVALIDATED
smk.seasonalSenSlopereference-vectorreference-vector: per-season Sen slope, median across seasons (Hipel 1994)median_g(median_{i<j}(x_jg - x_ig)/(j-i))4.80112031e-10
rationaleThe oracle packages expose a pooled seasonal slope; this reference vector implements the specified median-of-season-medians definition directly.
seasonal_trend_n168_p12ValidatedVALIDATED
smk.varSlibrarynone — no independent implementation availableUNVALIDATED—0
rationaleThe specification requires the Hirsch–Slack covariance terms; pymannkendall's seasonal test omits them, so it cannot serve as an oracle for this variance.
seasonal_trend_n168_p12UnvalidatedUNVALIDATED
spc.centerlibraryNumPy 2.2.6np.mean(x)47.1275931e-10
rationaleSame mean; summation order tolerance.
trend_ar1_n150_slope0.5ValidatedVALIDATED
spc.lcllibraryNumPy 2.2.6mean(x) - 3*np.std(x, ddof=1)-18.0658611e-10
rationaleSame sample SD and multiplier.
trend_ar1_n150_slope0.5ValidatedVALIDATED
spc.ucllibraryNumPy 2.2.6mean(x) + 3*np.std(x, ddof=1)112.321051e-10
rationaleSame sample SD and multiplier.
trend_ar1_n150_slope0.5ValidatedVALIDATED
spearmanlibrarySciPy 1.16.1scipy.stats.spearmanr(x, y)0.704384611e-10
rationaleBoth use average ranks for ties.
corr_pair_n200ValidatedVALIDATED
spearman.plibrarySciPy 1.16.1scipy.stats.spearmanr(x, y).pvalue2.6930286e-310.000001
rationalet approximation with the same tolerance rationale as Pearson.
corr_pair_n200ValidatedVALIDATED
stl.residuallibrarystatsmodels 0.14.4statsmodels.tsa.seasonal.STL(x, period=7, seasonal=7, robust=True).fit() [resid][array n=365]0.000001
rationaleIndependent STL implementations differ only in floating-point summation order; the preset absolute tolerance of 1e-6 is applied to values of order 10 and is not loosened after the run.
seasonal_stl_n365_p7ValidatedVALIDATED
stl.seasonallibrarystatsmodels 0.14.4statsmodels.tsa.seasonal.STL(x, period=7, seasonal=7, robust=True).fit() [seasonal][array n=365]0.000001
rationaleIndependent STL implementations differ only in floating-point summation order; the preset absolute tolerance of 1e-6 is applied to values of order 10 and is not loosened after the run.
seasonal_stl_n365_p7ValidatedVALIDATED
stl.trendlibrarystatsmodels 0.14.4statsmodels.tsa.seasonal.STL(x, period=7, seasonal=7, robust=True).fit() [trend][array n=365]0.000001
rationaleIndependent STL implementations differ only in floating-point summation order; the preset absolute tolerance of 1e-6 is applied to values of order 10 and is not loosened after the run.
seasonal_stl_n365_p7ValidatedVALIDATED
stl.weightslibrarystatsmodels 0.14.4statsmodels.tsa.seasonal.STL(x, period=7, seasonal=7, robust=True).fit() [weights][array n=365]0.000001
rationaleIndependent STL implementations differ only in floating-point summation order; the preset absolute tolerance of 1e-6 is applied to values of order 10 and is not loosened after the run.
seasonal_stl_n365_p7ValidatedVALIDATED
tfpw.plibrarypymannkendall 1.4.3pymannkendall.trend_free_pre_whitening_modification_test(x)00.000001
rationaleTwo-sided normal p-value; normal-CDF approximation tolerance.
trend_ar1_n150_slope0.5ValidatedVALIDATED
tfpw.Slibrarypymannkendall 1.4.3pymannkendall.trend_free_pre_whitening_modification_test(x)107760
rationaleInteger score on the whitened series; exact comparison.
trend_ar1_n150_slope0.5ValidatedVALIDATED
tfpw.varSlibrarypymannkendall 1.4.3pymannkendall.trend_free_pre_whitening_modification_test(x)371208.671e-10
rationaleTie-corrected variance on the same whitened series.
trend_ar1_n150_slope0.5ValidatedVALIDATED
tfpw.zlibrarypymannkendall 1.4.3pymannkendall.trend_free_pre_whitening_modification_test(x)17.6851291e-10
rationaleSame continuity-corrected z.
trend_ar1_n150_slope0.5ValidatedVALIDATED
theilSen.hiSlopelibrarySciPy 1.16.1scipy.stats.theilslopes(x, arange(n), alpha=0.95)0.503203551e-10
rationaleSen (1968) order-statistic interval; identical rank arithmetic.
trend_ar1_n150_slope0.5ValidatedVALIDATED
theilSen.interceptlibrarySciPy 1.16.1scipy.stats.theilslopes(x, arange(n), alpha=0.95)10.0058661e-10
rationalemedian(y) - slope * median(x), matching scipy's separate method.
trend_ar1_n150_slope0.5ValidatedVALIDATED
theilSen.loSlopelibrarySciPy 1.16.1scipy.stats.theilslopes(x, arange(n), alpha=0.95)0.495127911e-10
rationaleSen (1968) order-statistic interval; identical rank arithmetic.
trend_ar1_n150_slope0.5ValidatedVALIDATED
theilSen.slopelibrarySciPy 1.16.1scipy.stats.theilslopes(x, arange(n), alpha=0.95)0.499039861e-10
rationaleMedian of all pairwise slopes; exact same pair set.
trend_ar1_n150_slope0.5ValidatedVALIDATED
variancelibraryNumPy 2.2.6np.var(x, ddof=1)4.57113941e-10
rationaleBoth use the n-1 denominator; only summation order differs.
quantile_n101ValidatedVALIDATED
yueWang.correctionFactorlibrarypymannkendall 1.4.3yue_wang_modification_test(x).var_s / original_test(x).var_s0.171457581e-12
rationaleRatio of two variances that must agree; only floating-point summation order differs.
trend_ar1_n150_slope0.5ValidatedVALIDATED
yueWang.nEffectivelibrarypymannkendall 1.4.3n / (corrected var_s / uncorrected var_s)874.851951e-8
rationaleDerived from the two validated variances; the preset absolute tolerance absorbs summation order.
trend_ar1_n150_slope0.5ValidatedVALIDATED
yueWang.plibrarypymannkendall 1.4.3pymannkendall.yue_wang_modification_test(x)00.000001
rationaleTwo-sided normal p-value; normal-CDF approximation tolerance.
trend_ar1_n150_slope0.5ValidatedVALIDATED
yueWang.varSlibrarypymannkendall 1.4.3pymannkendall.yue_wang_modification_test(x)64932.4151e-8
rationaleVariance is of order 6.5e4; the preset absolute tolerance 1e-8 corresponds to a relative error below 2e-13 and only absorbs floating-point summation order.
trend_ar1_n150_slope0.5ValidatedVALIDATED
yueWang.zlibrarypymannkendall 1.4.3pymannkendall.yue_wang_modification_test(x)42.8069561e-10
rationaleSame corrected z formula.
trend_ar1_n150_slope0.5ValidatedVALIDATED

统计验证:如何检查工具的正确性

独立 oracle 测试不是一张“测试通过”的截图,而是与工具未参与编写的实现进行可复现对照,输入可由任何人重建。

使用独立于工具的 oracle

Mann-Kendall 参考实现必须来自外部:pymannkendall、R Kendall 或已发表向量。让引擎与自己比较不能证明任何事情。

比较前先固定容差

看到差异之后再选容差,是合理化而不是验证。这里每一行都在门禁运行前公开容差及其理由。

由种子重建 fixture

只有当输入确定时,统计检验才可复现。每个 fixture 保存种子、生成器与参数,构建过程从 spec 重建它。

相关方法说明

什么算 oracle

ADF、KPSS、STL、ACF、PACF 使用 statsmodels;Theil–Sen、相关、偏度与峰度使用 SciPy;Mann–Kendall 家族使用 pymannkendall;分位数与最小二乘使用 NumPy。没有可用安装实现时,使用已发表参考向量并明确标注。

晋升规则

只有当 oracle 独立、容差在运行前写入、fixture 可由种子与参数重建、门禁通过、参考库版本一致时,一行才成为 VALIDATED。失败行阻断构建。

哪些未验证

MKRD、MKC3 与协方差校正的季节 MK p 值没有可用独立 oracle。它们已实现,在界面中标记 UNVALIDATED,且只要存在已验证替代,就绝不承担头条结论。

自己重跑

克隆仓库并运行 npm run verify:gate。命令会从 spec 重建 fixture,运行 Python oracle(statsmodels 0.14.4、SciPy 1.16.1、pymannkendall 1.4.3),将 TypeScript 引擎与 reference_vectors.json 对照,并重写 VALIDATION.md 与本页读取的 JSON。

哪些未验证,以及为什么

这些统计量已实现并展示,但没有可用的独立实现。界面永久标记它们;只要存在已验证替代,它们绝不承担头条结论。

mkc3.pUNVALIDATEDtrend_ar1_n150_slope0.5 · tolerance 0

Depends on the unvalidated MKC3 variance.

Shown in the UI with a permanent UNVALIDATED badge.

mkc3.zUNVALIDATEDtrend_ar1_n150_slope0.5 · tolerance 0

No installed or published reference implementation of MKC3 is available for comparison.

Shown in the UI with a permanent UNVALIDATED badge.

mkrd.pUNVALIDATEDtrend_ar1_n150_slope0.5 · tolerance 0

Depends on the unvalidated MKRD variance.

Shown in the UI with a permanent UNVALIDATED badge.

mkrd.zUNVALIDATEDtrend_ar1_n150_slope0.5 · tolerance 0

No installed or published reference implementation of MKRD is available for comparison.

Shown in the UI with a permanent UNVALIDATED badge.

smk.pUNVALIDATEDseasonal_trend_n168_p12 · tolerance 0

Depends on the unvalidated covariance-adjusted variance.

Shown in the UI with a permanent UNVALIDATED badge.

smk.varSUNVALIDATEDseasonal_trend_n168_p12 · tolerance 0

The specification requires the Hirsch–Slack covariance terms; pymannkendall's seasonal test omits them, so it cannot serve as an oracle for this variance.

Shown in the UI with a permanent UNVALIDATED badge.

重跑整个矩阵

fixture 生成器、Python oracle 与门禁都在仓库中。无私有服务,无手工步骤。

# Python oracle: statsmodels 0.14.4, scipy 1.16.1, pymannkendall 1.4.3
npm run verify:fixtures   # deterministic fixtures from specs.json
npm run verify:oracle     # reference_vectors.json
npm run verify:gate       # compare + rewrite VALIDATION.md

参考库版本:statsmodels 0.14.4; scipy 1.16.1; numpy 2.2.6; pymannkendall 1.4.3; ruptures v1.1.10

Oracle 类型
library

本地安装的第三方实现。

Oracle 类型
reference-vector

独立求值的已发表估计量。

Oracle 类型
measured

记录的测量值,仅在无实现时使用。