require.mx('mxjs/base/xstatistics.js');
This library provides statistical functions.
Status | Name |
---|---|
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
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
Number StatFit.ksOnSet
(
DistributionParameters ↓parameters,
SortedDataSet ↓sampleSet,
Array ↓sampleIndexes
)
Kolmogorov-Smirnov (KS test) using a SortedDataSet and a DistributionParameters.
|
|
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.
|
|
Number StatFit.rmseOnSet
(
DistributionParameters ↓parameters,
SortedDataSet ↓sampleSet,
Array ↓sampleIndexes
)
Calculate root-mean-square-error using a SortedDataSet and a DistributionParameters.
|
|
Number StatFit.rsquare
(
DistributionParameters distParams,
Table ↓Table,
Function ↓column,
Array ↓sampleIndexes
)
R square goodness of fit using a data series and a DistributionParameters.
|
|
Number StatFit.rsquareOnSet
(
DistributionParameters ↓parameters,
SortedDataSet ↓sampleSet,
Array ↓sampleIndexes
)
R square goodness of fit using a SortedDataSet and a DistributionParameters.
|
|
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 |
These functions help compute Analysis Of Variance (ANOVA)
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 reuseTable
↓Table - - input data tableFunction...
↓read_Functions - - read functions for each column of data from the input data tableAnovaResult
↑result - - ANOVA result object containing output stats e.g. "SS_Columns", "df_Columns", etc.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 reuseNumber
↓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 tableFunction...
↓read_Functions - - read functions for each column of data from the input data tableAnovaResult
↑result - - ANOVA result object containing output stats e.g. "SS_Columns", "df_Columns", etc.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 reuseBoolean
↓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 tableFunction
↓read_Data - - read function for data valuesFunction...
↓read_Functions - - read functions for the value for each factor for the data valueAnovaResult
↑result - - ANOVA result object containing output stats e.g. "SS_Columns", "df_Columns", etc.Print to console as a table the results from the ANOVA calculation
Parameters:AnovaResult
↓result - - ANOVA result objectThese functions allow calling the various distribution functions from a DistributionParameters object
Cumulative density function
Parameters:Number
↓x - sample valueDistributionParameters
↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.Number
↑cdfvalue - valueInverse 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.Number
↑parval - parameter value corresponding to the given cumulative probabilityCalculate 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 tableFunction
read_Col - - read function for the table valueDistributionParameters
↑parameters - - see output for paramsFromData for each distribution.Probability density function
Parameters:Number
↓x - sample valueDistributionParameters
↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.Number
↑pdfvalue - valueSampling function
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateDistributionParameters
↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.Array
↑samples - the output array if provided, else a new array is created and returned containing the samples.These functions help compute Benford's Law
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.Number
↑prob - probability as modelled by Benford's Law for the given digit and position.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 tableFunction
↓read_Field - input read functionNumber
↓pos - position to extract digit, starting from 1.Array
↑array - output array. Indices 0 to 9 indicate number of counts of those digits. Index 10 indicate number of zero or invalid inputs.Performs Data Analysis
Creates a SortedDataSet, based on the data set
Parameters: Returns:SortedDataSet
↑SortedSet_Obj - see classCreates a SortedDataSet, from an array of values
Parameters:Array
↓Array - - input arraySortedDataSet
↑SortedSet_Obj - see classProbability distributions
Beta distribution
Cumulative density function of the Beta distribution
Parameters:Number
↓x - Variable valueNumber
↓alpha - parameter for the Beta distributionNumber
↓beta - parameter for the Beta distributionNumber
↓distMin - parameter for the Beta distributionNumber
↓distMax - parameter for the Beta distributionNumber
↑cdfvalue Inverse cumulative density function of the Beta distribution
Parameters:Number
↓p - cdf probability value between 0 and 1.Number
↓alpha - parameter for the Beta distributionNumber
↓beta - parameter for the Beta distributionNumber
↓distMin - parameter for the Beta distributionNumber
↓distMax - parameter for the Beta distributionNumber
↑parvalue - value of stochastic variable at cumulative probability pCreates 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 distributionNumber
↓beta - parameter for the Beta distributionNumber
↓distMin - parameter for the Beta distributionNumber
↓distMax - parameter for the Beta distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.BETA. Parameters: parameters.alpha, parameters.beta, parameters.distMin, parameters.distMax;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 tableFunction
↓read_Col - - read function for the table valueDistributionParameters
↑parameters - - parameters.dist = Xstats.BETA. Parameters: parameters.alpha, parameters.beta, parameters.distMin, parameters.distMax;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 manuallyDistributionParameters
↑parameters - - parameters.dist = Xstats.BETA. Parameters: parameters.alpha, parameters.beta, parameters.distMin, parameters.distMax;Probability density function of the Beta distribution
Parameters:Number
↓x - Variable valueNumber
↓alpha - parameter for the Beta distributionNumber
↓beta - parameter for the Beta distributionNumber
↓distMin - parameter for the Beta distributionNumber
↓distMax - parameter for the Beta distributionNumber
↑pdfvalue Sampling function of the Beta distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓alpha - parameter for the Beta distributionNumber
↓beta - parameter for the Beta distributionNumber
↓distMin - parameter for the Beta distributionNumber
↓distMax - parameter for the Beta distributionArray
↑samples - the output array if provided, else a new array is created and returned containing the samples.Binomial distribution
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 distributionNumber
↓q_prob - q is the probability of success per trial for binomial distributionNumber
↑cdfvalue 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 distributionNumber
↓q_prob - q is the probability of success per trial for binomial distributionNumber
↑parvalue - value of stochastic variable at cumulative probability pCreates 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 distributionNumber
↓q_prob - q is the probability of success per trial for binomial distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.BINOMIAL. Parameters: parameters.n_trials, parameters.q_prob;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 tableFunction
↓read_Col - - read function for the table valueDistributionParameters
↑parameters - - parameters.dist = Xstats.BINOMIAL. Parameters: parameters.n_trials, parameters.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 distributionNumber
↓q_prob - q is the probability of success per trial for binomial distributionNumber
↑pdfvalue Sampling function of the Binomial distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓n_trials - n is the number of trials for binomial distributionNumber
↓q_prob - q is the probability of success per trial for binomial distributionArray
↑samples - the output array if provided, else a new array is created and returned containing the samples.Exp distribution
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 distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.EXPONENTIAL. Parameters: parameters.rate;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 tableFunction
↓read_Col - - read function for the table valueDistributionParameters
↑parameters - - parameters.dist = Xstats.EXPONENTIAL. Parameters: parameters.rate;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 manuallyDistributionParameters
↑parameters - - parameters.dist = Xstats.EXPONENTIAL. Parameters: parameters.rate;Sampling function of the Exponential distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generatenumber
↓rate - the rate for the exponential probability distribution.Array
↑samples - the output array if provided, else a new array is created and returned containing the samples.Extreme Value distribution
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 DistributionNumber
↓scale - scale parameter for the Extreme Value DistributionNumber
↑parvalue - value of stochastic variable at cumulative probability pCreates 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 DistributionNumber
↓scale - scale parameter for the Extreme Value DistributionDistributionParameters
↑parameters - - parameters.dist = Xstats.EXTREME_VALUE. Parameters: parameters.location, parameters.scale;Sampling function of the Extreme Value distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓location - location parameter for the Extreme Value DistributionNumber
↓scale - scale parameter for the Extreme Value DistributionArray
↑samples - the output array if provided, else a new array is created and returned containing the samples.Gamma distribution
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 distributionNumber
↓scale - scale parameter for the Gamma distributionNumber
↑parvalue - value of stochastic variable at cumulative probability pCreates 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 distributionNumber
↓scale - scale parameter for the Gamma distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.GAMMA. Parameters: parameters.shape, parameters.scale;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 tableFunction
↓read_Col - - read function for the table valueDistributionParameters
↑parameters - - parameters.dist = Xstats.GAMMA. Parameters: parameters.shape, parameters.scale;Sampling function of the Gamma distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓shape - shape parameter for the Gamma distributionNumber
↓scale - scale parameter for the Gamma distributionArray
↑samples - the output array if provided, else a new array is created and returned containing the samples.Generalized Extreme Value distribution
Cumulative density function of the Generalized Extreme Value distribution
Parameters:Number
↓x - Variable valueNumber
↓location - location parameter of the Generalized Extreme Value distributionNumber
↓scale - scale parameter of the Generalized Extreme Value distributionNumber
↓shape - shape parameter of the Generalized Extreme Value distributionNumber
↑cdfvalue 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 distributionNumber
↓scale - scale parameter of the Generalized Extreme Value distributionNumber
↓shape - shape parameter of the Generalized Extreme Value distributionNumber
↑parvalue - value of stochastic variable at cumulative probability pCreates 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 distributionNumber
↓scale - scale parameter of the Generalized Extreme Value distributionNumber
↓shape - shape parameter of the Generalized Extreme Value distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.GENERALIZED_EXTREME_VALUE Parameters: location, scale, shapeProbability density function of the Generalized Extreme Value distribution
Parameters:Number
↓x - Variable valueNumber
↓location - location parameter of the Generalized Extreme Value distributionNumber
↓scale - scale parameter of the Generalized Extreme Value distributionNumber
↓shape - shape parameter of the Generalized Extreme Value distributionNumber
↑pdfvalue Sampling function of the Generalized Extreme Value distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓location - location parameter of the Generalized Extreme Value distributionNumber
↓scale - scale parameter of the Generalized Extreme Value distributionNumber
↓shape - shape parameter of the Generalized Extreme Value distributionArray
↑samples - the output array if provided, else a new array is created and returned containing the samples.Gumbel distribution
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 distributionNumber
↓scale - scale parameter of the Gumbel distributionNumber
↑parvalue - value of stochastic variable at cumulative probability pCreates 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 distributionNumber
↓scale - scale parameter of the Gumbel distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.GUMBEL. Parameters: location, scaleCalculate 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 tableFunction
↓read_Col - - read function for the table valueDistributionParameters
↑parameters - - parameters.dist = Xstats.GUMBEL. Parameters: scale, locationCalculate 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 statsDistributionParameters
↑parameters - - parameters.dist = Xstats.GUMBEL. parameters: location, scaleSampling function of the Gumbel distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓location - location parameter of the Gumbel distributionNumber
↓scale - scale parameter of the Gumbel distributionArray
↑samples - the output array if provided, else a new array is created and returned containing the samples.Hypergeometric distribution
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.Number
↑cdfvalue 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.Number
↑parvalue - value of stochastic variable at cumulative probability pCreates 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.DistributionParameters
↑parameters - - parameters.dist = Xstats.HYPERGEOMETRIC. Parameters: parameters.a, parameters.b, parameters.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.Number
↑pdfvalue InverseGamma distribution
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 distributionNumber
↓scale - scale parameter of the InverseGamma distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.INVERSE_GAMMA. Parameters: shape, scaleLog Normal distribution
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 variableNumber
↓stdev - The standard deviation of a stochastic variableNumber
the - "location" or "logmean" parameterCreates 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 distributionNumber
↓scale - the scale or log standard deviation for the log normal distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.LOG_NORMAL. Parameters: parameters.location, parameters.scale;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 tableFunction
↓read_Col - - read function for the table valueDistributionParameters
↑parameters - - parameters.dist = Xstats.LOG_NORMAL. Parameters: parameters.location, parameters.scale;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.allStatsDistributionParameters
↑parameters - - parameters.dist = Xstats.LOG_NORMAL. Parameters: parameters.location, parameters.scale;Sampling function of the Log Normal distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓mu - the log mean for the log normal distributionNumber
↓sigma - the log standard deviation for the log normal distributionArray
↑samples - the output array if provided, else a new array is created and returned containing the samples.Normal distribution
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 distributionNumber
↓sigma - the standard deviation for the normal distributionNumber
↑parvalue - value of stochastic variable at cumulative probability pCreates 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 distributionNumber
↓sigma - the standard deviation for the normal distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.NORMAL. Parameters: parameters.mu, parameters.sigma;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 tableFunction
read_Col - - read function for the table valueDistributionParameters
↑parameters - - parameters.dist = Xstats.NORMAL. Parameters: parameters.mu, parameters.sigma;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 manuallyDistributionParameters
↑parameters - - parameters.dist = Xstats.NORMAL. Parameters: parameters.mu, parameters.sigma;Sampling function of the Normal distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓mu - the mean for the normal distributionNumber
↓sigma - the standard deviation for the normal distributionArray
↑samples - the output array if provided, else a new array is created and returned containing the samples.PearsonTypeV distribution
Cumulative density function of the PearsonTypeV distribution
Parameters:Number
↓x - Variable valueNumber
↓a - a parameter of the PearsonTypeV distributionNumber
↓b0 - b0 parameter of the PearsonTypeV distributionNumber
↓b1 - b1 parameter of the PearsonTypeV distributionNumber
↓b2 - b2 parameter of the PearsonTypeV distributionNumber
↓mu - mu parameter of the PearsonTypeV distributionNumber
↑cdfvalue 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 distributionNumber
↓b0 - b0 parameter of the PearsonTypeV distributionNumber
↓b1 - b1 parameter of the PearsonTypeV distributionNumber
↓b2 - b2 parameter of the PearsonTypeV distributionNumber
↓mu - mu parameter of the PearsonTypeV distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.PEARSON_TYPE_V. Parameters: shape, scaleProbability density function of the PearsonTypeV distribution
Parameters:Number
↓x - Variable valueNumber
↓a - a parameter of the PearsonTypeV distributionNumber
↓b0 - b0 parameter of the PearsonTypeV distributionNumber
↓b1 - b1 parameter of the PearsonTypeV distributionNumber
↓b2 - b2 parameter of the PearsonTypeV distributionNumber
↓mu - mu parameter of the PearsonTypeV distributionNumber
↑pdfvalue Poisson distribution
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.Number
↑parvalue - value of stochastic variable at cumulative probability pCreates 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 distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.POISSON. Parameters: parameters.lambda;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 tableFunction
↓read_Col - - read function for the table valueDistributionParameters
↑parameters - - parameters.dist = Xstats.POISSON. Parameters: parameters.lambda;Sampling function of the Poisson distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateArray
↓parameters - either a number l or an array [l]. l is the mean for the poisson probability distribution.Array
↑samples - the output array if provided, else a new array is created and returned containing the samples.Student T distribution
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.Number
↑parvalue - value of stochastic variable at cumulative probability pCreates 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.DistributionParameters
↑parameters - - parameters.dist = Xstats.T. Parameters: parameters.v;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 tableFunction
↓read_Col - - read function for the table valueDistributionParameters
↑parameters - - parameters.dist = Xstats.T. Parameters: parameters.v;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 statsDistributionParameters
↑parameters - - parameters.dist = Xstats.T. parameters.params = [v];Sampling function of the Student T distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateArray
↓parameters - an array containing [v] or the number v (degrees of freedom) - parameter for the T distribution.Array
↑samples - the output array if provided, else a new array is created and returned containing the samples.Triangular distribution
Cumulative density function of the Triangular distribution
Parameters:Number
↓x - Variable valueNumber
↓a - a - parameter for triangular distribution (minimum)Number
↓b - b - parameter for triangular distribution (mode)Number
↓c - c - parameter for triangular distribution (maximum)Number
↑cdfvalue Inverse cumulative density function of the Triangular distribution
Parameters:Number
↓p - cdf probability value between 0 and 1Number
↓a - a - parameter for triangular distribution (minimum)Number
↓b - b - parameter for triangular distribution (mode)Number
↓c - c - parameter for triangular distribution (maximum)Number
↑parvalue - value of stochastic variable at cumulative probability pCreates 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)DistributionParameters
↑parameters - - parameters.dist = Xstats.TRIANGULAR. Parameters: parameters.a, parameters.b, parameters.c;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 manuallyDistributionParameters
↑parameters - - parameters.dist = Xstats.TRIANGULAR. Parameters: parameters.a, parameters.b, parameters.c;Probability density function of the Triangular distribution
Parameters:Number
↓x - Variable valueNumber
↓a - a - parameter for triangular distribution (minimum)Number
↓b - b - parameter for triangular distribution (mode)Number
↓c - c - parameter for triangular distribution (maximum)Number
↑pdfvalue Sampling function of the Triangular distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓a - a - parameter for triangular distribution (minimum)Number
↓b - b - parameter for triangular distribution (mode)Number
↓c - c - parameter for triangular distribution (maximum)Array
↑samples - the output array if provided, else a new array is created and returned containing the samples.Truncated Exp distribution
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 distributionNumber
↓xmax - the upper level at which the distribution trunatesNumber
↑parvalue - value of stochastic variable at cumulative probability pCreates 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 distributionNumber
↓xmax - the maximum x bound for the truncated exponential distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.TRUNCATED_EXP. Parameters: parameters.rate, parameters.xmaxCreates 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.
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 manuallyDistributionParameters
↑parameters - - parameters.dist = Xstats.TRUNCATED_EXP. Parameters: parameters.rate, parameters.xmax;Sampling function of the Truncated Exponential distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓rate - rate of exponential probability distributionNumber
↓xmax - the upper level at which the distribution trunatesArray
↑samples - the output array if provided, else a new array is created and returned containing the samples.Truncated Log Normal distribution
Cumulative density function of the Truncated Log Normal distribution
Parameters:Number
↓x - Variable valueNumber
↓mu - log mean for the log normal distributionNumber
↓sigma - log standard deviation for the log normal distributionNumber
↓lower - lower bound for the truncated log normal distributionNumber
↓upper - upper bound for the truncated log normal distributionNumber
↑cdfvalue 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 distributionNumber
↓sigma - log standard deviation for the log normal distributionNumber
↑parvalue - value of stochastic variable at cumulative probability pCreates 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 distributionNumber
↓sigma - log standard deviation for the log normal distributionNumber
↓lower - lower bound for the truncated log normal distributionNumber
↓upper - upper bound for the truncated log normal distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.TRUNCATED_LOG_NORMAL. Parameters: parameters.mu, parameters.sigma, parameters.lower, parameters.upper;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.
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 manuallyDistributionParameters
↑parameters - - parameters.dist = Xstats.TRUNCATED_LOG_NORMAL. Parameters: parameters.mu, parameters.sigma;Probability density function of the Truncated Log Normal distribution
Parameters:Number
↓x - Variable valueNumber
↓mu - log mean for the log normal distributionNumber
↓sigma - log standard deviation for the log normal distributionNumber
↓lower - lower bound for the truncated log normal distributionNumber
↓upper - upper bound for the truncated log normal distributionNumber
↑pdfvalue Sampling function of the Truncated Log Normal distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓mu - log mean for the log normal distributionNumber
↓sigma - log standard deviation for the log normal distributionNumber
↓lower - lower bound for the truncated log normal distributionNumber
↓upper - upper bound for the truncated log normal distributionArray
↑samples - the output array if provided, else a new array is created and returned containing the samples.Truncated Normal distribution
Cumulative density function of the Truncated Normal distribution
Parameters:Number
↓x - Variable valueNumber
↓mu - mean for the truncated normal distributionNumber
↓sigma - standard deviation for the truncated normal distributionNumber
↓lower - lower bound for the truncated normal distributionNumber
↓upper - upper bound for the truncated normal distributionNumber
↑cdfvalue 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 distributionNumber
↓sigma - the standard deviation for the normal distributionNumber
↑parvalue - value of stochastic variable at cumulative probability pCreates 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 distributionNumber
↓sigma - standard deviation for the truncated normal distributionNumber
↓lower - lower bound for the truncated normal distributionNumber
↓upper - upper bound for the truncated normal distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.TRUNCATED_NORMAL. Parameters: parameters.mu, parameters.sigma, parameters.lower, parameters.upper;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.
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 manuallyDistributionParameters
↑parameters - - parameters.dist = Xstats.TRUNCATEDNORMAL. Parameters: parameters.mu, parameters.sigma;Probability density function of the Truncated Normal distribution
Parameters:Number
↓x - Variable valueNumber
↓mu - mean for the truncated normal distributionNumber
↓sigma - standard deviation for the truncated normal distributionNumber
↓lower - lower bound for the truncated normal distributionNumber
↓upper - upper bound for the truncated normal distributionNumber
↑pdfvalue Sampling function of the Truncated Normal distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓mu - mean for the truncated normal distributionNumber
↓sigma - standard deviation for the truncated normal distributionNumber
↓lower - lower bound for the truncated normal distributionNumber
↓upper - upper bound for the truncated normal distributionArray
↑samples - the output array if provided, else a new array is created and returned containing the samples.Uniform distribution
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 distributionNumber
↓max - the maximum for the uniform distributionDistributionParameters
↑parameters - - parameters.dist = Xstats.UNIFORM. Parameters: parameters.min, parameters.max;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 tableFunction
↓read_Col - - read function for the table valueDistributionParameters
↑parameters - - parameters.dist = Xstats.UNIFORM. Parameters: parameters.min, parameters.max;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 manuallyDistributionParameters
↑parameters - - parameters.dist = Xstats.UNIFORM. Parameters: parameters.min, parameters.max;Sampling function of the Uniform distribution
Parameters:Array
↑samples - output array to contain the number of generated samplesNumber
↓n - number of samples to generateNumber
↓min - minimum for uniform distributionNumber
↓max - maximum for uniform distributionArray
↑samples - the output array if provided, otherwise a new array is created for the samplesUtilities for DistributionParameters
This function allows a DistributionParameters object to be read from text.
Parameters:Text
↓text - text containing the distribution parameters.DistributionParameters
↑distParams - the DistributionParameters objectThis function allows a DistributionParameters object to be saved as text.
Parameters:DistributionParameters
↓distParams - the DistributionParameters object to save as textText
↑text - text containing the distribution parameters.These functions help construct a QQ Plot
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);
Utility methods around sampling
This method returns uniform sampled data
Parameters:Array
↑array - - output array to reuseNumber
↓sample_size - - the number of samples to generateTable
↓Table - input data tableFunction
↓column - input data table read function, e.g. Table.read_ColumnArray
↑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).This method returns uniform sampled data
Parameters:Array
↑array - - output array to reuseNumber
↓sample_size - - the number of samples to generateSortedDataSet
↓sortedDataSet - see the method XStats.DataAnalysis.genSortedArray
↑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).This method returns an array of indices to a data set/array for an uniform sampling
Parameters:Array
↑array - - output array to reuseNumber
↓sample_size - - the number of samples to generateNumber
↓set_size - - the number of data points in your series to sample.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).Calculate the goodness of fit of statistical distributions
Performs the statistical bestfit as described by rankFits, and returns the closest fit.
Parameters:Table
↓Table - input data tableFunction
↓column - input data table read function, e.g. Table.read_ColumnArray
↓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.DistributionParameters
↑distParameters - Distribution parameters corresponding to closest fitPerforms 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 tableFunction
↓column - input data table read function, e.g. Table.read_ColumnNumber
↓sampleCount - Number of samples to use for computing KS TestDistributionParameters
↑distParameters - Distribution parameters corresponding to closest fitKolmogorov-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
DistributionParameters
distParams - see the category XStats.ParamsFromData.Table
↓Table - input data tableFunction
↓column - input data table read function, e.g. Table.read_ColumnArray
↓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.Number
↑ksvalue - KS Test result in terms of maximum error in percentile valuesKolmogorov-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
DistributionParameters
↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.SortedDataSet
↓sampleSet - see the method XStats.DataAnalysis.genSortedArray
↓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.Number
↑ksvalue - KS Test result in terms of maximum error in percentile valuesDerives 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 objectsArray
↑MeasureArray - output array of Numbers - which is the numerical result for the measure used for sorting. Default is KS.Table
↓Table - input data tableFunction
↓column - input data table read function, e.g. Table.read_ColumnArray
↓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.Number
the - number of distribution fits returned.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 objectsArray
↑KSErrorArray - output array of Numbers - which are the KS errors for each output distributionTable
↓Table - input data tableFunction
↓column - input data table read function, e.g. Table.read_ColumnNumber
↓sampleCount - Number of samples to use for computing KS TestNumber
the - number of distribution fits returned.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
DistributionParameters
distParams - see the category XStats.ParamsFromData.Table
↓Table - input data tableFunction
↓column - input data table read function, e.g. Table.read_ColumnArray
↓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.Number
↑rmsevalue - root-mean-square-error resultCalculate 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
DistributionParameters
↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.SortedDataSet
↓sampleSet - see the method XStats.DataAnalysis.genSortedArray
↓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.Number
↑rmsevalue - root-mean-square-error resultR 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
DistributionParameters
distParams - see the category XStats.ParamsFromData.Table
↓Table - input data tableFunction
↓column - input data table read function, e.g. Table.read_ColumnArray
↓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.Number
↑rsquarevalue - R square valueR 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
DistributionParameters
↓parameters - - distribution parameters that can be obtained via paramsFromData() or paramsFromStats() for a distribution.SortedDataSet
↓sampleSet - see the method XStats.DataAnalysis.genSortedArray
↓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.Number
↑rsquarevalue - R square valueBasic Statistics
Returns an object that has a number of correlation stats
Parameters:Table
↓Table - - input tableFunction
↓read_Col1 - - read function for the first parameterFunction
↓read_Col2 - - read function for the second parameterObject
↑stats - - see stats.mean1, stats.mean2, stats.stdev1, stats.stdev2, stats.variance1, stats.variance2, stats.covariance, stats.correlationCalculates the Kolmogorov-Smirnov test between two series of the same length and matching indices.
Parameters:Table
↓Table - - input table containing both seriesFunction
↓read_y1 - - Read function for the first series.Function
↓read_y2 - - Read function for the second series.Number
↑ks - - maximum difference per Kolmogorov-Smirnov testCalculates 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-emptyNumber
↑ks - - maximum difference per Kolmogorov-Smirnov testCalculates 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 setFunction
↓readX1 - - read function for column containing the x values of the first setFunction
↓readY1 - - read function for column containing the y values of the first setTable
↓Table2 - - table or adapter containing the second setFunction
↓readX2 - - read function for column containing the x values of the second setFunction
↓readY2 - - read function for column containing the y values of the second setNumber
↑ks - - maximum difference per Kolmogorov-Smirnov testCalculates 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 setArray
↓y1 - - array containing the y values for the elements of the first setNumber
↓n1 - - Number of elements in first set. Note - input set must be non-emptyArray
↓x2 - - array containing the x values for the elements of the second setArray
↓y2 - - array containing the y values for the elements of the second setNumber
↓n2 - - Number of elements in second set. Note - input set must be non-emptyNumber
↑ks - - maximum difference per Kolmogorov-Smirnov testReturns 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 tableFunction
↓read_Col - - read function for the table valueNumber
↓p - - percentile, expressed as a number between 0 and 1.Number
↑percValue 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: Returns:Number
↑percValue Returns the percentile value from an ALREADY ORDERED dataset (will not interpolate like the other Percentile function).
Parameters:Table
↓Table - - input tableFunction
↓read_Value - - read function for the table valueNumber
↓p - - percentile, expressed as a number between 0 and 1.Number
↑percValue Calculates the root-mean-square-error between two series of the same length and matching indices.
Parameters:Table
↓Table - - input table containing both seriesFunction
↓read_y1 - - Read function for the first series.Function
↓read_y2 - - Read function for the second series.Number
↑rmse - - root-mean-square-errorCalculates 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-emptyNumber
↑rmse - - root-mean-square-errorCalculates 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 seriesFunction
↓read_y1 - - Read function for the first series.Function
↓read_y2 - - Read function for the second series.Number
↑rsquare - - r square valueCalculates 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-emptyNumber
↑rsquare - - r square valueThis class contains all the basic statistics for a data set
Status | Name |
---|---|
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
|
This class contains the output for an ANOVA analysis
Status | Name |
---|---|
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. |
Status | Name |
---|---|
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 |
This class contains the sample data set that has been sorted.
Status | Name |
---|---|
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. |