v4.0.0 Release Notes
This release introduces confidence bounds estimation for the Hodges-Lehmann shift estimator, enabling statistically valid interval estimates for location shifts between two samples across all supported languages.
Breaking Changes
- Removed
Intervalclass (C#): Replaced by the newBoundsclass withLower/Upperproperties and measurement unit support. Code usingInterval.Left/Interval.Rightmust migrate toBounds.Lower/Bounds.Upper.
Features
- ShiftBounds estimator: Computes confidence bounds for the location shift between two samples. Given samples X and Y and a misrate α, returns an interval where the true shift lies with probability 1-α.
- PairwiseMargin function: Computes the symmetric margin for Mann-Whitney U distribution at a target misrate. Uses exact computation (Loeffler 1982 recurrence) for small samples (n+m ≤ 400) and Edgeworth expansion with 6th-order correction for large samples.
- Multi-language support: ShiftBounds and PairwiseMargin implemented in C#, Go, Kotlin, Python, R, Rust, and TypeScript.
Improvements
- New
Boundsclass (C#): Represents intervals with lower/upper bounds and measurement unit, replacing the deprecatedIntervalclass. - Helper functions: Added
BinomialCoefficientFunction(Pascal's triangle with log-gamma fallback) andFactorialFunction(direct computation with gamma fallback). - Coverage simulation: New
CoverageSimulationvalidates empirical coverage matches target misrate. - Refactored simulation infrastructure: Extracted
SimulationBasefromDriftSimulationBasewith parallel execution, progress tracking, and incremental persistence.
Documentation
- Added methodology guides: confidence interval misrate interpretation, Mann-Whitney margin theory.
- Added algorithm description: fast pairwise margin computation.
- Added estimator references: ShiftBounds user guide, PairwiseMargin function reference.
- Added academic references: Loeffler (1982), Fix & Hodges (1955).
- Added test documentation: 346 pairwise-margin test cases, 61 shift-bounds test cases.
- Updated all language-specific README files with new API examples.
Internal
- Upgraded to .NET 10.0.
- Migrated build tasks to
target:actionnaming convention. - Added 407 cross-language reference test cases for pairwise-margin and shift-bounds.
- Minor refactoring in
FastSpread,CollectionExtensions,MathExtensions.
Full Changelog: https://github.com/AndreyAkinshin/pragmastat/compare/v3.2.4...v4.0.0