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.
| Quantity | Minimum LRE |
|---|---|
| Descriptive statistics | 13 |
| Regression — well-conditioned | 11 |
| Regression — ill-conditioned (Filip, Longley) | 7 |
| Distribution function — central region | 13 |
| Tail probabilities (p < 0.001) | 8 |
| Test statistics | 11 |
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 | κ | R² | Coef. | SE | Floor | State |
|---|---|---|---|---|---|---|
| Norris36 obs. · 2 params | 8.55·10² | 1.0000 | 13.71 | 13.87 | ≥ 11 | Clears the floor |
| Pontius40 obs. · 3 params | 1.42·10¹³ | 1.0000 | 12.85 | 14.05 | ≥ 11 | Clears the floor |
| NoInt111 obs. · 1 params | 1.00 | 0.9994 | 14.72 | exact | ≥ 11 | Clears the floor |
| NoInt23 obs. · 1 params | 1.00 | 0.9933 | exact | exact | ≥ 11 | Clears the floor |
| Longley16 obs. · 7 params | 4.86·10⁹ | 0.9955 | 11.13 | 12.24 | ≥ 7 | Clears the floor |
| Wampler121 obs. · 6 params | 6.40·10⁶ | 1.0000 | 10.78 | 9.87 | ≥ 7 | Clears the floor |
| Wampler221 obs. · 6 params | 6.40·10⁶ | 1.0000 | 12.85 | 14.91 | ≥ 7 | Clears the floor |
| Wampler321 obs. · 6 params | 6.40·10⁶ | 1.0000 | 10.36 | 13.29 | ≥ 7 | Clears the floor |
| Wampler421 obs. · 6 params | 6.40·10⁶ | 0.9575 | 8.60 | 13.23 | ≥ 7 | Clears the floor |
| Wampler521 obs. · 6 params | 6.40·10⁶ | 0.0022 | 6.59 | 13.23 | ≥ 7 | Float64 ceiling |
| FilipFlagship test82 obs. · 11 params | 1.78·10¹⁵ | 0.9967 | 7.67 | 7.69 | ≥ 7 | Clears 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.
| Dataset | n | Mean | SD (NIST) | SD (stored data) |
|---|---|---|---|---|
| PiDigits | 5000 | exact | 14.91 | exact |
| Lottery | 218 | exact | exact | exact |
| Lew | 200 | exact | exact | exact |
| Mavro | 50 | exact | 13.12 | exact |
| Michelso | 100 | exact | 13.86 | exact |
| NumAcc1 | 3 | exact | exact | exact |
| NumAcc2 | 1001 | exact | 14.20 | 14.22 |
| NumAcc3 | 1001 | exact | 9.46 | 14.37 |
| NumAcc4 | 1001 | exact | 8.25 | 14.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
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.
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.
| Analysis | Reference source | Cases |
|---|---|---|
| Descriptive statistics | SciPy — independent implementation | 4 |
| Frequency distribution | A documented formula | 1 |
| Shapiro-Wilk test | SciPy — independent implementation | 5 |
| t-test (independent samples) | SciPy — independent implementation | 2 |
| t-test (paired samples) | SciPy — independent implementation | 1 |
| One-way analysis of variance | SciPy — independent implementation | 2 |
| Mann-Whitney U test | SciPy + a documented formula | 2 |
| Wilcoxon signed-rank test | SciPy + a documented formula | 2 |
| Kruskal-Wallis test | SciPy + a documented formula | 2 |
| Correlation analysis | SciPy — independent implementation | 2 |
| Pearson's χ² test | SciPy — independent implementation · A documented formula | 4 |
| Linear regression | statsmodels — independent OLS | 2 |
| Reliability analysis | A documented formula | 1 |
| Factorial analysis of variance | statsmodels — independent OLS | 1 |
| Repeated-measures analysis of variance | statsmodels — independent OLS · A documented formula | 1 |
| Analysis of covariance (ANCOVA) | statsmodels — independent OLS | 1 |
| Friedman test | SciPy + a documented formula | 1 |
| Correlation matrix | SciPy — independent implementation · statsmodels — independent OLS | 1 |
| Logistic regression | statsmodels — independent OLS | 1 |
- 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.