Statistical
Classes
- beta
 - binom
 - chiSq
 - confidence
 - coVariance
 - expon
 - f
 - logNorm
 - mode
 - norm
 - percentile
 - percentRank
 - poisson
 - quartile
 - rank
 - stDev
 - t
 - Var
 - weiBull
 - z
 - gamma
 - gammaLn
 
Members
(static) binomDistRange
- See
 - binom.dist.range
 
(static) binomInv
- See
 - binom.inv
 
(static) chiSqDist
- See
 - chiSq.dist
 
(static) chiSqDistRt
- See
 - chiSq.dist.rt
 
(static) chiSqInv
- See
 - chiSq.inv
 
(static) chiSqInvRt
- See
 - chiSq.inv.rt
 
(static) chiSqTest
- See
 - chiSq.test
 
(static) confidenceNorm
- See
 - confidence.norm
 
(static) confidenceT
- See
 - confidence.t
 
(static) exponDist
- See
 - expon.dist
 
(static) hypGeom
Returns the hypergeometric distribution.
(static) negBinom
Returns the negative binomial distribution.
(static) tDist2T
- See
 - t.dist
 
(static) tInv2T
- See
 - t.inv
 
Methods
(inner) aveDev(args) → {number}
Returns the average of the absolute deviations of data points from their mean.
| Name | Type | Description | 
|---|---|---|
args | number | number1, number2, ... Number1 is required, subsequent numbers are optional. 1 to 255 arguments for which you want the average of the absolute deviations. You can also use a single array or a reference to an array instead of arguments separated by commas.  | 
- See
 - For further information, see docs.oasis-open.org
 
the average of the absolute deviations of data points from their mean or an error.
- Type:
 - number
 
(inner) average(args) → {number}
Returns the average of its arguments.
| Name | Type | Description | 
|---|---|---|
args | number | number1, number2, ...Numbers, value references or ranges for which you want the average.  | 
- See
 - For further information, see docs.oasis-open.org
 
the average of the arguments
- Type:
 - number
 
(inner) averageA(args) → {number}
Returns the average of its arguments, including numbers, text, and logical values.
| Name | Type | Description | 
|---|---|---|
args | * | value1, value2, ... Value1 is required, subsequent values are optional. 1 to 255 values, ranges of values, or values for which you want the average.  | 
- See
 - For further information, see docs.oasis-open.org
 
the average of its arguments, including numbers, text, and logical values.
- Type:
 - number
 
(inner) averageIf(range, criteria, average_range) → {number}
Returns the average (arithmetic mean) of all the values in a range that meet a given criteria.
| Name | Type | Description | 
|---|---|---|
range | * | One or more values to average, including numbers or names, arrays, or references that contain numbers.  | 
criteria | string | The criteria in the form of a number, expression, value reference, or text that defines which values are averaged.  | 
average_range | * | Optional. The actual set of values to average. If omitted, range is used.  | 
- See
 - For further information, see docs.oasis-open.org
 
the average (arithmetic mean) of all the values in a range that meet a given criteria.
- Type:
 - number
 
(inner) averageIfs(args) → {number}
Returns the average (arithmetic mean) of all values that meet multiple criteria.
| Name | Type | Description | 
|---|---|---|
args | * | One or more values to average, including numbers or names, arrays, or references that contain numbers.  | 
- See
 - For further information, see docs.oasis-open.org
 
the average (arithmetic mean) of all values that meet multiple criteria.
- Type:
 - number
 
(inner) correl(array1, array2) → {number|Error}
Returns the correlation coefficient between two data sets.
| Name | Type | Description | 
|---|---|---|
array1 | Array.<number> | A range of value values.  | 
array2 | Array.<number> | A second range of value values.  | 
- See
 - For further information, see docs.oasis-open.org
 
