stats

package
v0.0.0-...-249e25c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CohensD

func CohensD(a, b TestSample) float64

func GlassDelta

func GlassDelta(a, b TestSample) float64

func HedgesG

func HedgesG(a, b TestSample) float64

func PooledStdDev

func PooledStdDev(a, b TestSample) float64

func StdMeanDiff

func StdMeanDiff(a, b TestSample, s float64) float64

func TDistribution

func TDistribution(t, v float64) float64

TDistribution student's t-distribution SEE https://en.wikipedia.org/wiki/Student%27s_t-distribution#Definition

func WelchSatterthwaite

func WelchSatterthwaite(a, b TestSample) float64

WelchSatterthwaite pooled degrees of freedom SEE https://en.wikipedia.org/wiki/Welch%E2%80%93Satterthwaite_equation

func WelchTTest

func WelchTTest(a, b TestSample) float64

WelchTTest unequal variances t-test SEE: https://en.wikipedia.org/wiki/Welch%27s_t-test

Types

type EMA

type EMA struct {
	// contains filtered or unexported fields
}

EMA ...

func NewEMA

func NewEMA(alpha float64) EMA

NewEMA ...

func (*EMA) Empty

func (a *EMA) Empty() bool

Empty ...

func (*EMA) Set

func (a *EMA) Set(v float64)

Set ...

func (*EMA) Update

func (a *EMA) Update(v float64)

Update ...

func (*EMA) Value

func (a *EMA) Value() float64

Value ...

type SMA

type SMA struct {
	// contains filtered or unexported fields
}

SMA ...

func NewSMA

func NewSMA(n int, d time.Duration) SMA

NewSMA ...

func (*SMA) Add

func (s *SMA) Add(v uint64)

Add ...

func (*SMA) AddN

func (s *SMA) AddN(c, v uint64)

AddN ...

func (*SMA) AddNWithTime

func (s *SMA) AddNWithTime(c, v uint64, t timeutil.Time)

AddNWithTime ...

func (*SMA) AddWithTime

func (s *SMA) AddWithTime(v uint64, t timeutil.Time)

AddWithTime ...

func (*SMA) Interval

func (s *SMA) Interval() time.Duration

Interval ...

func (*SMA) IntervalWithTime

func (s *SMA) IntervalWithTime(t timeutil.Time) time.Duration

IntervalWithTime ...

func (*SMA) Rate

func (s *SMA) Rate(d time.Duration) uint64

Rate ...

func (*SMA) RateWithTime

func (s *SMA) RateWithTime(d time.Duration, t timeutil.Time) uint64

RateWithTime ...

func (*SMA) Reset

func (s *SMA) Reset()

func (*SMA) ResetWithTime

func (s *SMA) ResetWithTime(t timeutil.Time)

func (*SMA) SampleCount

func (s *SMA) SampleCount() uint64

SampleCount ...

func (*SMA) SampleCountWithTime

func (s *SMA) SampleCountWithTime(t timeutil.Time) uint64

SampleCountWithTime ...

func (*SMA) SampleInterval

func (s *SMA) SampleInterval() time.Duration

SampleInterval ...

func (*SMA) SampleIntervalWithTime

func (s *SMA) SampleIntervalWithTime(t timeutil.Time) time.Duration

SampleIntervalWithTime ...

func (*SMA) SampleRate

func (s *SMA) SampleRate(d time.Duration) uint64

SampleRate ...

func (*SMA) SampleRateWithTime

func (s *SMA) SampleRateWithTime(d time.Duration, t timeutil.Time) uint64

SampleRateWithTime ...

func (*SMA) Value

func (s *SMA) Value() uint64

Value ...

func (*SMA) ValueWithTime

func (s *SMA) ValueWithTime(t timeutil.Time) uint64

ValueWithTime ...

type TestSample

type TestSample interface {
	Count() float64
	Mean() float64
	Variance() float64
	StdDev() float64
}

TestSample ...

type Welford

type Welford struct {
	// contains filtered or unexported fields
}

Welford implements Welford's online algorithm for variance SEE: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm

func WelfordMerge

func WelfordMerge(ws ...Welford) Welford

func (Welford) Count

func (w Welford) Count() float64

Count ...

func (Welford) Mean

func (w Welford) Mean() float64

Mean ...

func (*Welford) Reset

func (w *Welford) Reset()

Reset ...

func (Welford) StdDev

func (w Welford) StdDev() float64

StdDev ...

func (*Welford) Update

func (w *Welford) Update(v float64)

Update ...

func (Welford) Value

func (w Welford) Value() (mean, variance, sampleVariance float64)

Value ...

func (Welford) Variance

func (w Welford) Variance() float64

Variance ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL