Xstats

require.mx('mxjs/base/xstatistics.js');

This library provides statistical functions.

Anova
Anova.anova1
Anova.anova2
Anova.anovan
Anova.printTable
AnyDist
AnyDist.cdf
AnyDist.inv
AnyDist.paramsFromData
AnyDist.pdf
AnyDist.sample
Benfords
Benfords.digit
Benfords.probability
Benfords.stats
DataAnalysis
DataAnalysis.genSorted
DataAnalysis.genSorted_array
Dists
Dists.Beta
Dists.Beta.cdf
Dists.Beta.inv
Dists.Beta.makeParams
Dists.Beta.paramsFromData
Dists.Beta.paramsFromStats
Dists.Beta.pdf
Dists.Beta.sample
Dists.Binomial
Dists.Binomial.cdf
Dists.Binomial.inv
Dists.Binomial.makeParams
Dists.Binomial.paramsFromData
Dists.Binomial.pdf
Dists.Binomial.sample
Dists.Exp
Dists.Exp.cdf
Dists.Exp.inv
Dists.Exp.makeParams
Dists.Exp.paramsFromData
Dists.Exp.paramsFromStats
Dists.Exp.pdf
Dists.Exp.sample
Dists.ExtremeValue
Dists.ExtremeValue.cdf
Dists.ExtremeValue.inv
Dists.ExtremeValue.makeParams
Dists.ExtremeValue.pdf
Dists.ExtremeValue.sample
Dists.Gamma
Dists.Gamma.cdf
Dists.Gamma.inv
Dists.Gamma.makeParams
Dists.Gamma.paramsFromData
Dists.Gamma.pdf
Dists.Gamma.sample
Dists.GeneralizedExtremeValue
Dists.GeneralizedExtremeValue.cdf
Dists.GeneralizedExtremeValue.inv
Dists.GeneralizedExtremeValue.makeParams
Dists.GeneralizedExtremeValue.pdf
Dists.GeneralizedExtremeValue.sample
Dists.Gumbel
Dists.Gumbel.cdf
Dists.Gumbel.inv
Dists.Gumbel.makeParams
Dists.Gumbel.paramsFromData
Dists.Gumbel.paramsFromStats
Dists.Gumbel.pdf
Dists.Gumbel.sample
Dists.Hypergeom
Dists.Hypergeom.cdf
Dists.Hypergeom.inv
Dists.Hypergeom.makeParams
Dists.Hypergeom.pdf
Dists.InverseGamma
Dists.InverseGamma.cdf
Dists.InverseGamma.makeParams
Dists.InverseGamma.pdf
Dists.LogNormal
Dists.LogNormal.cdf
Dists.LogNormal.inv
Dists.LogNormal.location
Dists.LogNormal.makeParams
Dists.LogNormal.paramsFromData
Dists.LogNormal.paramsFromStats
Dists.LogNormal.pdf
Dists.LogNormal.sample
Dists.LogNormal.scale
Dists.Normal
Dists.Normal.cdf
Dists.Normal.inv
Dists.Normal.makeParams
Dists.Normal.paramsFromData
Dists.Normal.paramsFromStats
Dists.Normal.pdf
Dists.Normal.sample
Dists.PearsonTypeV
Dists.PearsonTypeV.cdf
Dists.PearsonTypeV.makeParams
Dists.PearsonTypeV.pdf
Dists.Poisson
Dists.Poisson.cdf
Dists.Poisson.inv
Dists.Poisson.makeParams
Dists.Poisson.paramsFromData
Dists.Poisson.pdf
Dists.Poisson.sample
Dists.T
Dists.T.cdf
Dists.T.inv
Dists.T.makeParams
Dists.T.paramsFromData
Dists.T.paramsFromStats
Dists.T.pdf
Dists.T.sample
Dists.Triangular
Dists.Triangular.cdf
Dists.Triangular.inv
Dists.Triangular.makeParams
Dists.Triangular.paramsFromStats
Dists.Triangular.pdf
Dists.Triangular.sample
Dists.TruncatedExp
Dists.TruncatedExp.cdf
Dists.TruncatedExp.inv
Dists.TruncatedExp.makeParams
Dists.TruncatedExp.paramsFromGuess
Dists.TruncatedExp.pdf
Dists.TruncatedExp.sample
Dists.TruncatedLogNormal
Dists.TruncatedLogNormal.cdf
Dists.TruncatedLogNormal.inv
Dists.TruncatedLogNormal.makeParams
Dists.TruncatedLogNormal.paramsFromGuess
Dists.TruncatedLogNormal.pdf
Dists.TruncatedLogNormal.sample
Dists.TruncatedNormal
Dists.TruncatedNormal.cdf
Dists.TruncatedNormal.inv
Dists.TruncatedNormal.makeParams
Dists.TruncatedNormal.paramsFromGuess
Dists.TruncatedNormal.pdf
Dists.TruncatedNormal.sample
Dists.Uniform
Dists.Uniform.cdf
Dists.Uniform.inv
Dists.Uniform.makeParams
Dists.Uniform.paramsFromData
Dists.Uniform.paramsFromStats
Dists.Uniform.pdf
Dists.Uniform.sample
DistsParams
DistsParams.readFromText
DistsParams.writeToText
QQ
QQ.sort
QQ.sort_array
Sampling
Sampling.sample
Sampling.sampleFromSortedDataSet
Sampling.sampleIndexes
StatFit
StatFit.bestFit
StatFit.bestFitFromSamples
StatFit.ks
StatFit.ksOnSet
StatFit.rankFits
StatFit.rankFitsFromSamples
StatFit.rmse
StatFit.rmseOnSet
StatFit.rsquare
StatFit.rsquareOnSet
Statistics
Statistics.allStats
Statistics.allStats_array
Statistics.correlation
Statistics.correlation_array
Statistics.correlationStats
Statistics.correlationStats_array
Statistics.covariance
Statistics.covariance_array
Statistics.deviation
Statistics.deviation_array
Statistics.geomean
Statistics.geomean_array
Statistics.ks
Statistics.ks_array
Statistics.ksOnSets
Statistics.ksOnSets_array
Statistics.kurt
Statistics.kurt_array
Statistics.max
Statistics.mean
Statistics.mean_array
Statistics.min
Statistics.percentile
Statistics.percentile_array
Statistics.percentile_in_ordered
Statistics.percentile_in_ordered_array
Statistics.rmse
Statistics.rmse_array
Statistics.rsquare
Statistics.rsquare_array
Statistics.sampleStdev
Statistics.sampleVariance
Statistics.skew
Statistics.skew_array
Statistics.stdev
Statistics.stdev_array
AllStats
AnovaResult
DistributionParameters
SortedDataSet
SortedDataSet.percentile

StatusName
Constant Text BETA

beta distribution

Constant Text BINOMIAL

binomial distribution

Constant Array DISTRIBUTIONS

an array containing all of the above.

Constant Text EXPONENTIAL

exponential distribution

Constant Text EXTREME_VALUE

extreme value distribution

Constant Text GAMMA

gamma distribution

Constant Text GUMBEL

gumbel distribution

Constant Text HYPERGEOMETRIC

hypergeometric distribution

Constant Text LOG_NORMAL

log normal distribution

Constant Text NORMAL

normal distribution

Constant Text POISSON

poisson distribution

Constant Text T

student t distribution

Constant Text TRIANGULAR

triangular distribution

Constant Text TRUNCATED_EXP

Truncated exponential distribution

Constant Text TRUNCATED_NORMAL

truncated normal distribution

Constant Text UNIFORM

uniform distribution

AnovaResult Anova.anova1 ( AnovaResult ↑result, Table ↓Table, Function... ↓read_Functions )

Perform one way ANOVA (corresponds to Mathworks anova1 with matrix input). This method takes in the data as multiple columns, with each column of data corresponding to output from one group in a factor

AnovaResult Anova.anova2 ( AnovaResult ↑result, Number ↓num_replications, Table ↓Table, Function... ↓read_Functions )

Perform two way ANOVA (corresponds to Mathworks anova2 with matrix input). This method takes in the data as multiple columns, with each column of data corresponding to output from one column group for the column factor. Each row group in the row factor spans multiple rows - the multiple rows are for the replications for each row factor + column factor cell.

AnovaResult Anova.anovan ( AnovaResult ↑result, Boolean ↓gen_interactions, Table ↓Table, Function ↓read_Data, Function... ↓read_Functions )

Perform multiple way ANOVA (corresponds to Mathworks anovan). This method takes in the data values as one column, and the separate columns of data for the factor values for each factor for the data values.

Anova.printTable ( AnovaResult ↓result )

Print to console as a table the results from the ANOVA calculation

Number AnyDist.cdf ( Number ↓x, DistributionParameters ↓parameters )

Cumulative density function

Number AnyDist.inv ( Number ↓p, DistributionParameters ↓parameters )

Inverse cumulative density function

DistributionParameters AnyDist.paramsFromData ( DistributionParameters ↑parameters, Text ↓distName, Table Table, Function read_Col )

Calculate the parameters for Normal distributions from the data

Number AnyDist.pdf ( Number ↓x, DistributionParameters ↓parameters )

Probability density function

Array AnyDist.sample ( Array ↑samples, Number ↓n, DistributionParameters ↓parameters )

Sampling function

Number Benfords.digit ( Number ↓n, Number ↓pos )

Returns the digit at specified position for specified number

Number Benfords.probability ( Number ↓digit, Number ↓pos )

Calculate Benford's Law probability for a given digit and position.

Array Benfords.stats ( Array ↑array, Table ↓Table, Function ↓read_Field, Number ↓pos )

Calculate Benford's Law stats for a given series and digit position.

SortedDataSet DataAnalysis.genSorted ( Table ↓Table, Function ↓read_Col )

Creates a SortedDataSet, based on the data set

SortedDataSet DataAnalysis.genSorted_array ( Array ↓Array )

Creates a SortedDataSet, from an array of values

Number Dists.Beta.cdf ( Number ↓x, Number ↓alpha, Number ↓beta, Number ↓distMin, Number ↓distMax )

Cumulative density function of the Beta distribution

Number Dists.Beta.inv ( Number ↓p, Number ↓alpha, Number ↓beta, Number ↓distMin, Number ↓distMax )

Inverse cumulative density function of the Beta distribution

DistributionParameters Dists.Beta.makeParams ( DistributionParameters ↑parameters, Number ↓alpha, Number ↓beta, Number ↓distMin, Number ↓distMax )

Creates a DistributionParameters for a Truncated Normal distribution from the parameters specified

DistributionParameters Dists.Beta.paramsFromData ( DistributionParameters ↑parameters, Table ↓Table, Function ↓read_Col )

Calculate the parameters for Beta distributions [0, 1] from the data. This calculates statistics from the data and then uses paramsFromStats.

DistributionParameters Dists.Beta.paramsFromStats ( DistributionParameters ↑parameters, AllStats ↓stats )

Creates a DistributionParameters for a Beta distribution from the statistics specified Note: uses stats.mean, stats.variance, stats.min, stats.max

Number Dists.Beta.pdf ( Number ↓x, Number ↓alpha, Number ↓beta, Number ↓distMin, Number ↓distMax )

Probability density function of the Beta distribution

Array Dists.Beta.sample ( Array ↑samples, Number ↓n, Number ↓alpha, Number ↓beta, Number ↓distMin, Number ↓distMax )

Sampling function of the Beta distribution

Number Dists.Binomial.cdf ( Number ↓x, Number ↓n_trials, Number ↓q_prob )

Cumulative density function of the Binomial distribution

Number Dists.Binomial.inv ( Number ↓p, Number ↓n_trials, Number ↓q_prob )

Inverse cumulative density function of the Binomial distribution

DistributionParameters Dists.Binomial.makeParams ( DistributionParameters ↑parameters, Number ↓n_trials, Number ↓q_prob )

Creates a DistributionParameters for a Binomial distribution from the parameters specified

DistributionParameters Dists.Binomial.paramsFromData ( DistributionParameters ↑parameters, Table ↓Table, Function ↓read_Col )

Calculate the parameters for Binomial distributions from the data

Number Dists.Binomial.pdf ( Number ↓x, Number ↓n_trials, Number ↓q_prob )

Probability density function of the Binomial distribution

Array Dists.Binomial.sample ( Array ↑samples, Number ↓n, Number ↓n_trials, Number ↓q_prob )

Sampling function of the Binomial distribution

Number Dists.Exp.cdf ( Number ↓x, number ↓rate )

Cumulative density function of the Exponential distribution

Number Dists.Exp.inv ( Number p, number ↓rate )

Inverse cumulative density function of the Exponential distribution

DistributionParameters Dists.Exp.makeParams ( DistributionParameters ↑parameters, Number ↓rate )

Creates a DistributionParameters for a Exponential distribution from the parameters specified

DistributionParameters Dists.Exp.paramsFromData ( DistributionParameters ↑parameters, Table ↓Table, Function ↓read_Col )

Calculate the parameters for Exponential distributions from the data

DistributionParameters Dists.Exp.paramsFromStats ( DistributionParameters ↑parameters, AllStats ↓stats )

Creates a DistributionParameters for a Exponential distribution from the statistics specified

Number Dists.Exp.pdf ( Number ↓x, number ↓rate )

Probability density function of the Exponential distribution

Array Dists.Exp.sample ( Array ↑samples, Number ↓n, number ↓rate )

Sampling function of the Exponential distribution

Number Dists.ExtremeValue.cdf ( Number ↓x, Number ↓location, Number ↓scale )

Cumulative density function of the Extreme Value distribution

Number Dists.ExtremeValue.inv ( Number p, Number ↓location, Number ↓scale )

Inverse cumulative density function of the Extreme Value distribution

DistributionParameters Dists.ExtremeValue.makeParams ( DistributionParameters ↑parameters, Number ↓location, Number ↓scale )

Creates a DistributionParameters for an Extreme Value distribution from the parameters specified

Number Dists.ExtremeValue.pdf ( Number ↓x, Number ↓location, Number ↓scale )

Probability density function of the Extreme Value distribution

Array Dists.ExtremeValue.sample ( Array ↑samples, Number ↓n, Number ↓location, Number ↓scale )

Sampling function of the Extreme Value distribution

Number Dists.Gamma.cdf ( Number ↓x, Number ↓shape, Number ↓scale )

Cumulative density function of the Gamma distribution

Number Dists.Gamma.inv ( Number p, Number ↓shape, Number ↓scale )

Inverse cumulative density function of the Gamma distribution

DistributionParameters Dists.Gamma.makeParams ( DistributionParameters ↑parameters, Number ↓shape, Number ↓scale )

Creates a DistributionParameters for a Gamma distribution from the parameters specified

DistributionParameters Dists.Gamma.paramsFromData ( DistributionParameters ↑parameters, Table ↓Table, Function ↓read_Col )

Calculate the parameters for Gamma distributions from the data.

Number Dists.Gamma.pdf ( Number ↓x, Number ↓shape, Number ↓scale )

Probability density function of the Gamma distribution

Array Dists.Gamma.sample ( Array ↑samples, Number ↓n, Number ↓shape, Number ↓scale )

Sampling function of the Gamma distribution

Number Dists.GeneralizedExtremeValue.cdf ( Number ↓x, Number ↓location, Number ↓scale, Number ↓shape )

Cumulative density function of the Generalized Extreme Value distribution

Number Dists.GeneralizedExtremeValue.inv ( Number p, Number ↓location, Number ↓scale, Number ↓shape )

Inverse cumulative density function of the Generalized Extreme Value distribution

DistributionParameters Dists.GeneralizedExtremeValue.makeParams ( DistributionParameters ↑parameters, Number ↓location, Number ↓scale, Number ↓shape )

Creates a DistributionParameters for a Generalized Extreme Value distribution from the parameters specified

Number Dists.GeneralizedExtremeValue.pdf ( Number ↓x, Number ↓location, Number ↓scale, Number ↓shape )

Probability density function of the Generalized Extreme Value distribution

Array Dists.GeneralizedExtremeValue.sample ( Array ↑samples, Number ↓n, Number ↓location, Number ↓scale, Number ↓shape )

Sampling function of the Generalized Extreme Value distribution

Number Dists.Gumbel.cdf ( Number ↓x, Number ↓location, Number ↓scale )

Cumulative density function of the Gumbel distribution

Number Dists.Gumbel.inv ( Number p, Number ↓location, Number ↓scale )

Inverse cumulative density function of the Gumbel distribution

DistributionParameters Dists.Gumbel.makeParams ( DistributionParameters ↑parameters, Number ↓location, Number ↓scale )

Creates a DistributionParameters for a Gumbel distribution from the parameters specified

DistributionParameters Dists.Gumbel.paramsFromData ( DistributionParameters ↑parameters, Table ↓Table, Function ↓read_Col )

Calculate the parameters for Gumbel distributions from the data.

DistributionParameters Dists.Gumbel.paramsFromStats ( DistributionParameters ↑parameters, AllStats ↓stats )

Calculate the parameters for Gumbel distribution from stats.

Number Dists.Gumbel.pdf ( Number ↓x, Number ↓location, Number ↓scale )

Probability density function of the Gumbel distribution

Array Dists.Gumbel.sample ( Array ↑samples, Number ↓n, Number ↓location, Number ↓scale )

Sampling function of the Gumbel distribution

Number Dists.Hypergeom.cdf ( Number ↓x, Number ↓a, Number ↓b, Number ↓n_balls )

Cumulative density function of the Hypergeom distribution

Number Dists.Hypergeom.inv ( Number p, Number ↓a, Number ↓b, Number ↓n_balls )

Inverse cumulative density function of the Hypergeom distribution

DistributionParameters Dists.Hypergeom.makeParams ( DistributionParameters ↑parameters, Number ↓a, Number ↓b, Number ↓n_balls )

Creates a DistributionParameters for a Hypergeom distribution from the parameters specified

Number Dists.Hypergeom.pdf ( Number ↓x, Number ↓a, Number ↓b, Number ↓n_balls )

Probability density function of the Hypergeom distribution

Number Dists.InverseGamma.cdf ( Number ↓x, Number ↓shape, Number ↓scale )

Cumulative density function of the InverseGamma distribution

DistributionParameters Dists.InverseGamma.makeParams ( DistributionParameters ↑parameters, Number ↓shape, Number ↓scale )

Creates a DistributionParameters for a InverseGamma distribution from the parameters specified

Number Dists.InverseGamma.pdf ( Number ↓x, Number ↓shape, Number ↓scale )

Probability density function of the InverseGamma distribution

Number Dists.LogNormal.cdf ( Number ↓x, Number ↓mu, Number ↓sigma )

Cumulative density function of the Log Normal distribution

Number Dists.LogNormal.inv ( Number p, Number ↓mu, Number ↓sigma )

Inverse cumulative density function of the Log Normal distribution

Number Dists.LogNormal.location ( Number ↓mean, Number ↓stdev )

returns the "location" or "logmean" parameter of the lognormal distribution from the mean and standard deviation TODO {Chun} this should become Thingo = ParamsFromStats.lognormal(in_mean,out_stdev) TODO {Chun} {Paul} not sure what shape or form "Thingo" should have array/object. It should contain the parameters scale and location which I should be able to extract but also be able to send as a black box to the lognormal functions?

DistributionParameters Dists.LogNormal.makeParams ( DistributionParameters ↑parameters, Number ↓location, Number ↓scale )

Creates a DistributionParameters for a LogNormal distribution from the parameters specified

DistributionParameters Dists.LogNormal.paramsFromData ( DistributionParameters ↑parameters, Table ↓Table, Function ↓read_Col )

Calculate the parameters for Log Normal distributions from the data. This function works by log()ing the data and computing the location+scale directly.

DistributionParameters Dists.LogNormal.paramsFromStats ( DistributionParameters ↑parameters, AllStats ↓stats )

Creates a DistributionParameters for a LogNormal distribution from the statistics specified

Number Dists.LogNormal.pdf ( Number ↓x, Number ↓mu, Number ↓sigma )

Probability density function of the LogNormal distribution

Array Dists.LogNormal.sample ( Array ↑samples, Number ↓n, Number ↓mu, Number ↓sigma )

Sampling function of the Log Normal distribution

Number Dists.LogNormal.scale ( Number mean, Number stdev )

returns the "scale" or "logstdev" parameter of the lognormal distribution from the mean and standard deviation

Number Dists.Normal.cdf ( Number ↓x, Number ↓mu, Number ↓sigma )

Cumulative density function of the Normal distribution

Number Dists.Normal.inv ( Number ↓p, Number ↓mu, Number ↓sigma )

Inverse cumulative density function of the Normal distribution

DistributionParameters Dists.Normal.makeParams ( DistributionParameters ↑parameters, Number ↓mu, Number ↓sigma )

Creates a DistributionParameters for a Normal distribution from the parameters specified

DistributionParameters Dists.Normal.paramsFromData ( DistributionParameters ↑parameters, Table Table, Function read_Col )

Calculate the parameters for Normal distributions from the data

DistributionParameters Dists.Normal.paramsFromStats ( DistributionParameters ↑parameters, AllStats ↓stats )

Creates a DistributionParameters for a Normal distribution from the statistics specified

Number Dists.Normal.pdf ( Number ↓x, Number ↓mu, Number ↓sigma )

Probability density function of the Normal distribution

Array Dists.Normal.sample ( Array ↑samples, Number ↓n, Number ↓mu, Number ↓sigma )

Sampling function of the Normal distribution

Number Dists.PearsonTypeV.cdf ( Number ↓x, Number ↓a, Number ↓b0, Number ↓b1, Number ↓b2, Number ↓mu )

Cumulative density function of the PearsonTypeV distribution

DistributionParameters Dists.PearsonTypeV.makeParams ( DistributionParameters ↑parameters, Number ↓a, Number ↓b0, Number ↓b1, Number ↓b2, Number ↓mu )

Creates a DistributionParameters for a PearsonTypeV distribution from the parameters specified

Number Dists.PearsonTypeV.pdf ( Number ↓x, Number ↓a, Number ↓b0, Number ↓b1, Number ↓b2, Number ↓mu )

Probability density function of the PearsonTypeV distribution

Number Dists.Poisson.cdf ( Number ↓x, Array ↓parameters )

Cumulative density function of the Poisson distribution

Number Dists.Poisson.inv ( Number p, Array parameters )

Inverse cumulative density function of the Poisson distribution

DistributionParameters Dists.Poisson.makeParams ( DistributionParameters ↑parameters, Number ↓lambda )

Creates a DistributionParameters for a Poisson distribution from the parameters specified

DistributionParameters Dists.Poisson.paramsFromData ( DistributionParameters ↑parameters, Table ↓Table, Function ↓read_Col )

Calculate the parameters for Poisson distributions from the data

Number Dists.Poisson.pdf ( Number ↓x, Array ↓parameters )

Probability density function of the Poisson distribution

Array Dists.Poisson.sample ( Array ↑samples, Number ↓n, Array ↓parameters )

Sampling function of the Poisson distribution

Number Dists.T.cdf ( Number ↓x, Array ↓parameters )

Cumulative density function of the Student T distribution

Number Dists.T.inv ( Number p, Array ↓parameters )

Inverse cumulative density function of the Student T distribution

DistributionParameters Dists.T.makeParams ( DistributionParameters ↑parameters, Number ↓v )

Creates a DistributionParameters for a Exponential distribution from the parameters specified

DistributionParameters Dists.T.paramsFromData ( DistributionParameters ↑parameters, Table ↓Table, Function ↓read_Col )

Calculate the parameters for Student T distributions from the data. Note this really fits only if the mean is close to zero.

DistributionParameters Dists.T.paramsFromStats ( DistributionParameters ↑parameters, AllStats ↓stats )

Calculate the parameters for Student T distributions from stats.

Number Dists.T.pdf ( Number ↓x, Array ↓parameters )

Probability density function of the Student T distribution

Array Dists.T.sample ( Array ↑samples, Number ↓n, Array ↓parameters )

Sampling function of the Student T distribution

Number Dists.Triangular.cdf ( Number ↓x, Number ↓a, Number ↓b, Number ↓c )

Cumulative density function of the Triangular distribution

Number Dists.Triangular.inv ( Number ↓p, Number ↓a, Number ↓b, Number ↓c )

Inverse cumulative density function of the Triangular distribution

DistributionParameters Dists.Triangular.makeParams ( DistributionParameters ↑parameters, Number ↓a, Number ↓b, Number ↓c )

Creates a DistributionParameters for a Triangular distribution from the parameters specified

DistributionParameters Dists.Triangular.paramsFromStats ( DistributionParameters ↑parameters, AllStats ↓stats )

Creates a DistributionParameters for a Uniform distribution from the statistics specified

Number Dists.Triangular.pdf ( Number ↓x, Number ↓a, Number ↓b, Number ↓c )

Probability density function of the Triangular distribution

Array Dists.Triangular.sample ( Array ↑samples, Number ↓n, Number ↓a, Number ↓b, Number ↓c )

Sampling function of the Triangular distribution

Number Dists.TruncatedExp.cdf ( Number ↓x, Number ↓rate, Number ↓xmax )

Cumulative density function of the Exponential distribution

Number Dists.TruncatedExp.inv ( Number p, Number ↓rate, Number ↓xmax )

Inverse cumulative density function of the Truncated Exponential distribution

DistributionParameters Dists.TruncatedExp.makeParams ( DistributionParameters ↑parameters, Number ↓rate, Number ↓xmax )

Creates a DistributionParameters for a Truncated Exponential distribution from the parameters specified

DistributionParameters Dists.TruncatedExp.paramsFromGuess ( DistributionParameters ↑parameters, AllStats ↓stats )

Creates a DistributionParameters for a Truncated Exponential distribution guessed from the statistics specified

The function first uses the mean to guess the rate of the untruncated Exponential distribution, and then truncates it according to the max specified. As a result the mean of the truncated distribution may not match the mean specified.

Number Dists.TruncatedExp.pdf ( Number ↓x, Number ↓rate, Number ↓xmax )

Probability density function of the Truncated Exponential distribution

Array Dists.TruncatedExp.sample ( Array ↑samples, Number ↓n, Number ↓rate, Number ↓xmax )

Sampling function of the Truncated Exponential distribution

Number Dists.TruncatedLogNormal.cdf ( Number ↓x, Number ↓mu, Number ↓sigma, Number ↓lower, Number ↓upper )

Cumulative density function of the Truncated Log Normal distribution

Number Dists.TruncatedLogNormal.inv ( Number ↓p, Number ↓mu, Number ↓sigma )

Inverse cumulative density function of the Truncated Log Normal distribution

DistributionParameters Dists.TruncatedLogNormal.makeParams ( DistributionParameters ↑parameters, Number ↓mu, Number ↓sigma, Number ↓lower, Number ↓upper )

Creates a DistributionParameters for a Truncated Log Normal distribution from the parameters specified

DistributionParameters Dists.TruncatedLogNormal.paramsFromGuess ( DistributionParameters ↑parameters, AllStats ↓stats )

Creates a DistributionParameters for a Truncated Log Normal distribution from the statistics specified.

Note this method guesses the distribution first as a standard Log Normal distribution of log mean and log stdev provided, and then truncates that distribution with the specified min and max. Hence the resultant truncated distribution may not have the log mean and log stdev as specified.