Returns the population correlation coefficient of the array1 and array2 vectors (Pearson's Rho).
- Type:
 - number |
Error  
(inner) count(…values) → {number}
When using the Open Formula implementation, counts how many numbers are in the list of arguments. When using the Notes Formula implementation, calculates the number of text, number, or time-date values in a list.
| Name | Type | Attributes | Description | 
|---|---|---|---|
values | * | <repeatable> | Cell reference, or range within which you want to count numbers.  | 
- See
 - For further information, see www.hcltechsw.com and docs.oasis-open.org
 
how many numbers are in the list of arguments.
- Type:
 - number
 
rosettajs.Statistical.count(1,2,3); // Returns 3rosettajs.Statistical.count(["Jones", "Portsmore"]); // Returns 2(inner) countA(args) → {number}
Counts how many values are in the list of arguments.
| Name | Type | Description | 
|---|---|---|
args | * | Arguments representing the values that you want to count.  | 
- See
 - For further information, see docs.oasis-open.org
 
how many values are in the list of arguments
- Type:
 - number
 
(inner) countBlank(…values) → {number}
Counts the number of blank values within a range.
| Name | Type | Attributes | Description | 
|---|---|---|---|
values | number | <repeatable> | The range from which you want to count the blank values.  | 
- See
 - For further information, see docs.oasis-open.org
 
the number of blank values within a range.
- Type:
 - number
 
(inner) countIf(range, criteria) → {number}
Counts the number of values within a range that meet the given criteria.
| Name | Type | Description | 
|---|---|---|
range | * | The values to check  | 
criteria | string | The criteria to apply to each value in range  | 
- See
 - For further information, see docs.oasis-open.org
 
The number of values in range that meet criteria
- Type:
 - number
 
(inner) countIfs(…valuesAndCriteria) → {number}
Counts the number of values within a range that meet multiple criteria.
| Name | Type | Attributes | Description | 
|---|---|---|---|
valuesAndCriteria | * | <repeatable> | Range in which to evaluate the associated criteria.  | 
- See
 - For further information, see docs.oasis-open.org
 
the number of values within a range that meet multiple criteria
- Type:
 - number
 
(inner) countIn(range, value) → {number}
Counts the number of occurrences of a value in a given range.
Category: Statistical
| Name | Type | Description | 
|---|---|---|
range | * | |
value | * | 
the number of occurrences of a value in a given range.
- Type:
 - number
 
(inner) countUnique(…values) → {number}
Returns the number of unique items in a flattened array Formula.js only
| Name | Type | Attributes | Description | 
|---|---|---|---|
values | * | <repeatable> | The array or multiple arrays to be examined.  | 
the number of unique items in a flattened array
- Type:
 - number
 
(inner) devSq(args) → {number}
Returns the sum of squares of deviations.
| Name | Type | Description | 
|---|---|---|
args | * | number1, number2, ... Number1 is required, subsequent numbers are optional. 1 to 255 arguments for which you want to calculate the sum of squared deviations. You can also use a single array or a reference to an array instead of arguments separated by commas.  | 
- See
 - For further information, see docs.oasis-open.org
 
the sum of squares of deviations or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) fisher(x) → {number}
Returns the Fisher transformation.
| Name | Type | Description | 
|---|---|---|
x | number | A numeric value for which you want the transformation.  | 
- See
 - For further information, see docs.oasis-open.org
 
the Fisher transformation for a given number, or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) fisherInv(y) → {number|Error}
Returns the inverse of the Fisher transformation.
| Name | Type | Description | 
|---|---|---|
y | number | The value for which you want to perform the inverse of the transformation.  | 
- See
 - For further information, see docs.oasis-open.org
 
the inverse of the Fisher transformation.
- Type:
 - number |
Error  
(inner) forecast(x, known_ys, known_xs) → {number}
Returns a value along a linear trend.
| Name | Type | Description | 
|---|---|---|
x | number | The data point for which you want to predict a value.  | 
known_ys | number | The dependent array or range of data.  | 
known_xs | number | The independent array or range of data.  | 
- See
 - For further information, see docs.oasis-open.org
 
a value along a linear trend or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) frequency(data_array, bins_array) → {number}
Returns a frequency distribution as a vertical array.
| Name | Type | Description | 
|---|---|---|
data_array | number | An array of or reference to a set of values for which you want to count frequencies. If data_array contains no values, FREQUENCY returns an array of zeros.  | 
bins_array | number | An array of or reference to intervals into which you want to group the values in data_array. If bins_array contains no values, FREQUENCY returns the number of elements in data_array.  | 
- See
 - For further information, see docs.oasis-open.org
 
