mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-04-30 12:00:39 +00:00
8c7017a99d
- Update obioptions.Version from "Release 4.4.29" to "/v/ Release v5" - Update version.txt from 4.29 → .30 (automated by Makefile)
1.5 KiB
1.5 KiB
obistats.TDist: Student's t-Distribution Implementation
This Go package provides a lightweight implementation of the Student’s t-distribution, commonly used in statistical inference (e.g., hypothesis testing, confidence intervals) when sample sizes are small or population variance is unknown.
Core Components
-
TDiststruct:
Represents a t-distribution parameterized by degrees of freedomV. -
PDF(x)method:
Computes the probability density function at pointx, using:f(x) = \frac{\Gamma\left(\frac{V+1}{2}\right)}{\sqrt{V\pi} \, \Gamma\left(\frac{V}{2}\right)} \left(1 + \frac{x^2}{V} \right)^{-\frac{V+1}{2}}Leverages
lgammafor numerical stability in Gamma function evaluation. -
CDF(x)method:
Computes the cumulative distribution function:- Returns
0.5at symmetry point (x == 0); - Uses the regularized incomplete beta function
mathBetaIncforx > 0; - Exploits symmetry:
CDF(-x) = 1 − CDF(x)forx < 0.
- Returns
-
Bounds()method:
Returns a practical truncation interval[-4, 4], sufficient for most visualizations or numerical integration over the central mass of the distribution.
Dependencies & Notes
- Relies on standard library
mathand custom/internal helpers (lgamma,mathBetaInc) — likely from a shared internal module. - Designed for performance and numerical robustness, suitable in statistical tooling or benchmark analysis (as suggested by the
obistatspackage name and reference to a bench-related repo).