Skip to content

tests: NPTESTS independent samples against R, run bounds against enumeration - #450

Merged
TonisOrmisson merged 1 commit into
mainfrom
audit-npt
Nov 26, 2026
Merged

TonisOrmisson merged 1 commit into
mainfrom
audit-npt

Conversation

@TonisOrmisson

Copy link
Copy Markdown
Contributor

Test only. The independent-samples tests of NPTESTS and their pairwise and stepwise comparisons, checked on 63 invented readings with many ties against the manual's formulas written out in base R (with kruskal.test, wilcox.test and chisq.test as a second check where they apply): Kruskal-Wallis, median (Yates for pairs above 30 cases), Jonckheere-Terpstra with the tie variance, Dunn pairwise with Bonferroni, pairwise median and JT, stepwise subsets, Mann-Whitney asymptotic, Kolmogorov-Smirnov, Moses, Hodges-Lehmann with limits. No discrepancy.

One difference on record (Wald-Wolfowitz fewest and most runs with ties): the manual's printed steps, transcribed into R, disagree with exhaustive enumeration in 17 of 301 random tie patterns, in both directions, so they cannot be the intended bounds. The engine computes the true bounds by dynamic programming; a new unit test checks it against enumeration on 300 random patterns. Scripts in lab/oracles/nptests-r; choices in planning README section 8.

@TonisOrmisson
TonisOrmisson merged commit 49ca21a into main Nov 26, 2026
3 checks passed
@TonisOrmisson
TonisOrmisson deleted the audit-npt branch November 26, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant