Skip to content

NPTESTS one-sample and related-samples tests against R; Smirnov series with pi - #456

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 file: 36 invented cases with ties and zero differences, one-sample and related-samples tests against R (wilcox.test, binom.test, friedman.test, mcnemar.test, chisq.test) and the manual's formulas in base R for the rest (Cochran Q, Kendall W, marginal homogeneity, runs, Lilliefors, Poisson and the other Kolmogorov-Smirnov forms, the pairwise and stepwise comparisons).

One fix: the NPTESTS pages write the Smirnov series with pi, the engine used the seven-digit constants of the NPAR TESTS pages, so p was off by about 1e-7 for a statistic between 0.27 and 1. NPTESTS uses pi now; NPAR TESTS is unchanged.

On record, no change: the manual's Hodges-Lehmann estimate for related samples keeps zero differences in the Walsh averages, R's wilcox.test(conf.int = TRUE) drops them first; the engine follows the manual.

Review: /code-review low on the worktree, no findings. Clippy clean.

@TonisOrmisson
TonisOrmisson merged commit 847356a into main Nov 26, 2026
3 checks passed
@TonisOrmisson
TonisOrmisson deleted the audit-npt branch November 26, 2026 22:22
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