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 Interval class (C#): Replaced by the new Bounds class with Lower/Upper properties and measurement unit support. Code using Interval.Left/Interval.Right must migrate to Bounds.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 Bounds class (C#): Represents intervals with lower/upper bounds and measurement unit, replacing the deprecated Interval class.
  • Helper functions: Added BinomialCoefficientFunction (Pascal's triangle with log-gamma fallback) and FactorialFunction (direct computation with gamma fallback).
  • Coverage simulation: New CoverageSimulation validates empirical coverage matches target misrate.
  • Refactored simulation infrastructure: Extracted SimulationBase from DriftSimulationBase with 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:action naming 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