Welcome to the StatKit beta.
StatKit beta 8 brings new distributions, new association measures, and important correctness fixes across the library.
New in this release:
- Three new distributions have been added - the Arcsine, Logistic, and Log-Logistic distributions.
FiskDistributionis included as a type alias forLogLogisticDistribution. - Added the Goodman-Kruskal gamma coefficient as a new measure of ordinal association.
- The
kendallTaumethod no longer requires theConvertibleToRealconstraint -ComparableandHashableare now sufficient, matching the ordinal nature of the statistic. - The binomial distribution now uses Walker's alias table for O(1) batch sampling, replacing the previous linear CDF search.
- The normal distribution's Box-Muller sampler now consumes both outputs of each transform pair, halving the number of transcendental function calls.
- The test suite has been migrated from XCTest to Swift Testing across all distribution types.
- Updated the documentation, renaming the "Combinatorial Extensions" catalog page to "Mathematical Functions" and expanding doc comments throughout.
Deprecations:
QuantileEstimationMethod.closestOrOddIndexedhas been renamed to.closest(breaking change).GammaDistribution.init(alpha:beta:)is now formally marked as deprecated.
Fixes:
- Fixed an off-by-one index error affecting all quantile estimation methods.
- Fixed the binomial distribution's PMF calculation crashing on overflow for large trial counts by moving to log-space arithmetic. Also added boundary guards for p=0 and p=1.
- Fixed the exponential distribution's log-PDF branch using the wrong sign, causing the density to grow rather than decay.
- Fixed the beta distribution's PDF returning 0 at the boundary points x=0 and x=1 when the true density is infinite or finite non-zero.
- Fixed the normal distribution's Box-Muller sampler producing ±infinity when sampling at the boundary of the unit interval.
- Fixed sample variance returning 0 instead of NaN for single-element collections.
Full Changelog:
Feel free to help me develop and maintain this library if you like it!
https://github.com/sponsors/JimmyMAndersson
Thank you, and enjoy using StatKit!