Redesigns the Ratio estimator using log-space aggregation to achieve exact multiplicative antisymmetry, and introduces the new RatioBounds estimator for confidence bounds on sample ratios.
Breaking Changes
- Ratio estimator redesign: Ratio now uses geometric interpolation instead of arithmetic interpolation for even m×n cases. This ensures exact multiplicative antisymmetry (
Ratio(x,y) × Ratio(y,x) = 1) but changes return values when the two middle pairwise ratios differ. For example,Ratio([1,2], [1])changes from 1.5 to √2 ≈ 1.414.
Features
- RatioBounds estimator: New estimator providing confidence bounds on Ratio via log-space delegation to ShiftBounds. Available in all 7 languages (C#, Go, Kotlin, Python, R, Rust, TypeScript).
- Ratio as multiplicative dual of Shift: Ratio is now defined as
exp(Shift(log(x), log(y))), providing exact multiplicative antisymmetry and O((m+n) log L) complexity via FastShift delegation.
Bug Fixes
- KaTeX definitions: Add missing RatioBounds entry for proper
\operatorname{}rendering in web documentation. - Cross-reference mapping: Add sec-fast-ratio xref mapping to resolve warning during web generation.
Documentation
- Add comprehensive manual documentation for Ratio redesign and RatioBounds estimator, including algorithm descriptions (FastRatio), methodology updates, and test documentation.
- Update demo examples in all 7 languages to use consecutive odd numbers
[1,3,5,7,9]instead of even numbers, ensuring compatibility with RelSpread and Ratio/RatioBounds positivity requirements. - Add RatioBounds examples to all language READMEs and demo programs.
- Remove sparity-violating test cases (n=1, zero spread) from Spread and AvgSpread documentation.
Internal
- Add 61 reference test fixtures for RatioBounds covering demos, natural sequences, property validation, edge cases, distribution tests, and misrate variations.
- Regenerate test fixtures with updated seeds and remove edge cases with zero values.
- Update Ratio test fixtures to reflect geometric interpolation for even m×n cases.
- Reduce CI artifact retention to 1 day and disable release discussions.
Full Changelog: https://github.com/AndreyAkinshin/pragmastat/compare/v5.2.1...v6.0.0