a frequency distribution as a vertical array or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) gauss(z) → {number}
Returns 0.5 less than the standard normal cumulative distribution.
| Name | Type | Description | 
|---|---|---|
z | number | Returns a number.  | 
- See
 - For further information, see docs.oasis-open.org
 
0.5 less than the standard normal cumulative districubtion or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) geoMean(args) → {number}
Returns the geometric mean.
| Name | Type | Description | 
|---|---|---|
args | number | number1, number2, ... Number1 is required, subsequent numbers are optional. 1 to 255 arguments for which you want to calculate the mean. You can also use a single array or a reference to an array instead of arguments separated by commas.  | 
- See
 - For further information, see docs.oasis-open.org
 
the geometric mean or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) growth(known_y, known_x, new_x, use_const) → {number}
Returns values along an exponential trend.
| Name | Type | Description | 
|---|---|---|
known_y | number | The set of y-values you already know in the relationship y = b*m^x. 
  | 
known_x | number | Optional. An optional set of x-values that you may already know in the relationship y = b*m^x. 
  | 
new_x | number | Optional. Are new x-values for which you want GROWTH to return corresponding y-values. 
  | 
use_const | boolean | Optional. A logical value specifying whether to force the constant b to equal 1. If const is TRUE or omitted, b is calculated normally. If const is FALSE, b is set equal to 1 and the m-values are adjusted so that y = m^x. 
  | 
- See
 - For further information, see docs.oasis-open.org
 
values along an exponential trend or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) harMean(args) → {number}
Returns the harmonic mean.
| Name | Type | Description | 
|---|---|---|
args | number | number1, number2, ... Number1 is required, subsequent numbers are optional. 1 to 255 arguments for which you want to calculate the mean. You can also use a single array or a reference to an array instead of arguments separated by commas.  | 
- See
 - For further information, see docs.oasis-open.org
 
the harmonic mean or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) intercept(known_y, known_x)
Returns the intercept of the linear regression line.
| Name | Type | Description | 
|---|---|---|
known_y | number | The dependent set of observations or data.  | 
known_x | number | The independent set of observations or data.  | 
- See
 - For further information, see docs.oasis-open.org
 
the intercept of the linear regression line.
(inner) kurt(args) → {number}
Returns the kurtosis of a data set.
| Name | Type | Description | 
|---|---|---|
args | number | number1, number2, ... Number1 is required, subsequent numbers are optional. 1 to 255 arguments for which you want to calculate kurtosis. You can also use a single array or a reference to an array instead of arguments separated by commas.  | 
- See
 - For further information, see docs.oasis-open.org
 
the kurtosis of a data set or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) large(array, k)
Returns the k-th largest value in a data set.
| Name | Type | Description | 
|---|---|---|
array | number | The array or range of data for which you want to determine the k-th largest value.  | 
k | number | The position (from the largest) in the array or value range of data to return.  | 
- See
 - For further information, see docs.oasis-open.org
 
the k-th largest value in a data set or an error if the arguments are incorrect.
(inner) linest(known_y, known_x) → {number}
Returns the parameters of a linear trend.
| Name | Type | Description | 
|---|---|---|
known_y | number | The set of y-values that you already know in the relationship y = mx + b. 
  | 
known_x | number | Optional. A set of x-values that you may already know in the relationship y = mx + b. 
  | 
- See
 - For further information, see docs.oasis-open.org
 
the parameters of a linear trend or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) logest(known_y, known_x)
Returns the parameters of an exponential trend.
| Name | Type | Description | 
|---|---|---|
known_y | number | The set of y-values you already know in the relationship y = b*m^x. 
  | 
known_x | number | Optional. An optional set of x-values that you may already know in the relationship y = b*m^x. 
  | 
- See
 - For further information, see docs.oasis-open.org
 
the parameters of an exponential trend or an error if the arguments are incorrect.
(inner) maxA(args) → {number}
Returns the maximum value in a list of arguments, including numbers, text, and logical values.
| Name | Type | Description | 
|---|---|---|
args | number | value1, value2,... Number arguments 2 to 255 for which you want to find the largest value.  | 
- See
 - For further information, see docs.oasis-open.org
 
the maximum value in a list of arguments, including numbers, text, and logical values.
- Type:
 - number
 
