StatsToTable

How we know the statistics are right

Most statistical tools do not publish this. We think that is a mistake: a number you cannot check is a number you have to take on faith. This page is the complete record of what has been verified, how, and — importantly — what has not.

The short version

Every procedure in StatsToTable is checked three ways: against published critical values, against hand computation on small datasets where the arithmetic can be followed by eye, and against independent numerical methods that share no code with the implementation. The test suite runs in Node and is included in the repository.

The verification record

What is checkedHowResult
t distribution Critical values at conventional levels, compared with published tables Agreement to 1×10⁻¹³
t cumulative distribution Direct numerical integration of the density, which uses none of the code under test Maximum deviation 1.1×10⁻¹³ across df 1–500
Chi-square cumulative distribution For even degrees of freedom the CDF has an exact finite Poisson-sum form; compared against it Maximum deviation 4.6×10⁻¹⁵
F distribution Critical values at the 95th percentile Agreement to 2.7×10⁻⁹
Paired t test Reproducing Student's original 1908 sleep-data analysis t = 4.062, p = .0028 — matches the published result
Independent t test Hand-computed pooled and Welch statistics, including the Welch degrees of freedom Exact; Welch df = 5.882 derived by hand
One-way ANOVA Hand-computed sums of squares and F on a three-group example SS = 54 and 6, F = 27 — exact
Repeated-measures ANOVA Two identities: with two conditions F must equal t², and the sums of squares must decompose exactly F = t² to 1×10⁻⁹; SS decomposition exact to 1×10⁻¹⁰
Mauchly's sphericity test Compound-symmetric data (should not reject) and heteroscedastic data (should reject) W = 0.965, p = .51 · W = 0.603, p = .0039, ε = .716
Chi-square and Fisher exact Hand-computed 2×2 tables χ² = 0.7937; Fisher p = 0.4857 — exact
Kruskal–Wallis Hand-computed H with tie correction H = 7.2 — exact
Word export The generated package is read back part by part: all five parts present, every XML document parses, the table grid fills the text width, no vertical rule is emitted, and the rule weights are the intended 1.5 pt / 0.75 pt / 1.5 pt Structure verified. Rendering inside an office suite has not been checked

Why independent checks matter more than unit tests

A unit test confirms that the code does what the author expected. If the author misunderstood the formula, the test passes and the number is still wrong. That is the failure mode that matters in statistics, because the output looks plausible either way.

So the checks above deliberately use methods that share no code with the implementation. The t distribution is cross-checked by integrating its density; the chi-square distribution by an exact closed form that only holds for even degrees of freedom; repeated-measures ANOVA by an algebraic identity that must hold when there are exactly two conditions. If any of these disagree, something is wrong — and it will be visible as a number, not as a hunch.

What we have not verified

This section matters more than the table above.

Check it yourself

None of this requires trusting this page. The verification suite ships with the source: eight files, each printing pass or fail per assertion. Run them and watch. If something disagrees with your own reference implementation, we would rather know.

Why publish this at all

Because the alternative is a number in a table that you have no way to interrogate. Statistical software earns trust by being inspectable, and the least a tool can do is show its working.

The statistical choices behind the numbers · StatsToTable compared with SPSS

StatsToTable compared with SPSS · which test should I use