Documentation ¶
Overview ¶
Package stats provided functions and methods to compute stat
Index ¶
- Variables
- func Correlation(d, d1 Data) (float64, error)
- func Max(d Data) (float64, error)
- func Mean(i Data) (float64, error)
- func Median(data Data) (median float64, err error)
- func Min(d Data) (float64, error)
- func Mode(i Data) (mode []float64, err error)
- func Pearson(d1, d2 Data) (float64, error)
- func PopulationStandardDeviation(d Data) (float64, error)
- func PopulationVariance(data Data) (float64, error)
- func Psdev(d Data) (float64, error)
- func Pvariance(data Data) (float64, error)
- func Range(d Data) (float64, error)
- func SampleStandardDeviation(d Data) (float64, error)
- func SampleStandardError(d Data) (float64, error)
- func SampleVariance(data Data) (float64, error)
- func SampleZscore(d Data, x float64) (z float64, err error)
- func Ssdev(d Data) (float64, error)
- func StandardDeviation(d Data) (float64, error)
- func Sum(d Data) (sum float64, err error)
- func Svariance(data Data) (float64, error)
- func Variance(data Data) (float64, error)
- func Zscore(d Data, x float64) (z float64, err error)
- type Data
- func (d Data) Get(i int) float64
- func (d *Data) Len() int
- func (d *Data) Max() (float64, error)
- func (d *Data) Mean() (float64, error)
- func (d *Data) Median() (float64, error)
- func (d *Data) Min() (float64, error)
- func (d *Data) Mode() ([]float64, error)
- func (d *Data) PopulationStandardDeviation() (float64, error)
- func (d *Data) PopulationVariance() (float64, error)
- func (d *Data) Range() (float64, error)
- func (d *Data) SampleStandardDeviation() (float64, error)
- func (d *Data) SampleStandardError() (float64, error)
- func (d *Data) SampleVariance() (float64, error)
- func (d *Data) SampleZscore(x float64) (float64, error)
- func (d *Data) StandardDeviation() (float64, error)
- func (d *Data) Sum() (float64, error)
- func (d *Data) Variance() (float64, error)
- func (d *Data) Zscore(x float64) (float64, error)
Constants ¶
This section is empty.
Variables ¶
var ( EmptyInput = statsErr{"Input must not be empty."} SampleSize = statsErr{"Samples number must be less than input length."} NaNErr = statsErr{"Not a number"} NegativeErr = statsErr{"Slice must not contain negative values."} ZeroErr = statsErr{"Slice must not contain zero values."} BoundsErr = statsErr{"Input is outside of range."} SizeErr = statsErr{"Slices must be the same length."} )
These are the package-wide error values. All error identification should use these values.
Functions ¶
func PopulationStandardDeviation ¶
PopulationStandardDeviation computes the population StandardDeviation
func PopulationVariance ¶
PopulationVariance computes the population variance
func SampleStandardDeviation ¶
SampleStandardDeviation computes the sample StandardDeviation
func SampleStandardError ¶
SampleStandardError ....
func SampleVariance ¶
SampleVariance computes the sample variance
func SampleZscore ¶
SampleZscore this computes ths z score using the SampleStandardDeviation
func StandardDeviation ¶
StandardDeviation computes the population StandardDeviation
Types ¶
type Data ¶
type Data []float64
Data represents a collection of float64 values. In which operations are done
func (*Data) PopulationStandardDeviation ¶
PopulationStandardDeviation computes the Population StandardDeviation
func (*Data) PopulationVariance ¶
PopulationVariance return the Population Variance of data
func (*Data) SampleStandardDeviation ¶
SampleStandardDeviation computes the sample StandardDeviation
func (*Data) SampleStandardError ¶
SampleStandardError computes sample StandardError
func (*Data) SampleVariance ¶
SampleVariance returns sample Variance of data
func (*Data) SampleZscore ¶
SampleZscore computes the number of StandardDeviation from the mean using sample
func (*Data) StandardDeviation ¶
StandardDeviation computes the Population StandardDeviation