(inner) median(args) → {number}
Returns the median of the given numbers.
| Name | Type | Description | 
|---|---|---|
args | number | number1, number2, ... Number1 is required, subsequent numbers are optional. 1 to 255 numbers for which you want the median.  | 
- See
 - For further information, see docs.oasis-open.org
 
the median of the given numbers or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) minA(args) → {number}
Returns the smallest value in a list of arguments, including numbers, text, and logical values.
| Name | Type | Description | 
|---|---|---|
args | number | value1, value2, ... Value1 is required, subsequent values are optional. 1 to 255 values for which you want to find the smallest value.  | 
- See
 - For further information, see docs.oasis-open.org
 
the smallest value in a list of arguments, including numbers, text, and logical values.
- Type:
 - number
 
(inner) pearson(array1, array2) → {number}
Returns the Pearson product moment correlation coefficient.
| Name | Type | Description | 
|---|---|---|
array1 | Array.<number> | A set of independent values.  | 
array2 | Array.<number> | A set of dependent values.  | 
- See
 - For further information, see docs.oasis-open.org
 
the Pearson product moment correlation coefficient or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) permut(number, number_chosen) → {number}
Returns the number of permutations for a given number of objects.
| Name | Type | Description | 
|---|---|---|
number | number | An integer that describes the number of objects.  | 
number_chosen | number | An integer that describes the number of objects in each permutation.  | 
- See
 - For further information, see docs.oasis-open.org
 
the number of permutations for a given number of objects or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) permutationA(number, number_chosen) → {number}
Returns the number of permutations for a given number of objects (with repetitions) that can be selected from the total objects.
| Name | Type | Description | 
|---|---|---|
number | number | An integer that describes the total number of objects.  | 
number_chosen | number | An integer that describes the number of objects in each permutation.  | 
- See
 - For further information, see docs.oasis-open.org
 
the number of permutations for a given number of objects (with repetitions) that can be selected from the total objects or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) phi(x) → {number}
Returns the value of the density function for a standard normal distribution.
| Name | Type | Description | 
|---|---|---|
x | number | X is the number for which you want the density of the standard normal distribution.  | 
- See
 - For further information, see docs.oasis-open.org
 
the value of the density function for a standard normal distribution or an error if the argument is incorrect.
- Type:
 - number
 
(inner) prob(x_range, prob_range, lower_limit, upper_limit) → {number}
Returns the probability that values in a range are between two limits.
| Name | Type | Description | 
|---|---|---|
x_range | Array.<number> | The range of numeric values of x with which there are associated probabilities.  | 
prob_range | Array.<number> | A set of probabilities associated with values in x_range.  | 
lower_limit | number | Optional. The lower bound on the value for which you want a probability.  | 
upper_limit | number | Optional. The optional upper bound on the value for which you want a probability.  | 
- See
 - For further information, see docs.oasis-open.org
 
the probability that values in a range are between two limits.
- Type:
 - number
 
(inner) rsq(known_y, known_x) → {number}
Returns the square of the Pearson product moment correlation coefficient.
| Name | Type | Description | 
|---|---|---|
known_y | Array.<number> | An array or range of data points.  | 
known_x | Array.<number> | An array or range of data points.  | 
- See
 - For further information, see docs.oasis-open.org
 
the square of the Pearson product moment correlation coefficient or an error if the arguments are inforrect.
- Type:
 - number
 
(inner) skew(args) → {number}
Returns the skewness of a distribution.
| Name | Type | Description | 
|---|---|---|
args | Array.<number> | number1, number2, ... Number1 is required, subsequent numbers are optional. 1 to 255 arguments for which you want to calculate skewness. You can also use a single array or a reference to an array instead of arguments separated by commas.  | 
- See
 - For further information, see docs.oasis-open.org
 
the skewness of a distribution or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) slope(known_y, known_x) → {number}
Returns the slope of the linear regression line.
| Name | Type | Description | 
|---|---|---|
known_y | Array.<number> | An array or value range of numeric dependent data points.  | 
known_x | Array.<number> | The set of independent data points.  | 
- See
 - For further information, see docs.oasis-open.org
 
the slope of the linear regression line or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) small(array, k) → {number}
Returns the k-th smallest value in a data set.
| Name | Type | Description | 
|---|---|---|
array | Array.<number> | An array or range of numerical data for which you want to determine the k-th smallest value.  | 
k | number | The position (from the smallest) in the array or range of data to return.  | 
- See
 - For further information, see docs.oasis-open.org
 