Number Dists.TruncatedLogNormal.pdf ( Number ↓x, Number ↓mu, Number ↓sigma, Number ↓lower, Number ↓upper )

Probability density function of the Truncated Log Normal distribution

Array Dists.TruncatedLogNormal.sample ( Array ↑samples, Number ↓n, Number ↓mu, Number ↓sigma, Number ↓lower, Number ↓upper )

Sampling function of the Truncated Log Normal distribution

Number Dists.TruncatedNormal.cdf ( Number ↓x, Number ↓mu, Number ↓sigma, Number ↓lower, Number ↓upper )

Cumulative density function of the Truncated Normal distribution

Number Dists.TruncatedNormal.inv ( Number ↓p, Number ↓mu, Number ↓sigma )

Inverse cumulative density function of the Truncated Normal distribution

DistributionParameters Dists.TruncatedNormal.makeParams ( DistributionParameters ↑parameters, Number ↓mu, Number ↓sigma, Number ↓lower, Number ↓upper )

Creates a DistributionParameters for a Truncated Normal distribution from the parameters specified

DistributionParameters Dists.TruncatedNormal.paramsFromGuess ( DistributionParameters ↑parameters, AllStats ↓stats )

Creates a DistributionParameters for a Truncated Normal distribution from the statistics specified.

Note this method guesses the distribution first as a standard Normal distribution of mean and stdev provided, and then truncates that distribution with the specified min and max. Hence the resultant truncated distribution may not have the mean and stdev as specified.

Number Dists.TruncatedNormal.pdf ( Number ↓x, Number ↓mu, Number ↓sigma, Number ↓lower, Number ↓upper )

Probability density function of the Truncated Normal distribution

Array Dists.TruncatedNormal.sample ( Array ↑samples, Number ↓n, Number ↓mu, Number ↓sigma, Number ↓lower, Number ↓upper )

Sampling function of the Truncated Normal distribution

Number Dists.Uniform.cdf ( Number ↓x, Number ↓min, Number ↓max )

Cumulative density function of the Uniform distribution

Number Dists.Uniform.inv ( Number ↓p, Number ↓min, Number ↓max )

Inverse cumulative density function of the Uniform distribution

DistributionParameters Dists.Uniform.makeParams ( DistributionParameters ↑parameters, Number ↓min, Number ↓max )

Creates a DistributionParameters for a Uniform distribution from the parameters specified

DistributionParameters Dists.Uniform.paramsFromData ( DistributionParameters ↑parameters, Table ↓Table, Function ↓read_Col )

Calculate the parameters for Uniform distributions from the data

DistributionParameters Dists.Uniform.paramsFromStats ( DistributionParameters ↑parameters, AllStats ↓stats )

Creates a DistributionParameters for a Uniform distribution from the statistics specified

Number Dists.Uniform.pdf ( Number ↓x, Number ↓min, Number ↓max )

Probability density function of the Uniform distribution

Array Dists.Uniform.sample ( Array ↑samples, Number ↓n, Number ↓min, Number ↓max )

Sampling function of the Uniform distribution

DistributionParameters DistsParams.readFromText ( Text ↓text )

This function allows a DistributionParameters object to be read from text.

Text DistsParams.writeToText ( DistributionParameters ↓distParams )

This function allows a DistributionParameters object to be saved as text.

QQ.sort ( Table ↑Table, Function ↑write_Field, Table ↓Table, Function ↓read_Field )

Performs QQ Plot preprocessing on one series: records in specified input is sorted and output to specified output
Example: (OUTTable, OUTTable.write_X, INTable, INTable.read_X);

QQ.sort_array ( Array ↑series_array, Array ↓series_array, Number ↓num_records )

Performs QQ Plot preprocessing on one series: in_series_array is sorted and output into out_series_array

Array Sampling.sample ( Array ↑array, Number ↓sample_size, Table ↓Table, Function ↓column )

This method returns uniform sampled data

Array Sampling.sampleFromSortedDataSet ( Array ↑array, Number ↓sample_size, SortedDataSet ↓sortedDataSet )

This method returns uniform sampled data

Array Sampling.sampleIndexes ( Array ↑array, Number ↓sample_size, Number ↓set_size )

This method returns an array of indices to a data set/array for an uniform sampling

DistributionParameters StatFit.bestFit ( Table ↓Table, Function ↓column, Array ↓sampleIndexes, Array ↓distsToUse, Text ↓measureToUse )

Performs the statistical bestfit as described by rankFits, and returns the closest fit.

DistributionParameters StatFit.bestFitFromSamples ( Table ↓Table, Function ↓column, Number ↓sampleCount )

Performs the statistical bestfit as described by rankFits, and returns the closest fit. This variant allows specification of a sampling count to speed up computing the KS Test for large datasets. (Sampling is used only for the KS Test - fitting will still use full input data set)

Number StatFit.ks ( DistributionParameters distParams, Table ↓Table, Function ↓column, Array ↓sampleIndexes )

Kolmogorov-Smirnov (KS test) using a data series and a DistributionParameters.

When performing multiple KS tests on the same samples, it is more efficient to create a SortedDataSet

Number StatFit.ksOnSet ( DistributionParameters ↓parameters, SortedDataSet ↓sampleSet, Array ↓sampleIndexes )

Kolmogorov-Smirnov (KS test) using a SortedDataSet and a DistributionParameters.

When performing multiple KS tests on the same samples, it is more efficient to create a SortedDataSet

Number StatFit.rankFits ( Array ↑distParamsArray, Array ↑MeasureArray, Table ↓Table, Function ↓column, Array ↓sampleIndexes, Array ↓distsToUse, Text ↓measureToUse )

Derives parameters for each distribution from the data set and ranks them (in order of smallest error first) according to the measure specified (KS default)

Number StatFit.rankFitsFromSamples ( Array ↑distParamsArray, Array ↑KSErrorArray, Table ↓Table, Function ↓column, Number ↓sampleCount )

Derives parameters for each distribution from the data set and ranks them (in order of smallest error first) according to the KS Test. This variant allows specification of a sampling count to speed up computing the KS Test for large datasets. (Sampling is used only for the KS Test - fitting will still use full input data set)

Number StatFit.rmse ( DistributionParameters distParams, Table ↓Table, Function ↓column, Array ↓sampleIndexes )

Calculate root-mean-square-error using a data series and a DistributionParameters.

When performing multiple root-mean-square-error calculations on the same samples, it is more efficient to create a SortedDataSet

Number StatFit.rmseOnSet ( DistributionParameters ↓parameters, SortedDataSet ↓sampleSet, Array ↓sampleIndexes )

Calculate root-mean-square-error using a SortedDataSet and a DistributionParameters.

When performing multiple root-mean-square-error calculations on the same samples, it is more efficient to create a SortedDataSet

Number StatFit.rsquare ( DistributionParameters distParams, Table ↓Table, Function ↓column, Array ↓sampleIndexes )

R square goodness of fit using a data series and a DistributionParameters.

When performing multiple R square tests on the same samples, it is more efficient to create a SortedDataSet

Number StatFit.rsquareOnSet ( DistributionParameters ↓parameters, SortedDataSet ↓sampleSet, Array ↓sampleIndexes )

R square goodness of fit using a SortedDataSet and a DistributionParameters.

When performing multiple R square tests on the same samples, it is more efficient to create a SortedDataSet

AllStats Statistics.allStats ( Table ↓Table, Function ↓read_Col )

Returns all statistics as an object

AllStats Statistics.allStats_array ( Array ↓values )

Returns all statistics as an object

Number Statistics.correlation ( Table ↓Table, Function ↓read_Col1, Function ↓read_Col2 )

