Versions in this module Expand all Collapse all v0 v0.15.10 Jul 31, 2024 v0.15.9 Jul 31, 2024 v0.15.8 Jul 31, 2024 Changes in this version + var ErrMismatchedSamples = errors.New("samples have different lengths") + var ErrSampleSize = errors.New("sample is too small") + var ErrZeroVariance = errors.New("sample has zero variance") + func Bounds(xs []float64) (min float64, max float64) + func GeoMean(xs []float64) float64 + func Mean(xs []float64) float64 + func StdDev(xs []float64) float64 + func Variance(xs []float64) float64 + type LocationHypothesis int + const LocationDiffers + const LocationGreater + const LocationLess + type Sample struct + Sorted bool + Xs []float64 + func (s *Sample) Clear() + func (s *Sample) FilterOutliers() + func (s *Sample) Percentile(pctile float64) float64 + func (s *Sample) Sort() *Sample + func (s Sample) Bounds() (min float64, max float64) + func (s Sample) Copy() *Sample + func (s Sample) GeoMean() float64 + func (s Sample) IQR() float64 + func (s Sample) Mean() float64 + func (s Sample) StdDev() float64 + func (s Sample) Sum() float64 + func (s Sample) Variance() float64 + func (s Sample) Weight() float64 + type TDist struct + V float64 + func (t TDist) Bounds() (float64, float64) + func (t TDist) CDF(x float64) float64 + func (t TDist) PDF(x float64) float64 + type TTestResult struct + AltHypothesis LocationHypothesis + DoF float64 + N1 int + N2 int + P float64 + T float64 + func OneSampleTTest(x TTestSample, μ0 float64, alt LocationHypothesis) (*TTestResult, error) + func PairedTTest(x1, x2 []float64, μ0 float64, alt LocationHypothesis) (*TTestResult, error) + func TwoSampleTTest(x1, x2 TTestSample, alt LocationHypothesis) (*TTestResult, error) + func TwoSampleWelchTTest(x1, x2 TTestSample, alt LocationHypothesis) (*TTestResult, error) + type TTestSample interface + Mean func() float64 + Variance func() float64 + Weight func() float64