Documentation
¶
Index ¶
- Variables
- func Max[T EssentialNumTypes](v1 ...T) T
- func Min[T EssentialNumTypes](v1 ...T) T
- func RoundToN[T floats](value T, places int) T
- func TDistribConfInterval(mean, stdev float64, sampleSize int, conf SignificanceLevel) (float64, float64, error)
- func TValueTwoTail(df int, conf SignificanceLevel) (float64, error)
- func WilsonCI(succ float64, sampleSize int, signif SignificanceLevel) (float64, float64, error)
- type EssentialNumTypes
- type FreqInfo
- type OnlineMean
- type Ordered
- type Quartiles
- type SignificanceLevel
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Max ¶
func Max[T EssentialNumTypes](v1 ...T) T
Max finds maximum number for int, int64, float32, float64
func Min ¶
func Min[T EssentialNumTypes](v1 ...T) T
Min finds manimum number for int, int64, float32, float64
func TDistribConfInterval ¶ added in v0.4.0
func TDistribConfInterval(mean, stdev float64, sampleSize int, conf SignificanceLevel) (float64, float64, error)
TDistribConfInterval calculates a confidence interval for a sample mean and standard deviation in case population std. deviation is unknown and the values are "roughly normal". Please note that the function calculates respective t-values using a simple lookup table and is reliable up to 100 degrees of freedom. Higher values will be likely approximated by 1000 df which may or may not serve well. The provided confidence level is always applied in "two tails" mode.
func TValueTwoTail ¶ added in v0.4.0
func TValueTwoTail(df int, conf SignificanceLevel) (float64, error)
TValueTwoTail gets t-value with two-tailed confidence level
Types ¶
type OnlineMean ¶ added in v0.3.13
type OnlineMean struct {
// contains filtered or unexported fields
}
func (OnlineMean) Add ¶ added in v0.3.13
func (m OnlineMean) Add(incoming float64) OnlineMean
func (OnlineMean) Mean ¶ added in v0.3.13
func (m OnlineMean) Mean() float64
func (OnlineMean) Stdev ¶ added in v0.3.13
func (m OnlineMean) Stdev() float64
type Quartiles ¶ added in v0.5.3
func GetQuartiles ¶ added in v0.5.3
GetQuartiles calculates quartiles on an ordered and (sorted) list. The function requires at least 7 items in the data. Otherwise, it returns ErrTooSmallDataset
type SignificanceLevel ¶ added in v0.4.0
type SignificanceLevel string
const ( Significance_1_00 SignificanceLevel = "1.00" Significance_0_50 SignificanceLevel = "0.50" Significance_0_40 SignificanceLevel = "0.40" Significance_0_30 SignificanceLevel = "0.30" Significance_0_20 SignificanceLevel = "0.20" Significance_0_10 SignificanceLevel = "0.10" Significance_0_05 SignificanceLevel = "0.05" Significance_0_02 SignificanceLevel = "0.02" Significance_0_01 SignificanceLevel = "0.01" Significance_0_002 SignificanceLevel = "0.002" Significance_0_001 SignificanceLevel = "0.001" )