Returns the correlation coefficient ( covariance(X, Y) / (stdev(X) * stdev(Y))

Number Statistics.correlation_array ( Array ↓x, Array ↓y )

Returns the correlation coefficient ( covariance(X, Y) / (stdev(X) * stdev(Y))

Object Statistics.correlationStats ( Table ↓Table, Function ↓read_Col1, Function ↓read_Col2 )

Returns an object that has a number of correlation stats

Object Statistics.correlationStats_array ( Array ↓x, Array ↓y )

Returns an object that has a number of correlation stats

Number Statistics.covariance ( Table ↓Table, Function ↓read_Col1, Function ↓read_Col2 )

Returns the covariance

Number Statistics.covariance_array ( Array ↓x1, Array ↓x2 )

Returns the covariance

Number Statistics.deviation ( Table ↓Table, Function ↓read_Col, Function ↓mean )

Returns the standard deviation of a data set, given the mean

Number Statistics.deviation_array ( Array ↓Values, Function ↓mean )

Returns the standard deviation of a data set, given the mean

Number Statistics.geomean ( Table ↓Table, Function ↓read_Col )

Returns the geometric mean of a data set

Number Statistics.geomean_array ( Array ↓Values )

Returns the geometric mean of a data set

Number Statistics.ks ( Table ↓Table, Function ↓read_y1, Function ↓read_y2 )

Calculates the Kolmogorov-Smirnov test between two series of the same length and matching indices.

Number Statistics.ks_array ( Array ↓y1, Array ↓y2, Number ↓n )

Calculates the Kolmogorov-Smirnov test between two series of the same length and matching indices.

Number Statistics.ksOnSets ( Table ↓Table1, Function ↓readX1, Function ↓readY1, Table ↓Table2, Function ↓readX2, Function ↓readY2 )

Calculates the Kolmogorov-Smirnov test between two sorted-by-x (x,y) sets, which are treated as points for two empirical distribution functions.

Number Statistics.ksOnSets_array ( Array ↓x1, Array ↓y1, Number ↓n1, Array ↓x2, Array ↓y2, Number ↓n2 )

Calculates the Kolmogorov-Smirnov test between two sorted-by-x (x,y) sets, which are treated as points for two empirical distribution functions.

Number Statistics.kurt ( Table ↓Table, Function ↓read_Col )

Returns the kurtosis (fourth standardized moment) of a data set

Number Statistics.kurt_array ( Array ↓values )

Returns the kurtosis (fourth standardized moment) of a data set

Number Statistics.max ( Table ↓Table, Function ↓read_Col )

Returns the maximum value of a data set

Number Statistics.mean ( Table ↓Table, Function ↓read_Col )

Returns the arithmetic mean of a data set

Number Statistics.mean_array ( Array ↓Values )

Returns the arithmetic mean of a data set

Number Statistics.min ( Table ↓Table, Function ↓read_Col )

Returns the minimum value of a data set

Number Statistics.percentile ( Table ↓Table, Function ↓read_Col, Number ↓p )

Returns the percentile value based on the Linear Interpolation between Closest Rank method. Note - if you are getting multiple percentile values over the same data set, it is much more efficient to use XStats.DataAnalysis.genSorted() instead.

Number Statistics.percentile_array ( Array ↓Array, Number ↓p )

Returns the percentile value based on the Linear Interpolation between Closest Rank method. Note - if you are getting multiple percentile values over the same data set, it is much more efficient to use XStats.DataAnalysis.genSorted_array() instead.

Number Statistics.percentile_in_ordered ( Table ↓Table, Function ↓read_Value, Number ↓p )

Returns the percentile value from an ALREADY ORDERED dataset (will not interpolate like the other Percentile function).

Number Statistics.percentile_in_ordered_array ( Array ↓Array, Number ↓p )

Returns the percentile value from an ALREADY ORDERED array (will not interpolate like the other Percentile function).

Number Statistics.rmse ( Table ↓Table, Function ↓read_y1, Function ↓read_y2 )

Calculates the root-mean-square-error between two series of the same length and matching indices.

Number Statistics.rmse_array ( Array ↓y1, Array ↓y2, Number ↓n )

Calculates the root-mean-square-error between two series of the same length and matching indices.

Number Statistics.rsquare ( Table ↓Table, Function ↓read_y1, Function ↓read_y2 )

Calculates the r square between two series of the same length and matching indices, assuming the second series is a fitted approximation of the first series.

Number Statistics.rsquare_array ( Array ↓y1, Array ↓y2, Number ↓n )

Calculates the r square value between two series of the same length and matching indices, assuming the second series is a fitted approximation of the first series.

Number Statistics.sampleStdev ( Table ↓Table, Function ↓read_Col )

Returns the sample standard deviation of a data set

Number Statistics.sampleVariance ( Table ↓Table, Function ↓read_Col )

Returns the sample variance of a data set

Number Statistics.skew ( Table ↓Table, Function ↓read_Col )

Returns the moment coefficient of skewness of a data set, defined as a third central moment divided by the stdev cubed

Number Statistics.skew_array ( Array ↓values )

Returns the moment coefficient of skewness of a data set, defined as a third central moment divided by the stdev cubed

Number Statistics.stdev ( Table ↓Table, Function ↓read_Col )

Returns the standard deviation of a data set

Number Statistics.stdev_array ( Array ↓Values )

Returns the standard deviation of a data set


Category: Anova

These functions help compute Analysis Of Variance (ANOVA)

↑result = Lib.Anova.anova1 ( ↑result, ↓Table, ↓read_Functions )

Perform one way ANOVA (corresponds to Mathworks anova1 with matrix input). This method takes in the data as multiple columns, with each column of data corresponding to output from one group in a factor

Parameters:
  • AnovaResult ↑result - - ANOVA result object to reuse
  • Table ↓Table - - input data table
  • Function... ↓read_Functions - - read functions for each column of data from the input data table
Returns: AnovaResult ↑result - - ANOVA result object containing output stats e.g. "SS_Columns", "df_Columns", etc.
↑result = Lib.Anova.anova2 ( ↑result, ↓num_replications, ↓Table, ↓read_Functions )

Perform two way ANOVA (corresponds to Mathworks anova2 with matrix input). This method takes in the data as multiple columns, with each column of data corresponding to output from one column group for the column factor. Each row group in the row factor spans multiple rows - the multiple rows are for the replications for each row factor + column factor cell.

Parameters:
  • AnovaResult ↑result - - ANOVA result object to reuse
  • Number ↓num_replications - - the number of replications for each row factor + column factor cell. This will be used to determine the number of row groupings. (row groupings * num replications = total rows in input)
  • Table ↓Table - - input data table
  • Function... ↓read_Functions - - read functions for each column of data from the input data table
Returns: AnovaResult ↑result - - ANOVA result object containing output stats e.g. "SS_Columns", "df_Columns", etc.
↑result = Lib.Anova.anovan ( ↑result, ↓gen_interactions, ↓Table, ↓read_Data, ↓read_Functions )

Perform multiple way ANOVA (corresponds to Mathworks anovan). This method takes in the data values as one column, and the separate columns of data for the factor values for each factor for the data values.

Parameters:
  • AnovaResult ↑result - - ANOVA result object to reuse
  • Boolean ↓gen_interactions - - if false, only the one way anova for each factor is evaluated. If true, the inter-factor interactions are evaluated.
  • Table ↓Table - - input data table
  • Function ↓read_Data - - read function for data values
  • Function... ↓read_Functions - - read functions for the value for each factor for the data value
Returns: AnovaResult ↑result - - ANOVA result object containing output stats e.g. "SS_Columns", "df_Columns", etc.
Lib.Anova.printTable ( ↓result )

Print to console as a table the results from the ANOVA calculation

Parameters:

Category: AnyDist

These functions allow calling the various distribution functions from a DistributionParameters object

↑cdfvalue = Lib.AnyDist.cdf ( ↓x, ↓parameters )

Cumulative density function

Parameters:
  • Number ↓x - sample value
  • DistributionParameters ↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.
Returns: Number ↑cdfvalue - value
↑parval = Lib.AnyDist.inv ( ↓p, ↓parameters )

Inverse cumulative density function

Parameters:
  • Number ↓p - cdf probability value between 0 and 1.
  • DistributionParameters ↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.
Returns: Number ↑parval - parameter value corresponding to the given cumulative probability
↑parameters = Lib.AnyDist.paramsFromData ( ↑parameters, ↓distName, Table, read_Col )

Calculate the parameters for Normal distributions from the data

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Text ↓distName - - distribution name. One of XStats.NORMAL, XStats.LOG_NORMAL, XStats.POISSON, ... - one of the distribution constants.
  • Table Table - - input table
  • Function read_Col - - read function for the table value
Returns: DistributionParameters ↑parameters - - see output for paramsFromData for each distribution.
↑pdfvalue = Lib.AnyDist.pdf ( ↓x, ↓parameters )

Probability density function

Parameters:
  • Number ↓x - sample value
  • DistributionParameters ↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.
Returns: Number ↑pdfvalue - value
↑samples = Lib.AnyDist.sample ( ↑samples, ↓n, ↓parameters )

Sampling function

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • DistributionParameters ↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Benfords

These functions help compute Benford's Law

the = Lib.Benfords.digit ( ↓n, ↓pos )

Returns the digit at specified position for specified number

Parameters:
  • Number ↓n - number to extract digit from
  • Number ↓pos - position to extract digit, starting from 1.
Returns: Number the - digit at the specified position. Null if the number is null, not a number or zero.
↑prob = Lib.Benfords.probability ( ↓digit, ↓pos )

Calculate Benford's Law probability for a given digit and position.

Parameters:
  • Number ↓digit - digit to calculate probability for.
  • Number ↓pos - position of digit, 1 onwards. Note that positions after 5 take a while to calculate.
Returns: Number ↑prob - probability as modelled by Benford's Law for the given digit and position.
↑array = Lib.Benfords.stats ( ↑array, ↓Table, ↓read_Field, ↓pos )

Calculate Benford's Law stats for a given series and digit position.

Parameters:
  • Array ↑array - output array. If null a new array will be created and returned.
  • Table ↓Table - input table
  • Function ↓read_Field - input read function
  • Number ↓pos - position to extract digit, starting from 1.
Returns: Array ↑array - output array. Indices 0 to 9 indicate number of counts of those digits. Index 10 indicate number of zero or invalid inputs.

Category: DataAnalysis

Performs Data Analysis

↑SortedSet_Obj = Lib.DataAnalysis.genSorted ( ↓Table, ↓read_Col )

Creates a SortedDataSet, based on the data set

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: SortedDataSet ↑SortedSet_Obj - see class
↑SortedSet_Obj = Lib.DataAnalysis.genSorted_array ( ↓Array )

Creates a SortedDataSet, from an array of values

Parameters:
  • Array ↓Array - - input array
Returns: SortedDataSet ↑SortedSet_Obj - see class

Category: Dists

Probability distributions


Category: Dists.Beta

Beta distribution

↑cdfvalue = Lib.Dists.Beta.cdf ( ↓x, ↓alpha, ↓beta, ↓distMin, ↓distMax )

Cumulative density function of the Beta distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓alpha - parameter for the Beta distribution
  • Number ↓beta - parameter for the Beta distribution
  • Number ↓distMin - parameter for the Beta distribution
  • Number ↓distMax - parameter for the Beta distribution
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.Beta.inv ( ↓p, ↓alpha, ↓beta, ↓distMin, ↓distMax )

Inverse cumulative density function of the Beta distribution

Parameters:
  • Number ↓p - cdf probability value between 0 and 1.
  • Number ↓alpha - parameter for the Beta distribution
  • Number ↓beta - parameter for the Beta distribution
  • Number ↓distMin - parameter for the Beta distribution
  • Number ↓distMax - parameter for the Beta distribution
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.Beta.makeParams ( ↑parameters, ↓alpha, ↓beta, ↓distMin, ↓distMax )

Creates a DistributionParameters for a Truncated Normal distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓alpha - parameter for the Beta distribution
  • Number ↓beta - parameter for the Beta distribution
  • Number ↓distMin - parameter for the Beta distribution
  • Number ↓distMax - parameter for the Beta distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.BETA. Parameters: parameters.alpha, parameters.beta, parameters.distMin, parameters.distMax;
↑parameters = Lib.Dists.Beta.paramsFromData ( ↑parameters, ↓Table, ↓read_Col )

Calculate the parameters for Beta distributions [0, 1] from the data. This calculates statistics from the data and then uses paramsFromStats.

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.BETA. Parameters: parameters.alpha, parameters.beta, parameters.distMin, parameters.distMax;
↑parameters = Lib.Dists.Beta.paramsFromStats ( ↑parameters, ↓stats )

Creates a DistributionParameters for a Beta distribution from the statistics specified Note: uses stats.mean, stats.variance, stats.min, stats.max

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • AllStats ↓stats - statistics of a data set as returned from XStats.Statistics.allStats, or constructed manually
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.BETA. Parameters: parameters.alpha, parameters.beta, parameters.distMin, parameters.distMax;
↑pdfvalue = Lib.Dists.Beta.pdf ( ↓x, ↓alpha, ↓beta, ↓distMin, ↓distMax )

Probability density function of the Beta distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓alpha - parameter for the Beta distribution
  • Number ↓beta - parameter for the Beta distribution
  • Number ↓distMin - parameter for the Beta distribution
  • Number ↓distMax - parameter for the Beta distribution
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.Beta.sample ( ↑samples, ↓n, ↓alpha, ↓beta, ↓distMin, ↓distMax )

Sampling function of the Beta distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓alpha - parameter for the Beta distribution
  • Number ↓beta - parameter for the Beta distribution
  • Number ↓distMin - parameter for the Beta distribution
  • Number ↓distMax - parameter for the Beta distribution
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.Binomial

Binomial distribution

↑cdfvalue = Lib.Dists.Binomial.cdf ( ↓x, ↓n_trials, ↓q_prob )

Cumulative density function of the Binomial distribution

Parameters:
  • Number ↓x - Variable value (successes in trials).
  • Number ↓n_trials - n is the number of trials for binomial distribution
  • Number ↓q_prob - q is the probability of success per trial for binomial distribution
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.Binomial.inv ( ↓p, ↓n_trials, ↓q_prob )

Inverse cumulative density function of the Binomial distribution

Parameters:
  • Number ↓p - cdf probability value between 0 and 1.
  • Number ↓n_trials - n is the number of trials for binomial distribution
  • Number ↓q_prob - q is the probability of success per trial for binomial distribution
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.Binomial.makeParams ( ↑parameters, ↓n_trials, ↓q_prob )

Creates a DistributionParameters for a Binomial distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓n_trials - n is the number of trials for binomial distribution
  • Number ↓q_prob - q is the probability of success per trial for binomial distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.BINOMIAL. Parameters: parameters.n_trials, parameters.q_prob;
↑parameters = Lib.Dists.Binomial.paramsFromData ( ↑parameters, ↓Table, ↓read_Col )

Calculate the parameters for Binomial distributions from the data

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.BINOMIAL. Parameters: parameters.n_trials, parameters.q_prob;
↑pdfvalue = Lib.Dists.Binomial.pdf ( ↓x, ↓n_trials, ↓q_prob )

Probability density function of the Binomial distribution

Parameters:
  • Number ↓x - Variable value (successes in trials).
  • Number ↓n_trials - n is the number of trials for binomial distribution
  • Number ↓q_prob - q is the probability of success per trial for binomial distribution
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.Binomial.sample ( ↑samples, ↓n, ↓n_trials, ↓q_prob )

Sampling function of the Binomial distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓n_trials - n is the number of trials for binomial distribution
  • Number ↓q_prob - q is the probability of success per trial for binomial distribution
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.Exp

Exp distribution

↑cdfvalue = Lib.Dists.Exp.cdf ( ↓x, ↓rate )

Cumulative density function of the Exponential distribution

Parameters:
  • Number ↓x - Variable value.
  • number ↓rate - the rate for the exponential probability distribution.
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.Exp.inv ( p, ↓rate )

Inverse cumulative density function of the Exponential distribution

Parameters:
  • Number p - cdf probability value between 0 and 1.
  • number ↓rate - the rate for the exponential probability distribution.
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.Exp.makeParams ( ↑parameters, ↓rate )

Creates a DistributionParameters for a Exponential distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓rate - the rate for the exponential distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.EXPONENTIAL. Parameters: parameters.rate;
↑parameters = Lib.Dists.Exp.paramsFromData ( ↑parameters, ↓Table, ↓read_Col )

Calculate the parameters for Exponential distributions from the data

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.EXPONENTIAL. Parameters: parameters.rate;
↑parameters = Lib.Dists.Exp.paramsFromStats ( ↑parameters, ↓stats )

Creates a DistributionParameters for a Exponential distribution from the statistics specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • AllStats ↓stats - statistics of a data set as returned from XStats.Statistics.allStats, or constructed manually
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.EXPONENTIAL. Parameters: parameters.rate;
↑pdfvalue = Lib.Dists.Exp.pdf ( ↓x, ↓rate )

Probability density function of the Exponential distribution

Parameters:
  • Number ↓x - Variable value.
  • number ↓rate - the rate for the exponential probability distribution.
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.Exp.sample ( ↑samples, ↓n, ↓rate )

Sampling function of the Exponential distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • number ↓rate - the rate for the exponential probability distribution.
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.ExtremeValue

Extreme Value distribution

↑cdfvalue = Lib.Dists.ExtremeValue.cdf ( ↓x, ↓location, ↓scale )

Cumulative density function of the Extreme Value distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓location - location parameter for the Extreme Value Distribution
  • Number ↓scale - scale parameter for the Extreme Value Distribution
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.ExtremeValue.inv ( p, ↓location, ↓scale )

Inverse cumulative density function of the Extreme Value distribution

Parameters:
  • Number p - cdf probability value between 0 and 1.
  • Number ↓location - location parameter for the Extreme Value Distribution
  • Number ↓scale - scale parameter for the Extreme Value Distribution
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.ExtremeValue.makeParams ( ↑parameters, ↓location, ↓scale )

Creates a DistributionParameters for an Extreme Value distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓location - location parameter for the Extreme Value Distribution
  • Number ↓scale - scale parameter for the Extreme Value Distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.EXTREME_VALUE. Parameters: parameters.location, parameters.scale;
↑pdfvalue = Lib.Dists.ExtremeValue.pdf ( ↓x, ↓location, ↓scale )

Probability density function of the Extreme Value distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓location - location parameter for the Extreme Value Distribution
  • Number ↓scale - scale parameter for the Extreme Value Distribution
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.ExtremeValue.sample ( ↑samples, ↓n, ↓location, ↓scale )

Sampling function of the Extreme Value distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓location - location parameter for the Extreme Value Distribution
  • Number ↓scale - scale parameter for the Extreme Value Distribution
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.Gamma

Gamma distribution

↑cdfvalue = Lib.Dists.Gamma.cdf ( ↓x, ↓shape, ↓scale )

Cumulative density function of the Gamma distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓shape - shape parameter for the Gamma distribution
  • Number ↓scale - scale parameter for the Gamma distribution
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.Gamma.inv ( p, ↓shape, ↓scale )

Inverse cumulative density function of the Gamma distribution

Parameters:
  • Number p - cdf probability value between 0 and 1.
  • Number ↓shape - shape parameter for the Gamma distribution
  • Number ↓scale - scale parameter for the Gamma distribution
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.Gamma.makeParams ( ↑parameters, ↓shape, ↓scale )

Creates a DistributionParameters for a Gamma distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓shape - shape parameter for the Gamma distribution
  • Number ↓scale - scale parameter for the Gamma distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.GAMMA. Parameters: parameters.shape, parameters.scale;
↑parameters = Lib.Dists.Gamma.paramsFromData ( ↑parameters, ↓Table, ↓read_Col )

Calculate the parameters for Gamma distributions from the data.

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.GAMMA. Parameters: parameters.shape, parameters.scale;
↑pdfvalue = Lib.Dists.Gamma.pdf ( ↓x, ↓shape, ↓scale )

Probability density function of the Gamma distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓shape - shape parameter for the Gamma distribution
  • Number ↓scale - scale parameter for the Gamma distribution
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.Gamma.sample ( ↑samples, ↓n, ↓shape, ↓scale )

Sampling function of the Gamma distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓shape - shape parameter for the Gamma distribution
  • Number ↓scale - scale parameter for the Gamma distribution
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.GeneralizedExtremeValue

Generalized Extreme Value distribution

↑cdfvalue = Lib.Dists.GeneralizedExtremeValue.cdf ( ↓x, ↓location, ↓scale, ↓shape )

Cumulative density function of the Generalized Extreme Value distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓location - location parameter of the Generalized Extreme Value distribution
  • Number ↓scale - scale parameter of the Generalized Extreme Value distribution
  • Number ↓shape - shape parameter of the Generalized Extreme Value distribution
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.GeneralizedExtremeValue.inv ( p, ↓location, ↓scale, ↓shape )

Inverse cumulative density function of the Generalized Extreme Value distribution

Parameters:
  • Number p - cdf probability value between 0 and 1.
  • Number ↓location - location parameter of the Generalized Extreme Value distribution
  • Number ↓scale - scale parameter of the Generalized Extreme Value distribution
  • Number ↓shape - shape parameter of the Generalized Extreme Value distribution
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.GeneralizedExtremeValue.makeParams ( ↑parameters, ↓location, ↓scale, ↓shape )

Creates a DistributionParameters for a Generalized Extreme Value distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓location - location parameter of the Generalized Extreme Value distribution
  • Number ↓scale - scale parameter of the Generalized Extreme Value distribution
  • Number ↓shape - shape parameter of the Generalized Extreme Value distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.GENERALIZED_EXTREME_VALUE Parameters: location, scale, shape
↑pdfvalue = Lib.Dists.GeneralizedExtremeValue.pdf ( ↓x, ↓location, ↓scale, ↓shape )

Probability density function of the Generalized Extreme Value distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓location - location parameter of the Generalized Extreme Value distribution
  • Number ↓scale - scale parameter of the Generalized Extreme Value distribution
  • Number ↓shape - shape parameter of the Generalized Extreme Value distribution
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.GeneralizedExtremeValue.sample ( ↑samples, ↓n, ↓location, ↓scale, ↓shape )

Sampling function of the Generalized Extreme Value distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓location - location parameter of the Generalized Extreme Value distribution
  • Number ↓scale - scale parameter of the Generalized Extreme Value distribution
  • Number ↓shape - shape parameter of the Generalized Extreme Value distribution
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.Gumbel

Gumbel distribution

↑cdfvalue = Lib.Dists.Gumbel.cdf ( ↓x, ↓location, ↓scale )

Cumulative density function of the Gumbel distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓location - location parameter of the Gumbel distribution
  • Number ↓scale - scale parameter of the Gumbel distribution
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.Gumbel.inv ( p, ↓location, ↓scale )

Inverse cumulative density function of the Gumbel distribution

Parameters:
  • Number p - cdf probability value between 0 and 1.
  • Number ↓location - location parameter of the Gumbel distribution
  • Number ↓scale - scale parameter of the Gumbel distribution
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.Gumbel.makeParams ( ↑parameters, ↓location, ↓scale )

Creates a DistributionParameters for a Gumbel distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓location - location parameter of the Gumbel distribution
  • Number ↓scale - scale parameter of the Gumbel distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.GUMBEL. Parameters: location, scale
↑parameters = Lib.Dists.Gumbel.paramsFromData ( ↑parameters, ↓Table, ↓read_Col )

Calculate the parameters for Gumbel distributions from the data.

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.GUMBEL. Parameters: scale, location
↑parameters = Lib.Dists.Gumbel.paramsFromStats ( ↑parameters, ↓stats )

Calculate the parameters for Gumbel distribution from stats.

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • AllStats ↓stats - - input stats
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.GUMBEL. parameters: location, scale
↑pdfvalue = Lib.Dists.Gumbel.pdf ( ↓x, ↓location, ↓scale )

Probability density function of the Gumbel distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓location - location parameter of the Gumbel distribution
  • Number ↓scale - scale parameter of the Gumbel distribution
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.Gumbel.sample ( ↑samples, ↓n, ↓location, ↓scale )

Sampling function of the Gumbel distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓location - location parameter of the Gumbel distribution
  • Number ↓scale - scale parameter of the Gumbel distribution
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.Hypergeom

Hypergeometric distribution

↑cdfvalue = Lib.Dists.Hypergeom.cdf ( ↓x, ↓a, ↓b, ↓n_balls )

Cumulative density function of the Hypergeom distribution

Parameters:
  • Number ↓x - Variable value (number of white balls drawn without replacement).
  • Number ↓a - hypergeometric distribution parameter - number of white balls.
  • Number ↓b - hypergeometric distribution parameter - number of black balls.
  • Number ↓n_balls - hypergeometric distribution parameter - number of balls drawn from the urn.
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.Hypergeom.inv ( p, ↓a, ↓b, ↓n_balls )

Inverse cumulative density function of the Hypergeom distribution

Parameters:
  • Number p - cdf probability value between 0 and 1.
  • Number ↓a - hypergeometric distribution parameter - number of white balls.
  • Number ↓b - hypergeometric distribution parameter - number of black balls.
  • Number ↓n_balls - hypergeometric distribution parameter - number of balls drawn from the urn.
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.Hypergeom.makeParams ( ↑parameters, ↓a, ↓b, ↓n_balls )

Creates a DistributionParameters for a Hypergeom distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓a - hypergeometric distribution parameter - number of white balls.
  • Number ↓b - hypergeometric distribution parameter - number of black balls.
  • Number ↓n_balls - hypergeometric distribution parameter - number of balls drawn from the urn.
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.HYPERGEOMETRIC. Parameters: parameters.a, parameters.b, parameters.n_balls;
↑pdfvalue = Lib.Dists.Hypergeom.pdf ( ↓x, ↓a, ↓b, ↓n_balls )

Probability density function of the Hypergeom distribution

Parameters:
  • Number ↓x - Variable value (number of white balls drawn without replacement).
  • Number ↓a - hypergeometric distribution parameter - number of white balls.
  • Number ↓b - hypergeometric distribution parameter - number of black balls.
  • Number ↓n_balls - hypergeometric distribution parameter - number of balls drawn from the urn.
Returns: Number ↑pdfvalue

Category: Dists.InverseGamma

InverseGamma distribution

↑cdfvalue = Lib.Dists.InverseGamma.cdf ( ↓x, ↓shape, ↓scale )

Cumulative density function of the InverseGamma distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓shape - shape parameter of the InverseGamma distribution
  • Number ↓scale - scale parameter of the InverseGamma distribution
Returns: Number ↑cdfvalue
↑parameters = Lib.Dists.InverseGamma.makeParams ( ↑parameters, ↓shape, ↓scale )

Creates a DistributionParameters for a InverseGamma distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓shape - shape parameter of the InverseGamma distribution
  • Number ↓scale - scale parameter of the InverseGamma distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.INVERSE_GAMMA. Parameters: shape, scale
↑pdfvalue = Lib.Dists.InverseGamma.pdf ( ↓x, ↓shape, ↓scale )

Probability density function of the InverseGamma distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓shape - shape parameter of the InverseGamma distribution
  • Number ↓scale - scale parameter of the InverseGamma distribution
Returns: Number ↑pdfvalue

Category: Dists.LogNormal

Log Normal distribution

↑cdfvalue = Lib.Dists.LogNormal.cdf ( ↓x, ↓mu, ↓sigma )

Cumulative density function of the Log Normal distribution

Parameters:
  • Number ↓x - Variable value.
  • Number ↓mu - the log mean for the log normal distribution
  • Number ↓sigma - the log standard deviation for the log normal distribution
Returns: Number ↑cdfvalue
sample = Lib.Dists.LogNormal.inv ( p, ↓mu, ↓sigma )

Inverse cumulative density function of the Log Normal distribution

Parameters:
  • Number p - cdf probability value between 0 and 1.
  • Number ↓mu - the log mean for the log normal distribution
  • Number ↓sigma - the log standard deviation for the log normal distribution
Returns: Number sample - value
the = Lib.Dists.LogNormal.location ( ↓mean, ↓stdev )

returns the "location" or "logmean" parameter of the lognormal distribution from the mean and standard deviation TODO {Chun} this should become Thingo = ParamsFromStats.lognormal(in_mean,out_stdev) TODO {Chun} {Paul} not sure what shape or form "Thingo" should have array/object. It should contain the parameters scale and location which I should be able to extract but also be able to send as a black box to the lognormal functions?

Parameters:
  • Number ↓mean - The Mean value of a stochastic variable
  • Number ↓stdev - The standard deviation of a stochastic variable
Returns: Number the - "location" or "logmean" parameter
↑parameters = Lib.Dists.LogNormal.makeParams ( ↑parameters, ↓location, ↓scale )

Creates a DistributionParameters for a LogNormal distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓location - the location or logmean for the log normal distribution
  • Number ↓scale - the scale or log standard deviation for the log normal distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.LOG_NORMAL. Parameters: parameters.location, parameters.scale;
↑parameters = Lib.Dists.LogNormal.paramsFromData ( ↑parameters, ↓Table, ↓read_Col )

Calculate the parameters for Log Normal distributions from the data. This function works by log()ing the data and computing the location+scale directly.

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.LOG_NORMAL. Parameters: parameters.location, parameters.scale;
↑parameters = Lib.Dists.LogNormal.paramsFromStats ( ↑parameters, ↓stats )

Creates a DistributionParameters for a LogNormal distribution from the statistics specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • AllStats ↓stats - statistics of a data set as returned from XStats.Statistics.allStats
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.LOG_NORMAL. Parameters: parameters.location, parameters.scale;
↑pdfvalue = Lib.Dists.LogNormal.pdf ( ↓x, ↓mu, ↓sigma )

Probability density function of the LogNormal distribution

Parameters:
  • Number ↓x - sample value.
  • Number ↓mu - the log mean for the log normal distribution
  • Number ↓sigma - the log standard deviation for the log normal distribution
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.LogNormal.sample ( ↑samples, ↓n, ↓mu, ↓sigma )

Sampling function of the Log Normal distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓mu - the log mean for the log normal distribution
  • Number ↓sigma - the log standard deviation for the log normal distribution
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.
the = Lib.Dists.LogNormal.scale ( mean, stdev )

returns the "scale" or "logstdev" parameter of the lognormal distribution from the mean and standard deviation

Parameters:
  • Number mean - The Mean value of a stochastic variable
  • Number stdev - The standard deviation of a stochastic variable
Returns: Number the - "scale" or "logstdev" parameter

Category: Dists.Normal

Normal distribution

↑cdfvalue = Lib.Dists.Normal.cdf ( ↓x, ↓mu, ↓sigma )

Cumulative density function of the Normal distribution

Parameters:
  • Number ↓x - sample value.
  • Number ↓mu - the mean for the normal distribution
  • Number ↓sigma - the standard deviation for the normal distribution
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.Normal.inv ( ↓p, ↓mu, ↓sigma )

Inverse cumulative density function of the Normal distribution

Parameters:
  • Number ↓p - cdf probability value between 0 and 1.
  • Number ↓mu - the mean for the normal distribution
  • Number ↓sigma - the standard deviation for the normal distribution
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.Normal.makeParams ( ↑parameters, ↓mu, ↓sigma )

Creates a DistributionParameters for a Normal distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓mu - the mean for the normal distribution
  • Number ↓sigma - the standard deviation for the normal distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.NORMAL. Parameters: parameters.mu, parameters.sigma;
↑parameters = Lib.Dists.Normal.paramsFromData ( ↑parameters, Table, read_Col )

Calculate the parameters for Normal distributions from the data

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Table Table - - input table
  • Function read_Col - - read function for the table value
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.NORMAL. Parameters: parameters.mu, parameters.sigma;
↑parameters = Lib.Dists.Normal.paramsFromStats ( ↑parameters, ↓stats )

Creates a DistributionParameters for a Normal distribution from the statistics specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • AllStats ↓stats - statistics of a data set as returned from XStats.Statistics.allStats, or constructed manually
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.NORMAL. Parameters: parameters.mu, parameters.sigma;
↑pdfvalue = Lib.Dists.Normal.pdf ( ↓x, ↓mu, ↓sigma )

Probability density function of the Normal distribution

Parameters:
  • Number ↓x - sample value.
  • Number ↓mu - the mean for the normal distribution
  • Number ↓sigma - the standard deviation for the normal distribution
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.Normal.sample ( ↑samples, ↓n, ↓mu, ↓sigma )

Sampling function of the Normal distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓mu - the mean for the normal distribution
  • Number ↓sigma - the standard deviation for the normal distribution
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.PearsonTypeV

PearsonTypeV distribution

↑cdfvalue = Lib.Dists.PearsonTypeV.cdf ( ↓x, ↓a, ↓b0, ↓b1, ↓b2, ↓mu )

Cumulative density function of the PearsonTypeV distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓a - a parameter of the PearsonTypeV distribution
  • Number ↓b0 - b0 parameter of the PearsonTypeV distribution
  • Number ↓b1 - b1 parameter of the PearsonTypeV distribution
  • Number ↓b2 - b2 parameter of the PearsonTypeV distribution
  • Number ↓mu - mu parameter of the PearsonTypeV distribution
Returns: Number ↑cdfvalue
↑parameters = Lib.Dists.PearsonTypeV.makeParams ( ↑parameters, ↓a, ↓b0, ↓b1, ↓b2, ↓mu )

Creates a DistributionParameters for a PearsonTypeV distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓a - a parameter of the PearsonTypeV distribution
  • Number ↓b0 - b0 parameter of the PearsonTypeV distribution
  • Number ↓b1 - b1 parameter of the PearsonTypeV distribution
  • Number ↓b2 - b2 parameter of the PearsonTypeV distribution
  • Number ↓mu - mu parameter of the PearsonTypeV distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.PEARSON_TYPE_V. Parameters: shape, scale
↑pdfvalue = Lib.Dists.PearsonTypeV.pdf ( ↓x, ↓a, ↓b0, ↓b1, ↓b2, ↓mu )

Probability density function of the PearsonTypeV distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓a - a parameter of the PearsonTypeV distribution
  • Number ↓b0 - b0 parameter of the PearsonTypeV distribution
  • Number ↓b1 - b1 parameter of the PearsonTypeV distribution
  • Number ↓b2 - b2 parameter of the PearsonTypeV distribution
  • Number ↓mu - mu parameter of the PearsonTypeV distribution
Returns: Number ↑pdfvalue

Category: Dists.Poisson

Poisson distribution

↑cdfvalue = Lib.Dists.Poisson.cdf ( ↓x, ↓parameters )

Cumulative density function of the Poisson distribution

Parameters:
  • Number ↓x - Variable value.
  • Array ↓parameters - either a number l or an array [l]. l is the mean for the poisson probability distribution.
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.Poisson.inv ( p, parameters )

Inverse cumulative density function of the Poisson distribution

Parameters:
  • Number p - cdf probability value between 0 and 1.
  • Array parameters - either a number l or an array [l]. l is the mean for the poisson probability distribution.
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.Poisson.makeParams ( ↑parameters, ↓lambda )

Creates a DistributionParameters for a Poisson distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓lambda - the mean for the poisson distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.POISSON. Parameters: parameters.lambda;
↑parameters = Lib.Dists.Poisson.paramsFromData ( ↑parameters, ↓Table, ↓read_Col )

Calculate the parameters for Poisson distributions from the data

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.POISSON. Parameters: parameters.lambda;
↑pdfvalue = Lib.Dists.Poisson.pdf ( ↓x, ↓parameters )

Probability density function of the Poisson distribution

Parameters:
  • Number ↓x - Variable value.
  • Array ↓parameters - either a number l or an array [l]. l is the mean for the poisson probability distribution.
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.Poisson.sample ( ↑samples, ↓n, ↓parameters )

Sampling function of the Poisson distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Array ↓parameters - either a number l or an array [l]. l is the mean for the poisson probability distribution.
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.T

Student T distribution

↑cdfvalue = Lib.Dists.T.cdf ( ↓x, ↓parameters )

Cumulative density function of the Student T distribution

Parameters:
  • Number ↓x - Variable value
  • Array ↓parameters - an array containing [v] or the number v (degrees of freedom) - parameter for the T distribution.
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.T.inv ( p, ↓parameters )

Inverse cumulative density function of the Student T distribution

Parameters:
  • Number p - cdf probability value between 0 and 1.
  • Array ↓parameters - an array containing [v] or the number v (degrees of freedom) - parameter for the T distribution.
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.T.makeParams ( ↑parameters, ↓v )

Creates a DistributionParameters for a Exponential distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓v - the number v (degrees of freedom) - parameter for the T distribution.
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.T. Parameters: parameters.v;
↑parameters = Lib.Dists.T.paramsFromData ( ↑parameters, ↓Table, ↓read_Col )

Calculate the parameters for Student T distributions from the data. Note this really fits only if the mean is close to zero.

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.T. Parameters: parameters.v;
↑parameters = Lib.Dists.T.paramsFromStats ( ↑parameters, ↓stats )

Calculate the parameters for Student T distributions from stats.

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • AllStats ↓stats - - input stats
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.T. parameters.params = [v];
↑pdfvalue = Lib.Dists.T.pdf ( ↓x, ↓parameters )

Probability density function of the Student T distribution

Parameters:
  • Number ↓x - Variable value
  • Array ↓parameters - an array containing [v] or the number v (degrees of freedom) - parameter for the T distribution.
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.T.sample ( ↑samples, ↓n, ↓parameters )

Sampling function of the Student T distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Array ↓parameters - an array containing [v] or the number v (degrees of freedom) - parameter for the T distribution.
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.Triangular

Triangular distribution

↑cdfvalue = Lib.Dists.Triangular.cdf ( ↓x, ↓a, ↓b, ↓c )

Cumulative density function of the Triangular distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓a - a - parameter for triangular distribution (minimum)
  • Number ↓b - b - parameter for triangular distribution (mode)
  • Number ↓c - c - parameter for triangular distribution (maximum)
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.Triangular.inv ( ↓p, ↓a, ↓b, ↓c )

Inverse cumulative density function of the Triangular distribution

Parameters:
  • Number ↓p - cdf probability value between 0 and 1
  • Number ↓a - a - parameter for triangular distribution (minimum)
  • Number ↓b - b - parameter for triangular distribution (mode)
  • Number ↓c - c - parameter for triangular distribution (maximum)
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.Triangular.makeParams ( ↑parameters, ↓a, ↓b, ↓c )

Creates a DistributionParameters for a Triangular distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓a - a - parameter for triangular distribution (minimum)
  • Number ↓b - b - parameter for triangular distribution (mode)
  • Number ↓c - c - parameter for triangular distribution (maximum)
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.TRIANGULAR. Parameters: parameters.a, parameters.b, parameters.c;
↑parameters = Lib.Dists.Triangular.paramsFromStats ( ↑parameters, ↓stats )

Creates a DistributionParameters for a Uniform distribution from the statistics specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • AllStats ↓stats - statistics of a data set as returned from XStats.Statistics.allStats, or constructed manually
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.TRIANGULAR. Parameters: parameters.a, parameters.b, parameters.c;
↑pdfvalue = Lib.Dists.Triangular.pdf ( ↓x, ↓a, ↓b, ↓c )

Probability density function of the Triangular distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓a - a - parameter for triangular distribution (minimum)
  • Number ↓b - b - parameter for triangular distribution (mode)
  • Number ↓c - c - parameter for triangular distribution (maximum)
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.Triangular.sample ( ↑samples, ↓n, ↓a, ↓b, ↓c )

Sampling function of the Triangular distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓a - a - parameter for triangular distribution (minimum)
  • Number ↓b - b - parameter for triangular distribution (mode)
  • Number ↓c - c - parameter for triangular distribution (maximum)
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.TruncatedExp

Truncated Exp distribution

↑cdfvalue = Lib.Dists.TruncatedExp.cdf ( ↓x, ↓rate, ↓xmax )

Cumulative density function of the Exponential distribution

Parameters:
  • Number ↓x - Variable value.
  • Number ↓rate - rate of exponential probability distribution
  • Number ↓xmax - the upper level at which the distribution trunates
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.TruncatedExp.inv ( p, ↓rate, ↓xmax )

Inverse cumulative density function of the Truncated Exponential distribution

Parameters:
  • Number p - cdf probability value between 0 and 1.
  • Number ↓rate - rate of exponential probability distribution
  • Number ↓xmax - the upper level at which the distribution trunates
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.TruncatedExp.makeParams ( ↑parameters, ↓rate, ↓xmax )

Creates a DistributionParameters for a Truncated Exponential distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓rate - the rate for the truncated exponential distribution
  • Number ↓xmax - the maximum x bound for the truncated exponential distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.TRUNCATED_EXP. Parameters: parameters.rate, parameters.xmax
↑parameters = Lib.Dists.TruncatedExp.paramsFromGuess ( ↑parameters, ↓stats )

Creates a DistributionParameters for a Truncated Exponential distribution guessed from the statistics specified

The function first uses the mean to guess the rate of the untruncated Exponential distribution, and then truncates it according to the max specified. As a result the mean of the truncated distribution may not match the mean specified.

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • AllStats ↓stats - statistics of a data set as returned from XStats.Statistics.allStats, or constructed manually
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.TRUNCATED_EXP. Parameters: parameters.rate, parameters.xmax;
↑pdfvalue = Lib.Dists.TruncatedExp.pdf ( ↓x, ↓rate, ↓xmax )

Probability density function of the Truncated Exponential distribution

Parameters:
  • Number ↓x - Variable value.
  • Number ↓rate - rate of exponential probability distribution
  • Number ↓xmax - the upper level at which the distribution trunates
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.TruncatedExp.sample ( ↑samples, ↓n, ↓rate, ↓xmax )

Sampling function of the Truncated Exponential distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓rate - rate of exponential probability distribution
  • Number ↓xmax - the upper level at which the distribution trunates
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.TruncatedLogNormal

Truncated Log Normal distribution

↑cdfvalue = Lib.Dists.TruncatedLogNormal.cdf ( ↓x, ↓mu, ↓sigma, ↓lower, ↓upper )

Cumulative density function of the Truncated Log Normal distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓mu - log mean for the log normal distribution
  • Number ↓sigma - log standard deviation for the log normal distribution
  • Number ↓lower - lower bound for the truncated log normal distribution
  • Number ↓upper - upper bound for the truncated log normal distribution
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.TruncatedLogNormal.inv ( ↓p, ↓mu, ↓sigma )

Inverse cumulative density function of the Truncated Log Normal distribution

Parameters:
  • Number ↓p - cdf probability value between 0 and 1.
  • Number ↓mu - log mean for the log normal distribution
  • Number ↓sigma - log standard deviation for the log normal distribution
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.TruncatedLogNormal.makeParams ( ↑parameters, ↓mu, ↓sigma, ↓lower, ↓upper )

Creates a DistributionParameters for a Truncated Log Normal distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓mu - log mean for the log normal distribution
  • Number ↓sigma - log standard deviation for the log normal distribution
  • Number ↓lower - lower bound for the truncated log normal distribution
  • Number ↓upper - upper bound for the truncated log normal distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.TRUNCATED_LOG_NORMAL. Parameters: parameters.mu, parameters.sigma, parameters.lower, parameters.upper;
↑parameters = Lib.Dists.TruncatedLogNormal.paramsFromGuess ( ↑parameters, ↓stats )

Creates a DistributionParameters for a Truncated Log Normal distribution from the statistics specified.

Note this method guesses the distribution first as a standard Log Normal distribution of log mean and log stdev provided, and then truncates that distribution with the specified min and max. Hence the resultant truncated distribution may not have the log mean and log stdev as specified.

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • AllStats ↓stats - statistics of a data set as returned from XStats.Statistics.allStats, or constructed manually
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.TRUNCATED_LOG_NORMAL. Parameters: parameters.mu, parameters.sigma;
↑pdfvalue = Lib.Dists.TruncatedLogNormal.pdf ( ↓x, ↓mu, ↓sigma, ↓lower, ↓upper )

Probability density function of the Truncated Log Normal distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓mu - log mean for the log normal distribution
  • Number ↓sigma - log standard deviation for the log normal distribution
  • Number ↓lower - lower bound for the truncated log normal distribution
  • Number ↓upper - upper bound for the truncated log normal distribution
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.TruncatedLogNormal.sample ( ↑samples, ↓n, ↓mu, ↓sigma, ↓lower, ↓upper )

Sampling function of the Truncated Log Normal distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓mu - log mean for the log normal distribution
  • Number ↓sigma - log standard deviation for the log normal distribution
  • Number ↓lower - lower bound for the truncated log normal distribution
  • Number ↓upper - upper bound for the truncated log normal distribution
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.TruncatedNormal

Truncated Normal distribution

↑cdfvalue = Lib.Dists.TruncatedNormal.cdf ( ↓x, ↓mu, ↓sigma, ↓lower, ↓upper )

Cumulative density function of the Truncated Normal distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓mu - mean for the truncated normal distribution
  • Number ↓sigma - standard deviation for the truncated normal distribution
  • Number ↓lower - lower bound for the truncated normal distribution
  • Number ↓upper - upper bound for the truncated normal distribution
Returns: Number ↑cdfvalue
↑parvalue = Lib.Dists.TruncatedNormal.inv ( ↓p, ↓mu, ↓sigma )

Inverse cumulative density function of the Truncated Normal distribution

Parameters:
  • Number ↓p - cdf probability value between 0 and 1.
  • Number ↓mu - the mean for the normal distribution
  • Number ↓sigma - the standard deviation for the normal distribution
Returns: Number ↑parvalue - value of stochastic variable at cumulative probability p
↑parameters = Lib.Dists.TruncatedNormal.makeParams ( ↑parameters, ↓mu, ↓sigma, ↓lower, ↓upper )

Creates a DistributionParameters for a Truncated Normal distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓mu - mean for the truncated normal distribution
  • Number ↓sigma - standard deviation for the truncated normal distribution
  • Number ↓lower - lower bound for the truncated normal distribution
  • Number ↓upper - upper bound for the truncated normal distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.TRUNCATED_NORMAL. Parameters: parameters.mu, parameters.sigma, parameters.lower, parameters.upper;
↑parameters = Lib.Dists.TruncatedNormal.paramsFromGuess ( ↑parameters, ↓stats )

Creates a DistributionParameters for a Truncated Normal distribution from the statistics specified.

Note this method guesses the distribution first as a standard Normal distribution of mean and stdev provided, and then truncates that distribution with the specified min and max. Hence the resultant truncated distribution may not have the mean and stdev as specified.

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • AllStats ↓stats - statistics of a data set as returned from XStats.Statistics.allStats, or constructed manually
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.TRUNCATEDNORMAL. Parameters: parameters.mu, parameters.sigma;
↑pdfvalue = Lib.Dists.TruncatedNormal.pdf ( ↓x, ↓mu, ↓sigma, ↓lower, ↓upper )

Probability density function of the Truncated Normal distribution

Parameters:
  • Number ↓x - Variable value
  • Number ↓mu - mean for the truncated normal distribution
  • Number ↓sigma - standard deviation for the truncated normal distribution
  • Number ↓lower - lower bound for the truncated normal distribution
  • Number ↓upper - upper bound for the truncated normal distribution
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.TruncatedNormal.sample ( ↑samples, ↓n, ↓mu, ↓sigma, ↓lower, ↓upper )

Sampling function of the Truncated Normal distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓mu - mean for the truncated normal distribution
  • Number ↓sigma - standard deviation for the truncated normal distribution
  • Number ↓lower - lower bound for the truncated normal distribution
  • Number ↓upper - upper bound for the truncated normal distribution
Returns: Array ↑samples - the output array if provided, else a new array is created and returned containing the samples.

Category: Dists.Uniform

Uniform distribution

↑cdfvalue = Lib.Dists.Uniform.cdf ( ↓x, ↓min, ↓max )

Cumulative density function of the Uniform distribution

Parameters:
  • Number ↓x - Variable value.
  • Number ↓min - minimum for uniform distribution
  • Number ↓max - maximum for uniform distribution
Returns: Number ↑cdfvalue
sample = Lib.Dists.Uniform.inv ( ↓p, ↓min, ↓max )

Inverse cumulative density function of the Uniform distribution

Parameters:
  • Number ↓p - cdf probability value between 0 and 1.
  • Number ↓min - minimum for uniform distribution
  • Number ↓max - maximum for uniform distribution
Returns: Number sample - value
↑parameters = Lib.Dists.Uniform.makeParams ( ↑parameters, ↓min, ↓max )

Creates a DistributionParameters for a Uniform distribution from the parameters specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Number ↓min - the minimum for the uniform distribution
  • Number ↓max - the maximum for the uniform distribution
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.UNIFORM. Parameters: parameters.min, parameters.max;
↑parameters = Lib.Dists.Uniform.paramsFromData ( ↑parameters, ↓Table, ↓read_Col )

Calculate the parameters for Uniform distributions from the data

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.UNIFORM. Parameters: parameters.min, parameters.max;
↑parameters = Lib.Dists.Uniform.paramsFromStats ( ↑parameters, ↓stats )

Creates a DistributionParameters for a Uniform distribution from the statistics specified

Parameters:
  • DistributionParameters ↑parameters - object will be updated with results and returned. if null, new object is created and returned.
  • AllStats ↓stats - statistics of a data set as returned from XStats.Statistics.allStats, or constructed manually
Returns: DistributionParameters ↑parameters - - parameters.dist = Xstats.UNIFORM. Parameters: parameters.min, parameters.max;
↑pdfvalue = Lib.Dists.Uniform.pdf ( ↓x, ↓min, ↓max )

Probability density function of the Uniform distribution

Parameters:
  • Number ↓x - Variable value.
  • Number ↓min - minimum for uniform distribution
  • Number ↓max - maximum for uniform distribution
Returns: Number ↑pdfvalue
↑samples = Lib.Dists.Uniform.sample ( ↑samples, ↓n, ↓min, ↓max )

Sampling function of the Uniform distribution

Parameters:
  • Array ↑samples - output array to contain the number of generated samples
  • Number ↓n - number of samples to generate
  • Number ↓min - minimum for uniform distribution
  • Number ↓max - maximum for uniform distribution
Returns: Array ↑samples - the output array if provided, otherwise a new array is created for the samples

Category: DistsParams

Utilities for DistributionParameters

↑distParams = Lib.DistsParams.readFromText ( ↓text )

This function allows a DistributionParameters object to be read from text.

Parameters:
  • Text ↓text - text containing the distribution parameters.
Returns: DistributionParameters ↑distParams - the DistributionParameters object
↑text = Lib.DistsParams.writeToText ( ↓distParams )

This function allows a DistributionParameters object to be saved as text.

Parameters: Returns: Text ↑text - text containing the distribution parameters.

Category: QQ

These functions help construct a QQ Plot

Lib.QQ.sort ( ↑Table, ↑write_Field, ↓Table, ↓read_Field )

Performs QQ Plot preprocessing on one series: records in specified input is sorted and output to specified output
Example: (OUTTable, OUTTable.write_X, INTable, INTable.read_X);

Parameters:
  • Table ↑Table - output table
  • Function ↑write_Field - output write function
  • Table ↓Table - input table
  • Function ↓read_Field - input read function
Lib.QQ.sort_array ( ↑series_array, ↓series_array, ↓num_records )

Performs QQ Plot preprocessing on one series: in_series_array is sorted and output into out_series_array

Parameters:
  • Array ↑series_array - output array
  • Array ↓series_array - input array
  • Number ↓num_records - number of records in the input array

Category: Sampling

Utility methods around sampling

↑array = Lib.Sampling.sample ( ↑array, ↓sample_size, ↓Table, ↓column )

This method returns uniform sampled data

Parameters:
  • Array ↑array - - output array to reuse
  • Number ↓sample_size - - the number of samples to generate
  • Table ↓Table - input data table
  • Function ↓column - input data table read function, e.g. Table.read_Column
Returns: Array ↑array - - output array containing indices to your set data for samples, or null if you should use your full set data (you have specified a sample_size > set_size).
↑array = Lib.Sampling.sampleFromSortedDataSet ( ↑array, ↓sample_size, ↓sortedDataSet )

This method returns uniform sampled data

Parameters:
  • Array ↑array - - output array to reuse
  • Number ↓sample_size - - the number of samples to generate
  • SortedDataSet ↓sortedDataSet - see the method XStats.DataAnalysis.genSorted
Returns: Array ↑array - - output array containing indices to your set data for samples, or null if you should use your full set data (you have specified a sample_size > set_size).
↑array = Lib.Sampling.sampleIndexes ( ↑array, ↓sample_size, ↓set_size )

This method returns an array of indices to a data set/array for an uniform sampling

Parameters:
  • Array ↑array - - output array to reuse
  • Number ↓sample_size - - the number of samples to generate
  • Number ↓set_size - - the number of data points in your series to sample.
Returns: Array ↑array - - output array containing indices to your set data for samples, or null if you should use your full set data (you have specified a sample_size > set_size).

Category: StatFit

Calculate the goodness of fit of statistical distributions

↑distParameters = Lib.StatFit.bestFit ( ↓Table, ↓column, ↓sampleIndexes, ↓distsToUse, ↓measureToUse )

Performs the statistical bestfit as described by rankFits, and returns the closest fit.

Parameters:
  • Table ↓Table - input data table
  • Function ↓column - input data table read function, e.g. Table.read_Column
  • Array ↓sampleIndexes - optional - an array of indices to the set for sampling when computing KS Error. See Xstats.Sampling.sampleIndexes on how to obtain this array. If not specified, uses all data.
  • Array ↓distsToUse - optional - an array of distribution names, e.g. [Xstats.BETA, Xstats.GAMMA, ...] to use in the fitting. If not specified, uses all supported distributions.
  • Text ↓measureToUse - optional - one of 'ks', 'rmse', 'rsquare'. KS (default) and RMSE is smallest best, Rsquare is largest best.
Returns: DistributionParameters ↑distParameters - Distribution parameters corresponding to closest fit
↑distParameters = Lib.StatFit.bestFitFromSamples ( ↓Table, ↓column, ↓sampleCount )

Performs the statistical bestfit as described by rankFits, and returns the closest fit. This variant allows specification of a sampling count to speed up computing the KS Test for large datasets. (Sampling is used only for the KS Test - fitting will still use full input data set)

Parameters:
  • Table ↓Table - input data table
  • Function ↓column - input data table read function, e.g. Table.read_Column
  • Number ↓sampleCount - Number of samples to use for computing KS Test
Returns: DistributionParameters ↑distParameters - Distribution parameters corresponding to closest fit
↑ksvalue = Lib.StatFit.ks ( distParams, ↓Table, ↓column, ↓sampleIndexes )

Kolmogorov-Smirnov (KS test) using a data series and a DistributionParameters.

When performing multiple KS tests on the same samples, it is more efficient to create a SortedDataSet

Parameters:
  • DistributionParameters distParams - see the category XStats.ParamsFromData.
  • Table ↓Table - input data table
  • Function ↓column - input data table read function, e.g. Table.read_Column
  • Array ↓sampleIndexes - optional - an array of indices to the set for sampling. See Xstats.Sampling.sampleIndexes on how to obtain this array. If not specified, uses all data.
Returns: Number ↑ksvalue - KS Test result in terms of maximum error in percentile values
↑ksvalue = Lib.StatFit.ksOnSet ( ↓parameters, ↓sampleSet, ↓sampleIndexes )

Kolmogorov-Smirnov (KS test) using a SortedDataSet and a DistributionParameters.

When performing multiple KS tests on the same samples, it is more efficient to create a SortedDataSet

Parameters:
  • DistributionParameters ↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.
  • SortedDataSet ↓sampleSet - see the method XStats.DataAnalysis.genSorted
  • Array ↓sampleIndexes - optional - an array of indices to the set for sampling. See Xstats.Sampling.sampleIndexes on how to obtain this array. If not specified, uses all data.
Returns: Number ↑ksvalue - KS Test result in terms of maximum error in percentile values
the = Lib.StatFit.rankFits ( ↑distParamsArray, ↑MeasureArray, ↓Table, ↓column, ↓sampleIndexes, ↓distsToUse, ↓measureToUse )

Derives parameters for each distribution from the data set and ranks them (in order of smallest error first) according to the measure specified (KS default)

Parameters:
  • Array ↑distParamsArray - output array of DistributionParameters objects
  • Array ↑MeasureArray - output array of Numbers - which is the numerical result for the measure used for sorting. Default is KS.
  • Table ↓Table - input data table
  • Function ↓column - input data table read function, e.g. Table.read_Column
  • Array ↓sampleIndexes - optional - an array of indices to the set for sampling when computing KS Error. See Xstats.Sampling.sampleIndexes on how to obtain this array. If not specified, uses all data.
  • Array ↓distsToUse - optional - an array of distribution names, e.g. [XShapes.BETA, XShapes.GAMMA, ...] to use in the fitting. If not specified, uses all supported distributions.
  • Text ↓measureToUse - optional - one of 'ks', 'rmse', 'rsquare'. KS (default) and RMSE is smallest best, Rsquare is largest best.
Returns: Number the - number of distribution fits returned.
the = Lib.StatFit.rankFitsFromSamples ( ↑distParamsArray, ↑KSErrorArray, ↓Table, ↓column, ↓sampleCount )

Derives parameters for each distribution from the data set and ranks them (in order of smallest error first) according to the KS Test. This variant allows specification of a sampling count to speed up computing the KS Test for large datasets. (Sampling is used only for the KS Test - fitting will still use full input data set)

Parameters:
  • Array ↑distParamsArray - output array of DistributionParameters objects
  • Array ↑KSErrorArray - output array of Numbers - which are the KS errors for each output distribution
  • Table ↓Table - input data table
  • Function ↓column - input data table read function, e.g. Table.read_Column
  • Number ↓sampleCount - Number of samples to use for computing KS Test
Returns: Number the - number of distribution fits returned.
↑rmsevalue = Lib.StatFit.rmse ( distParams, ↓Table, ↓column, ↓sampleIndexes )

Calculate root-mean-square-error using a data series and a DistributionParameters.

When performing multiple root-mean-square-error calculations on the same samples, it is more efficient to create a SortedDataSet

Parameters:
  • DistributionParameters distParams - see the category XStats.ParamsFromData.
  • Table ↓Table - input data table
  • Function ↓column - input data table read function, e.g. Table.read_Column
  • Array ↓sampleIndexes - optional - an array of indices to the set for sampling. See Xstats.Sampling.sampleIndexes on how to obtain this array. If not specified, uses all data.
Returns: Number ↑rmsevalue - root-mean-square-error result
↑rmsevalue = Lib.StatFit.rmseOnSet ( ↓parameters, ↓sampleSet, ↓sampleIndexes )

Calculate root-mean-square-error using a SortedDataSet and a DistributionParameters.

When performing multiple root-mean-square-error calculations on the same samples, it is more efficient to create a SortedDataSet

Parameters:
  • DistributionParameters ↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.
  • SortedDataSet ↓sampleSet - see the method XStats.DataAnalysis.genSorted
  • Array ↓sampleIndexes - optional - an array of indices to the set for sampling. See Xstats.Sampling.sampleIndexes on how to obtain this array. If not specified, uses all data.
Returns: Number ↑rmsevalue - root-mean-square-error result
↑rsquarevalue = Lib.StatFit.rsquare ( distParams, ↓Table, ↓column, ↓sampleIndexes )

R square goodness of fit using a data series and a DistributionParameters.

When performing multiple R square tests on the same samples, it is more efficient to create a SortedDataSet

Parameters:
  • DistributionParameters distParams - see the category XStats.ParamsFromData.
  • Table ↓Table - input data table
  • Function ↓column - input data table read function, e.g. Table.read_Column
  • Array ↓sampleIndexes - optional - an array of indices to the set for sampling. See Xstats.Sampling.sampleIndexes on how to obtain this array. If not specified, uses all data.
Returns: Number ↑rsquarevalue - R square value
↑rsquarevalue = Lib.StatFit.rsquareOnSet ( ↓parameters, ↓sampleSet, ↓sampleIndexes )

R square goodness of fit using a SortedDataSet and a DistributionParameters.

When performing multiple R square tests on the same samples, it is more efficient to create a SortedDataSet

Parameters:
  • DistributionParameters ↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.
  • SortedDataSet ↓sampleSet - see the method XStats.DataAnalysis.genSorted
  • Array ↓sampleIndexes - optional - an array of indices to the set for sampling. See Xstats.Sampling.sampleIndexes on how to obtain this array. If not specified, uses all data.
Returns: Number ↑rsquarevalue - R square value

Category: Statistics

Basic Statistics

↑StatsObj = Lib.Statistics.allStats ( ↓Table, ↓read_Col )

Returns all statistics as an object

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: AllStats ↑StatsObj - object containing all statistics. - see the class Xstats.AllStats
↑StatsObj = Lib.Statistics.allStats_array ( ↓values )

Returns all statistics as an object

Parameters:
  • Array ↓values - - input values
Returns: AllStats ↑StatsObj - object containing all statistics. - see the class Xstats.AllStats
↑correlation = Lib.Statistics.correlation ( ↓Table, ↓read_Col1, ↓read_Col2 )

Returns the correlation coefficient ( covariance(X, Y) / (stdev(X) * stdev(Y))

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col1 - - read function for the first parameter
  • Function ↓read_Col2 - - read function for the second parameter
Returns: Number ↑correlation
↑correlation = Lib.Statistics.correlation_array ( ↓x, ↓y )

Returns the correlation coefficient ( covariance(X, Y) / (stdev(X) * stdev(Y))

Parameters: Returns: Number ↑correlation
↑stats = Lib.Statistics.correlationStats ( ↓Table, ↓read_Col1, ↓read_Col2 )

Returns an object that has a number of correlation stats

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col1 - - read function for the first parameter
  • Function ↓read_Col2 - - read function for the second parameter
Returns: Object ↑stats - - see stats.mean1, stats.mean2, stats.stdev1, stats.stdev2, stats.variance1, stats.variance2, stats.covariance, stats.correlation
↑stats = Lib.Statistics.correlationStats_array ( ↓x, ↓y )

Returns an object that has a number of correlation stats

Parameters:
  • Array ↓x - - first parameter values
  • Array ↓y - - second parameter values
Returns: Object ↑stats - - see stats.mean1, stats.mean2, stats.stdev1, stats.stdev2, stats.variance1, stats.variance2, stats.covariance, stats.correlation
↑covariance = Lib.Statistics.covariance ( ↓Table, ↓read_Col1, ↓read_Col2 )

Returns the covariance

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col1 - - read function for the first parameter
  • Function ↓read_Col2 - - read function for the second parameter
Returns: Number ↑covariance
↑covariance = Lib.Statistics.covariance_array ( ↓x1, ↓x2 )

Returns the covariance

Parameters:
  • Array ↓x1 - - first values
  • Array ↓x2 - - second values
Returns: Number ↑covariance
↑standard_dev = Lib.Statistics.deviation ( ↓Table, ↓read_Col, ↓mean )

Returns the standard deviation of a data set, given the mean

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
  • Function ↓mean - - mean of the data set
Returns: Number ↑standard_dev
↑standard_dev = Lib.Statistics.deviation_array ( ↓Values, ↓mean )

Returns the standard deviation of a data set, given the mean

Parameters:
  • Array ↓Values - - array containing data set
  • Function ↓mean - - mean of the data set
Returns: Number ↑standard_dev
↑Geometricmean = Lib.Statistics.geomean ( ↓Table, ↓read_Col )

Returns the geometric mean of a data set

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: Number ↑Geometricmean
↑Geometricmean = Lib.Statistics.geomean_array ( ↓Values )

Returns the geometric mean of a data set

Parameters:
  • Array ↓Values - - array containing values
Returns: Number ↑Geometricmean
↑ks = Lib.Statistics.ks ( ↓Table, ↓read_y1, ↓read_y2 )

Calculates the Kolmogorov-Smirnov test between two series of the same length and matching indices.

Parameters:
  • Table ↓Table - - input table containing both series
  • Function ↓read_y1 - - Read function for the first series.
  • Function ↓read_y2 - - Read function for the second series.
Returns: Number ↑ks - - maximum difference per Kolmogorov-Smirnov test
↑ks = Lib.Statistics.ks_array ( ↓y1, ↓y2, ↓n )

Calculates the Kolmogorov-Smirnov test between two series of the same length and matching indices.

Parameters:
  • Array ↓y1 - - array containing the first series of values.
  • Array ↓y2 - - array containing the second series of values.
  • Number ↓n - - Number of elements in y values. Note - input set must be non-empty
Returns: Number ↑ks - - maximum difference per Kolmogorov-Smirnov test
↑ks = Lib.Statistics.ksOnSets ( ↓Table1, ↓readX1, ↓readY1, ↓Table2, ↓readX2, ↓readY2 )

Calculates the Kolmogorov-Smirnov test between two sorted-by-x (x,y) sets, which are treated as points for two empirical distribution functions.

Parameters:
  • Table ↓Table1 - - table or adapter containing the first set
  • Function ↓readX1 - - read function for column containing the x values of the first set
  • Function ↓readY1 - - read function for column containing the y values of the first set
  • Table ↓Table2 - - table or adapter containing the second set
  • Function ↓readX2 - - read function for column containing the x values of the second set
  • Function ↓readY2 - - read function for column containing the y values of the second set
Returns: Number ↑ks - - maximum difference per Kolmogorov-Smirnov test
↑ks = Lib.Statistics.ksOnSets_array ( ↓x1, ↓y1, ↓n1, ↓x2, ↓y2, ↓n2 )

Calculates the Kolmogorov-Smirnov test between two sorted-by-x (x,y) sets, which are treated as points for two empirical distribution functions.

Parameters:
  • Array ↓x1 - - array containing the x values for the elements of the first set
  • Array ↓y1 - - array containing the y values for the elements of the first set
  • Number ↓n1 - - Number of elements in first set. Note - input set must be non-empty
  • Array ↓x2 - - array containing the x values for the elements of the second set
  • Array ↓y2 - - array containing the y values for the elements of the second set
  • Number ↓n2 - - Number of elements in second set. Note - input set must be non-empty
Returns: Number ↑ks - - maximum difference per Kolmogorov-Smirnov test
↑kurtosis = Lib.Statistics.kurt ( ↓Table, ↓read_Col )

Returns the kurtosis (fourth standardized moment) of a data set

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: Number ↑kurtosis
↑kurtosis = Lib.Statistics.kurt_array ( ↓values )

Returns the kurtosis (fourth standardized moment) of a data set

Parameters:
  • Array ↓values - - input values
Returns: Number ↑kurtosis
↑maximum = Lib.Statistics.max ( ↓Table, ↓read_Col )

Returns the maximum value of a data set

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: Number ↑maximum
↑mean = Lib.Statistics.mean ( ↓Table, ↓read_Col )

Returns the arithmetic mean of a data set

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: Number ↑mean
↑mean = Lib.Statistics.mean_array ( ↓Values )

Returns the arithmetic mean of a data set

Parameters:
  • Array ↓Values - - array containing values
Returns: Number ↑mean
↑minimum = Lib.Statistics.min ( ↓Table, ↓read_Col )

Returns the minimum value of a data set

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: Number ↑minimum
↑percValue = Lib.Statistics.percentile ( ↓Table, ↓read_Col, ↓p )

Returns the percentile value based on the Linear Interpolation between Closest Rank method. Note - if you are getting multiple percentile values over the same data set, it is much more efficient to use XStats.DataAnalysis.genSorted() instead.

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
  • Number ↓p - - percentile, expressed as a number between 0 and 1.
Returns: Number ↑percValue
↑percValue = Lib.Statistics.percentile_array ( ↓Array, ↓p )

Returns the percentile value based on the Linear Interpolation between Closest Rank method. Note - if you are getting multiple percentile values over the same data set, it is much more efficient to use XStats.DataAnalysis.genSorted_array() instead.

Parameters:
  • Array ↓Array - - input array
  • Number ↓p - - percentile, expressed as a number between 0 and 1.
Returns: Number ↑percValue
↑percValue = Lib.Statistics.percentile_in_ordered ( ↓Table, ↓read_Value, ↓p )

Returns the percentile value from an ALREADY ORDERED dataset (will not interpolate like the other Percentile function).

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Value - - read function for the table value
  • Number ↓p - - percentile, expressed as a number between 0 and 1.
Returns: Number ↑percValue
↑percValue = Lib.Statistics.percentile_in_ordered_array ( ↓Array, ↓p )

Returns the percentile value from an ALREADY ORDERED array (will not interpolate like the other Percentile function).

Parameters:
  • Array ↓Array - - input array
  • Number ↓p - - percentile, expressed as a number between 0 and 1.
Returns: Number ↑percValue
↑rmse = Lib.Statistics.rmse ( ↓Table, ↓read_y1, ↓read_y2 )

Calculates the root-mean-square-error between two series of the same length and matching indices.

Parameters:
  • Table ↓Table - - input table containing both series
  • Function ↓read_y1 - - Read function for the first series.
  • Function ↓read_y2 - - Read function for the second series.
Returns: Number ↑rmse - - root-mean-square-error
↑rmse = Lib.Statistics.rmse_array ( ↓y1, ↓y2, ↓n )

Calculates the root-mean-square-error between two series of the same length and matching indices.

Parameters:
  • Array ↓y1 - - array containing the first series of values.
  • Array ↓y2 - - array containing the second series of values.
  • Number ↓n - - Number of elements in y values. Note - input set must be non-empty
Returns: Number ↑rmse - - root-mean-square-error
↑rsquare = Lib.Statistics.rsquare ( ↓Table, ↓read_y1, ↓read_y2 )

Calculates the r square between two series of the same length and matching indices, assuming the second series is a fitted approximation of the first series.

Parameters:
  • Table ↓Table - - input table containing both series
  • Function ↓read_y1 - - Read function for the first series.
  • Function ↓read_y2 - - Read function for the second series.
Returns: Number ↑rsquare - - r square value
↑rsquare = Lib.Statistics.rsquare_array ( ↓y1, ↓y2, ↓n )

Calculates the r square value between two series of the same length and matching indices, assuming the second series is a fitted approximation of the first series.

Parameters:
  • Array ↓y1 - - array containing the first series of values.
  • Array ↓y2 - - array containing the second series of values.
  • Number ↓n - - Number of elements in y values. Note - input set must be non-empty
Returns: Number ↑rsquare - - r square value
↑sample_standard_dev = Lib.Statistics.sampleStdev ( ↓Table, ↓read_Col )

Returns the sample standard deviation of a data set

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: Number ↑sample_standard_dev
↑sample_variance = Lib.Statistics.sampleVariance ( ↓Table, ↓read_Col )

Returns the sample variance of a data set

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: Number ↑sample_variance
↑skewness = Lib.Statistics.skew ( ↓Table, ↓read_Col )

Returns the moment coefficient of skewness of a data set, defined as a third central moment divided by the stdev cubed

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: Number ↑skewness
↑skewness = Lib.Statistics.skew_array ( ↓values )

Returns the moment coefficient of skewness of a data set, defined as a third central moment divided by the stdev cubed

Parameters:
  • Array ↓values - - input values
Returns: Number ↑skewness
↑standard_dev = Lib.Statistics.stdev ( ↓Table, ↓read_Col )

Returns the standard deviation of a data set

Parameters:
  • Table ↓Table - - input table
  • Function ↓read_Col - - read function for the table value
Returns: Number ↑standard_dev
↑standard_dev = Lib.Statistics.stdev_array ( ↓Values )

Returns the standard deviation of a data set

Parameters:
  • Array ↓Values - - array containing data set
Returns: Number ↑standard_dev

Class: AllStats

This class contains all the basic statistics for a data set

StatusName
Member Number geomean

geometric mean

Member Number kurtosis

Member Number max

Member Number mean

Member Number min

Member Number numSamples

Member Number skew

Member Number stdev


Class: AnovaResult

This class contains the output for an ANOVA analysis

StatusName
Member Number... F_*

F Ratio (Mean Square value for category / Mean Square value for Error), e.g. F_Columns, F_Rows, F_g0..n

Member Number... MS_*

Mean Square value (Sum of squares / degrees of freedom). e.g. MS_Error, MS_Columns, MS_Rows, MS_g0..n

Member Number... SS_*

Sum of squares value, e.g. SS_Total, SS_Error, SS_Columns, SS_Rows, SS_g0..n

Member Number... df_*

Degrees of freedom, e.g. df_Total, df_Error, df_Columns, df_Rows, df_g0..n

Member Number... p_*

The probability derived from the F Distribution based on the F Ratio and the degrees of freedoms from the category and error.

Member Text type

- anova1, anova2 or anovan depending on which function was called.


Class: DistributionParameters

StatusName
Member Text dist

returns the type of distribution, e.g. Xstats.NORMAL, Xstats.BETA

Member Error error

returns the Error if the distribution parameters could not be derived from the data

Member Array params

returns the distribution specific parameters in an array.

Member Boolean success

returns whether distribution parameters were successfully derived from the data


Class: SortedDataSet

This class contains the sample data set that has been sorted.

StatusName
Member Array data

- data sorted in ascending numeric order

Member Number dataSize

- number of samples

Number percentile ( Number p )

Returns the percentile value based on the Linear Interpolation between Closest Rank method.

SortedDataSet.percentile ( p )

Returns the percentile value based on the Linear Interpolation between Closest Rank method.

Parameters:
  • Number p - - percentile, expressed as a number between 0 and 1.
Returns: Number percvalue