the k-th smallest value in a data set or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) standardize(x, mean, standard_dev) → {number}
Returns a normalized value.
| Name | Type | Description | 
|---|---|---|
x | number | The value you want to normalize.  | 
mean | number | The arithmetic mean of the distribution.  | 
standard_dev | number | The standard deviation of the distribution.  | 
- See
 - For further information, see docs.oasis-open.org
 
a normalized value or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) stDevA(…args) → {number}
Estimates standard deviation based on a sample, including numbers, text, and logical values.
| Name | Type | Attributes | Description | 
|---|---|---|---|
args | Array.<number> | <repeatable> | value1, value2, ... Value1 is required, subsequent values are optional. 1 to 255 values corresponding to a sample of a population. You can also use a single array or a reference to an array instead of arguments separated by commas.  | 
- See
 - For further information, see docs.oasis-open.org
 
Estimated standard deviation based on a sample, including numbers, text, and logical values or an error.
- Type:
 - number
 
(inner) stDevPA(…args) → {number}
Calculates standard deviation based on the entire population, including numbers, text, and logical values.
| Name | Type | Attributes | Description | 
|---|---|---|---|
args | Array.<number> | <repeatable> | value1, value2, ... Value1 is required, subsequent values are optional. 1 to 255 values corresponding to a population. You can also use a single array or a reference to an array instead of arguments separated by commas.  | 
- See
 - For further information, see docs.oasis-open.org
 
Calculated standard deviation based on the entire population, including numbers, text, and logical values or an error.
- Type:
 - number
 
(inner) steyx(known_y, known_x) → {number}
Returns the standard error of the predicted y-value for each x in the regression.
| Name | Type | Description | 
|---|---|---|
known_y | Array.<number> | An array or range of dependent data points.  | 
known_x | Array.<number> | An array or range of independent data points.  | 
- See
 - For further information, see docs.oasis-open.org
 
the standard error of the predicted y-value for each x in the regression or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) trend(known_ys, known_xs, new_xs) → {Array.<number>}
Returns values along a linear trend.
| Name | Type | Description | 
|---|---|---|
known_ys | Array.<number> | The set of y-values you already know in the relationship y = mx + b  | 
known_xs | Array.<number> | An optional set of x-values that you may already know in the relationship y = mx + b  | 
new_xs | Array.<number> | Optional. New x-values for which you want TREND to return corresponding y-values.  | 
- See
 - For further information, see docs.oasis-open.org
 
values along a linear trend or an error if the arguments are incorrect.
- Type:
 - Array.<number>
 
(inner) trimMean(range, percent) → {number}
Returns the mean of the interior of a data set.
| Name | Type | Description | 
|---|---|---|
range | Array.<number> | The array or range of values to trim and average.  | 
percent | number | The fractional number of data points to exclude from the calculation. For example, if percent = 0.2, 4 points are trimmed from a data set of 20 points (20 x 0.2): 2 from the top and 2 from the bottom of the set.  | 
- See
 - For further information, see docs.oasis-open.org
 
the mean of the interior of a data set or an error if the arguments are incorrect.
- Type:
 - number
 
(inner) varA(…args) → {number}
Estimates variance based on a sample, including numbers, text, and logical values.
| Name | Type | Attributes | Description | 
|---|---|---|---|
args | Array.<number> | <repeatable> | value1, value2, ... Value1 is required, subsequent values are optional. 1 to 255 value arguments corresponding to a sample of a population.  | 
- See
 - For further information, see docs.oasis-open.org
 
Estimated variance based on a sample, including numbers, text, and logical values.
- Type:
 - number
 
(inner) varPA(…args) → {number}
Calculates variance based on the entire population, including numbers, text, and logical values.
| Name | Type | Attributes | Description | 
|---|---|---|---|
args | Array.<number> | <repeatable> | value1, value2, ... Value1 is required, subsequent values are optional. 1 to 255 value arguments corresponding to a population.  | 
- See
 - For further information, see docs.oasis-open.org
 
Calculated variance based on the entire population, including numbers, text, and logical values
- Type:
 - number