Skip to content
Back to Laboratoriya

Accuracy

Accuracy and certification

This page shows in numbers how accurate our computation is. Every value is measured on the certified NIST StRD datasets by the real compute code at the moment the page is built — no figure here is typed in by hand.

Why LRE, and not an absolute difference

Accuracy is measured as a Log Relative Error (LRE):

LRE = −log₁₀( |computed − certified| / |certified| )

The condition “|a − b| < 1e-10” measures nothing on its own: near 1e-15 it is trivially satisfied and near 1e12 it is impossible — it measures the magnitude of the operands, not the quality of the computation. LRE is scale-free and reads directly as “how many digits are correct”. It is also the metric NIST itself publishes, which keeps our figures directly comparable with its certification.

Float64 carries about 15.95 decimal digits, so reported values are capped at 15; a value marked “exact” matched identically.

Tolerance policy

The minimum LRE permitted for each quantity. These are the project's published commitment: a change that drops below one of them is not accepted at all.

QuantityMinimum LRE
Descriptive statistics13
Regression — well-conditioned11
Regression — ill-conditioned (Filip, Longley)7
Distribution function — central region13
Tail probabilities (p < 0.001)8
Test statistics11

NIST StRD — linear least squares

Each dataset is solved with the model NIST declares in its own header. κ is the condition number: the larger it is, the harder the problem. The Coef. and SE columns report the worst entry of the coefficient vector and of its standard errors.

DatasetκCoef.SEFloorState
Norris36 obs. · 2 params8.55·10²1.000013.7113.8711Clears the floor
Pontius40 obs. · 3 params1.42·10¹³1.000012.8514.0511Clears the floor
NoInt111 obs. · 1 params1.000.999414.72exact11Clears the floor
NoInt23 obs. · 1 params1.000.9933exactexact11Clears the floor
Longley16 obs. · 7 params4.86·10⁹0.995511.1312.247Clears the floor
Wampler121 obs. · 6 params6.40·10⁶1.000010.789.877Clears the floor
Wampler221 obs. · 6 params6.40·10⁶1.000012.8514.917Clears the floor
Wampler321 obs. · 6 params6.40·10⁶1.000010.3613.297Clears the floor
Wampler421 obs. · 6 params6.40·10⁶0.95758.6013.237Clears the floor
Wampler521 obs. · 6 params6.40·10⁶0.00226.5913.237Float64 ceiling
FilipFlagship test82 obs. · 11 params1.78·10¹⁵0.99677.677.697Clears the floor

Every dataset is solved by QR (Householder) decomposition, and none is found rank-deficient. Forming XᵀX squares the condition number — which is precisely why commercial packages returned zero correct digits on Filip.

Wampler4 and Wampler5 are deliberately constructed: the certified solution stays exactly (1, 1, 1, 1, 1, 1) while a very large noise term is added on top, which is what the certified R² reveals. Least-squares error is bounded by a κ²·ε·tan θ term, and with a residual that large it is that term which dominates. This is therefore the float64 ceiling for the problem, not a defect in the solver. Loosening the solver to “improve” these figures would be the wrong fix.

NIST StRD — summary statistics

NIST built these datasets to test the mean and the standard deviation. The right-hand column matters: in NumAcc3 and NumAcc4 the decimal inputs do not round-trip through float64, so the stored data genuinely has a different standard deviation from the one NIST certifies. Reading the two columns side by side separates algorithm error from input-representation error.

DatasetnMeanSD (NIST)SD (stored data)
PiDigits5000exact14.91exact
Lottery218exactexactexact
Lew200exactexactexact
Mavro50exact13.12exact
Michelso100exact13.86exact
NumAcc13exactexactexact
NumAcc21001exact14.2014.22
NumAcc31001exact9.4614.37
NumAcc41001exact8.2514.78

Reference libraries

A reference value of unknown origin is a superstition. Every number here is either certified by NIST or produced by the versions recorded below.

mpmath
1.3.0
scipy
1.10.1
numpy
1.26.4
statsmodels
0.14.6
python
3.10.11
Generated
2026-07-29
Seed
20260729
Digits stored
25 significant digits
mpmath working precision
50 decimal digits

Why two references

Two independent implementations agreeing to 13 digits is evidence; one agreeing with itself is none. mpmath works at 50 decimal digits and therefore serves as the true reference; SciPy is an independent float64 implementation of an entirely separate lineage.

R is prepared as a third reference (the script is committed), but R was not installed on the machine that produced the fixtures. Without the R fixtures the corresponding tests skip with the reason stated — running the script on any machine with R enables them with no code change.

Which analyses are verified

Every analysis is checked against reference values, but the strength of the evidence differs — and pretending otherwise would be dishonest. Each analysis states which source backs it.

AnalysisReference sourceCases
Descriptive statisticsSciPy — independent implementation4
Frequency distributionA documented formula1
Shapiro-Wilk testSciPy — independent implementation5
t-test (independent samples)SciPy — independent implementation2
t-test (paired samples)SciPy — independent implementation1
One-way analysis of varianceSciPy — independent implementation2
Mann-Whitney U testSciPy + a documented formula2
Wilcoxon signed-rank testSciPy + a documented formula2
Kruskal-Wallis testSciPy + a documented formula2
Correlation analysisSciPy — independent implementation2
Pearson's χ² testSciPy — independent implementation · A documented formula4
Linear regressionstatsmodels — independent OLS2
Reliability analysisA documented formula1
Factorial analysis of variancestatsmodels — independent OLS1
Repeated-measures analysis of variancestatsmodels — independent OLS · A documented formula1
Analysis of covariance (ANCOVA)statsmodels — independent OLS1
Friedman testSciPy + a documented formula1
Correlation matrixSciPy — independent implementation · statsmodels — independent OLS1
Logistic regressionstatsmodels — independent OLS1
SciPy — independent implementation
An implementation of the same test in a different language and of a different lineage. The strongest routine check available here.
statsmodels — independent OLS
An independent OLS implementation for coefficients, standard errors, confidence intervals and VIF.
SciPy + a documented formula
The statistic and p-value are cross-verified against SciPy; a quantity SciPy does not expose (a rank-biserial correlation, ε²) comes from a documented closed form. That is formula-verified, not cross-library verified.
A documented formula
A closed form with no second implementation in this toolchain. Verified by derivation and by algebraic identities asserted in the tests.

What we do not claim

An accuracy report may only claim what it measured. The following sits outside it:

  • The confidence interval of the ε² effect size is a seeded bootstrap (BCa). No fixture can certify it, because a second implementation would use a different random stream. The fixture carries the point estimate only; the interval is verified by property instead — determinism under a fixed seed, containment of the point estimate, and one-sidedness.
  • The studentized range distribution (used for Tukey comparisons) is computed at 60 points through SciPy QUADPACK in float64, not in arbitrary precision, because no library in this toolchain ships ptukey. The k = 2 case is pinned to an exact closed form, which validates the entire integration path at full float64 precision.
  • Accuracy does not guarantee that a result is interpreted correctly. Choosing the test, framing the hypothesis and drawing the conclusion remain the researcher's.
  • The figures on this page belong to this version of the code. If a reference-library version is deliberately upgraded, that lands as its own change with the LRE deltas reported.