Skip to content

StatKit beta 8

Latest

Choose a tag to compare

@JimmyMAndersson JimmyMAndersson released this 24 May 09:46
· 1 commit to main since this release

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. FiskDistribution is included as a type alias for LogLogisticDistribution.
  • Added the Goodman-Kruskal gamma coefficient as a new measure of ordinal association.
  • The kendallTau method no longer requires the ConvertibleToReal constraint - Comparable and Hashable are 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.closestOrOddIndexed has 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!