spreadsheet
typeScript/javascript spreadsheet parser, with formulas.
git clone https://git.vogt.world/spreadsheet.git
Log | Files | README.md
← All files
name: dist/Formulas/Statistical.d.ts
-rw-r--r--
23391
  1/**
  2 * Calculates the sum of squares of deviations based on a sample.
  3 * @param values - The values or ranges of the sample.
  4 * @returns {number} sum of squares of deviations
  5 * @constructor
  6 */
  7declare let DEVSQ: (...values: any[]) => number;
  8/**
  9 * Returns the median value in a numeric dataset.
 10 * @param values - The value(s) or range(s) to consider when calculating the median value.
 11 * @returns {number} the median value of the dataset
 12 * @constructor
 13 */
 14declare let MEDIAN: (...values: any[]) => number;
 15/**
 16 * Returns the numerical average value in a dataset, ignoring text.
 17 * @param values - The values or ranges to consider when calculating the average value.
 18 * @returns {number} the average value of this dataset.
 19 * @constructor
 20 */
 21declare let AVERAGE: (...values: any[]) => number;
 22/**
 23 * Calculates the average of the magnitudes of deviations of data from a dataset's mean.
 24 * @param values - The value(s) or range(s)
 25 * @returns {number} average of the magnitudes of deviations of data from a dataset's mean
 26 * @constructor
 27 */
 28declare let AVEDEV: (...values: any[]) => number;
 29/**
 30 * Returns the numerical average value in a dataset, coercing text values in ranges to 0 values.
 31 * @param values - value(s) or range(s) to consider when calculating the average value.
 32 * @returns {number} the numerical average value in a dataset
 33 * @constructor
 34 */
 35declare let AVERAGEA: (...values: any[]) => number;
 36/**
 37 * Calculates r, the Pearson product-moment correlation coefficient of a dataset. Any text encountered in the arguments
 38 * will be ignored. CORREL is synonymous with PEARSON.
 39 * @param dataY - The range representing the array or matrix of dependent data.
 40 * @param dataX - The range representing the array or matrix of independent data.
 41 * @returns {number} the Pearson product-moment correlation coefficient.
 42 * @constructor
 43 */
 44declare let CORREL: (dataY: any, dataX: any) => number;
 45/**
 46 * Calculates r, the Pearson product-moment correlation coefficient of a dataset. Any text encountered in the arguments
 47 * will be ignored. PEARSON is synonymous with CORREL.
 48 * @param dataY - The range representing the array or matrix of dependent data.
 49 * @param dataX - The range representing the array or matrix of independent data.
 50 * @returns {number} the Pearson product-moment correlation coefficient.
 51 * @constructor
 52 */
 53declare let PEARSON: (dataY: any, dataX: any) => any;
 54/**
 55 * Returns the value of the exponential distribution function with a specified lambda at a specified value.
 56 * @param x - The input to the exponential distribution function. If cumulative is TRUE then EXPONDIST returns
 57 * the cumulative probability of all values up to x.
 58 * @param lambda - The lambda to specify the exponential distribution function.
 59 * @param cumulative - Whether to use the exponential cumulative distribution.
 60 * @returns {number} value of the exponential distribution function.
 61 * @constructor
 62 */
 63declare let EXPONDIST: (x: any, lambda: any, cumulative: any) => number;
 64/**
 65 * Calculates the left-tailed F probability distribution (degree of diversity) for two data sets with given input x.
 66 * Alternately called Fisher-Snedecor distribution or Snecdor's F distribution.
 67 * @param x - The input to the F probability distribution function. The value at which to evaluate the function.
 68 * Must be a positive number.
 69 * @param degreesFreedom1 - The numerator degrees of freedom.
 70 * @param degreesFreedom2 - The denominator degrees of freedom.
 71 * @param cumulative - Logical value that determines the form of the function. If true returns the cumulative
 72 * distribution function. If false returns the probability density function.
 73 * @returns {number|boolean} left-tailed F probability distribution
 74 * @constructor
 75 * TODO: This function should be stricter in its return type.
 76 */
 77declare let FDIST$LEFTTAILED: (x: any, degreesFreedom1: any, degreesFreedom2: any, cumulative: any) => number | boolean;
 78/**
 79 * Returns the inverse of the (right-tailed) F probability distribution. If p = FDIST(x,...), then FINV(p,...) = x. The
 80 * F distribution can be used in an F-test that compares the degree of variability in two data sets.
 81 * @param probability - A probability associated with the F cumulative distribution.
 82 * @param degFreedom1 - Required. The numerator degrees of freedom.
 83 * @param degFreedom2 - Required. The denominator degrees of freedom.
 84 * @returns {number} inverse of the (right-tailed) F probability distribution
 85 * @constructor
 86 */
 87declare let FINV: (probability: any, degFreedom1: any, degFreedom2: any) => number;
 88/**
 89 * Returns the Fisher transformation of a specified value.
 90 * @param value - The value for which to calculate the Fisher transformation.
 91 * @returns {number} Fisher transformation
 92 * @constructor
 93 */
 94declare let FISHER: (value: any) => number;
 95/**
 96 * Returns the inverse Fisher transformation of a specified value.
 97 * @param value - The value for which to calculate the inverse Fisher transformation.
 98 * @returns {number} inverse Fisher transformation
 99 * @constructor
100 */
101declare let FISHERINV: (value: any) => number;
102/**
103 * Returns the maximum value in a numeric dataset.
104 * @param values - The values or range(s) to consider when calculating the maximum value.
105 * @returns {number} the maximum value of the dataset
106 * @constructor
107 */
108declare let MAX: (...values: any[]) => number;
109/**
110 * Returns the maximum numeric value in a dataset.
111 * @param values - The value(s) or range(s) to consider when calculating the maximum value.
112 * @returns {number} maximum value of the dataset
113 * @constructor
114 */
115declare let MAXA: (...values: any[]) => number;
116/**
117 * Returns the minimum value in a numeric dataset.
118 * @param values - The value(s) or range(s) to consider when calculating the minimum value.
119 * @returns {number} the minimum value of the dataset
120 * @constructor
121 */
122declare let MIN: (...values: any[]) => number;
123/**
124 * Returns the minimum numeric value in a dataset.
125 * @param values - The value(s) or range(s) to consider when calculating the minimum value.
126 * @returns {number} the minimum value in the dataset
127 * @constructor
128 */
129declare let MINA: (...values: any[]) => number;
130/**
131 * Returns the average of a range depending on criteria.
132 * @param criteriaRange - The range to check against criterion.
133 * @param criterion - The pattern or test to apply to criteria_range.
134 * @param averageRange - [optional] The range to average. If not included, criteria_range is used for the
135 * average instead.
136 * @returns {number}
137 * @constructor
138 * TODO: This needs to also accept a third parameter "average_range"
139 */
140declare let AVERAGEIF: (criteriaRange: any, criterion: any, averageRange?: any) => number;
141/**
142 * Returns the a count of the number of numeric values in a dataset.
143 * @param values - The values or ranges to consider when counting.
144 * @returns {number} number of numeric values in a dataset.
145 * @constructor
146 */
147declare let COUNT: (...values: any[]) => number;
148/**
149 * Returns the a count of the number of values in a dataset.
150 * @param values - The values or ranges to consider when counting.
151 * @returns {number} number of values in a dataset.
152 * @constructor
153 */
154declare let COUNTA: (...values: any[]) => number;
155/**
156 * Returns the value at a given percentile of a set of data.
157 * @param data -  The array or range containing the dataset to consider.
158 * @param percent - percentile to be calculated and returned.
159 * @returns {number}
160 * @constructor
161 */
162declare let PERCENTILE: (data: any, percent: any) => number;
163/**
164 * Returns a value nearest to a specified quartile of a set of data.
165 * @param data -  The array or range containing the set of data to consider.
166 * @param quartile - Which quartile value to return. 0 returns 0 percent mark, 1 returns 25 percent mark, 2 returns 50
167 * percent mark, 3 returns 75 percent mark, 4 returns 100 percent mark.
168 * @constructor
169 */
170declare let QUARTILE: (data: any, quartile: any) => number;
171/**
172 * Calculates the standard deviation of a range, ignoring string values, regardless of whether they can be converted to
173 * numbers.
174 * @param values - Range of sample.
175 * @returns {number}
176 * @constructor
177 */
178declare let STDEV: (...values: any[]) => number;
179/**
180 * Calculates the standard deviation of a range, converting string values to numbers, if possible. If a value cannot
181 * be converted to a number, formula will throw a value error.
182 * @param values - Range of sample.
183 * @returns {number}
184 * @constructor
185 */
186declare let STDEVA: (...values: any[]) => number;
187/**
188 * Calculates the standard deviation of an entire population, ignoring string values, regardless of whether they can be
189 * converted to numbers.
190 * @param values - Entire sample.
191 * @returns {number}
192 * @constructor
193 */
194declare let STDEVP: (...values: any[]) => number;
195/**
196 * Calculates the standard deviation of an entire population, including text and boolean values, if possible. If a value
197 * cannot be converted to a number, formula will throw a value error.
198 * @param values - Entire sample.
199 * @returns {number}
200 * @constructor
201 */
202declare let STDEVPA: (...values: any[]) => number;
203/**
204 * Returns the mean value of a range excluding some percentage of the range on the high and low ends of the range.
205 * @param range - Array or range to consider.
206 * @param percent - The portion of the data to exclude on both ends of the range.
207 * @returns {number}
208 * @constructor
209 */
210declare let TRIMMEAN: (range: any, percent: any) => number;
211/**
212 * Returns the slope of the line calculated from linear regression of a range. Any text values passed in will be ignored
213 * @param rangeY - The range or array representing the dependent data.
214 * @param rangeX - The range or array representing the independent data.
215 * @constructor
216 */
217declare let SLOPE: (rangeY: any, rangeX: any) => number;
218/**
219 * Returns the normalized equivalent of a random variable given mean and standard deviation of the distribution.
220 * @param value - Value to be standardized.
221 * @param meanValue - Arithmetic mean of the distribution
222 * @param std - The standard deviation of the distribution or range.
223 * @returns {number}
224 * @constructor
225 */
226declare let STANDARDIZE: (value: any, meanValue: any, std: any) => number;
227/**
228 * Returns the Nth smallest value in the range, ignoring text values.
229 * @param range -  Range or data-set to consider.
230 * @param n - N in 'Nth'.
231 * @constructor
232 */
233declare let SMALL: (range: any, n: any) => number;
234/**
235 * Returns the Nth largest value in the range, ignoring text values.
236 * @param range -  Range or data-set to consider.
237 * @param n - N in 'Nth'.
238 * @constructor
239 */
240declare let LARGE: (range: any, n: any) => number;
241/**
242 * Returns the kurtosis of a data set or range. Ignores text values.
243 * @param values - data set or range to calculate. Must be at least 4 values.
244 * @returns {number}
245 * @constructor
246 */
247declare let KURT: (...values: any[]) => number;
248/**
249 * Calculates the y-value at which a line will intersect the y-axis by using known x-values and y-values. Any text
250 * values will be ignored.
251 * @param rangeY - Dependent range of values.
252 * @param rangeX - Independent range of values.
253 * @returns {number}
254 * @constructor
255 */
256declare let INTERCEPT: (rangeY: any, rangeX: any) => number;
257/**
258 * Calculates the a future value using existing x-values and y-values. Any text values will be ignored.
259 * @param x - The data point for which you would like to predict the value.
260 * @param rangeY - Dependent range of values.
261 * @param rangeX - Independent range of values.
262 * @returns {number}
263 * @constructor
264 * TODO: This formula will fail to parse since the first argument is followed by an argument that is an array.
265 * TODO (continued) This is a known issue.
266 */
267declare let FORECAST: (x: any, rangeY: any, rangeX: any) => number;
268/**
269 * Returns the Poisson distribution for the given number. Functions the same as POISSON.DIST.
270 * @param x - Number to use.
271 * @param meanValue - The middle value for the Poisson distribution.
272 * @param cumulative - [OPTIONAL] - 0 calculates the density function, 1 calculates the distribution. Defaults to 0.
273 * @returns {number}
274 * @constructor
275 */
276declare let POISSON: (x: any, meanValue: any, cumulative?: any) => number;
277/**
278 * Returns the percentage rank (percentile) of the given value in a sample. Functions the same as PERCENTRANK.INC.
279 * @param data - The array or range of data in the sample.
280 * @param x - The value.
281 * @param significance - [OPTIONAL] - The number of significant digits to use in the calculation. Defaults to 3.
282 * @returns {number}
283 * @constructor
284 */
285declare let PERCENTRANK: (data: any, x: any, significance?: any) => number;
286/**
287 * Returns the percentage rank (percentile) from 0 to 1 exclusive for a value in a sample.
288 * @param data - The array or range of data in the sample.
289 * @param x - The value
290 * @param significance - [OPTIONAL] - The number of significant digits to use in the calculation. Defaults to 3.
291 * @returns {number}
292 * @constructor
293 */
294declare let PERCENTRANK$EXC: (data: any, x: any, significance?: any) => number;
295/**
296 * Returns the inverse of the standard normal distribution for the given number.
297 * @param probability - The probability value.
298 * @returns {number}
299 * @constructor
300 */
301declare let NORMSINV: (probability: any) => any;
302/**
303 * Returns the standard normal cumulative distribution for the given number.
304 * @param z - Value to use in calculation.
305 * @returns {number}
306 * @constructor
307 */
308declare let NORMSDIST: (z: any) => number;
309/**
310 * Returns the normal distribution for the given number in the distribution.
311 * @param x - Value to use.
312 * @param meanValue - The mean value of the distribution.
313 * @param standDev - The standard deviation of the distribution.
314 * @param cumulative - 0 calculates the density function, 1 calculates the distribution.
315 * @returns {number}
316 * @constructor
317 */
318declare let NORMDIST: (x: any, meanValue: any, standDev: any, cumulative: any) => number;
319/**
320 * Returns the inverse of the normal distribution for the given number in the distribution.
321 * @param probability - Number in the distribution.
322 * @param meanVal - The mean value in the normal distribution.
323 * @param standDev - The standard deviation of the normal distribution.
324 * @returns {number}
325 * @constructor
326 */
327declare let NORMINV: (probability: any, meanVal: any, standDev: any) => any;
328/**
329 * Returns the negative binomial distribution.
330 * @param k - The value returned for unsuccessful tests.
331 * @param r - The value returned for successful tests.
332 * @param p - The probability of the success of an attempt, between 0 and 1 inclusively.
333 * @returns {number}
334 * @constructor
335 */
336declare let NEGBINOMDIST: (k: any, r: any, p: any) => number;
337/**
338 * Returns the geometric mean of a sample.
339 * @param values - The numerical arguments or ranges that represent a random sample.
340 * @returns {number}
341 * @constructor
342 */
343declare let GEOMEAN: (...values: any[]) => number;
344/**
345 * Returns the harmonic mean of a data set.
346 * @param values - The numerical arguments or ranges that represent a sample.
347 * @returns {number}
348 * @constructor
349 */
350declare let HARMEAN: (...values: any[]) => number;
351/**
352 * Returns the (1-alpha) confidence interval for a normal distribution.
353 * @param alpha - The level of the confidence interval
354 * @param standDev - The standard deviation for the total population
355 * @param size - The size of the population.
356 * @returns {number}
357 * @constructor
358 */
359declare let CONFIDENCE: (alpha: any, standDev: any, size: any) => number;
360/**
361 * Returns the individual term binomial distribution probability.
362 * @param successes - The number of successes in a set of trials.
363 * @param trials - The number of independent trials.
364 * @param probability - The probability of success on each trial.
365 * @param cumulative - 0 calculates the probability of a single event, 1 calculates the cumulative probability.
366 * @returns {number}
367 * @constructor
368 */
369declare let BINOMDIST: (successes: any, trials: any, probability: any, cumulative: any) => number;
370/**
371 * Returns the covariance of the product of paired deviations.
372 * @param dataY - The first range of data.
373 * @param dataX - The second range of data.
374 * @returns {number}
375 * @constructor
376 */
377declare let COVAR: (dataY: any, dataX: any) => number;
378/**
379 * Returns the values of the Weibull distribution for the given number.
380 * @param x - Number to use in calculation.
381 * @param shape - The Alpha parameter of the Weibull distribution. Should be greater than 0.
382 * @param scale - The Beta parameter of the Weibull distribution. Should be greater than 0.
383 * @param cumulative - Indicates the type of function: If 0 the form of the function is calculated, if 1 then the
384 * distribution is calculated.
385 * @returns {number}
386 * @constructor
387 */
388declare let WEIBULL: (x: any, shape: any, scale: any, cumulative: any) => number;
389/**
390 * Estimate the variance based on the entire population. Text will be converted to numbers, if possible.
391 * @param values - Values of population.
392 * @returns {number}
393 * @constructor
394 */
395declare let VARPA: (...values: any[]) => number;
396/**
397 * Estimate the variance based on the entire population.
398 * @param values - Values of entire population.
399 * @returns {number}
400 * @constructor
401 */
402declare let VARP: (...values: any[]) => number;
403/**
404 * Estimate the variance based on a sample.
405 * @param values
406 * @returns {number}
407 * @constructor
408 */
409declare let VARA: (...values: any[]) => number;
410/**
411 * Estimate the variance based on a sample.
412 * @param values - Values in sample.
413 * @constructor
414 */
415declare let VAR: (...values: any[]) => number;
416/**
417 * Returns the number of permutations for a given number of objects.
418 * @param total - The total number of objects
419 * @param objects - The number of objects in each permutation.
420 * @returns {number}
421 * @constructor
422 */
423declare let PERMUT: (total: any, objects: any) => number;
424/**
425 * Returns the square of the Pearson correlation coefficient based on the given values.
426 * @param rangeY - An array or range of data points.
427 * @param rangeX - An array or range of data points.
428 * @returns {number}
429 * @constructor
430 */
431declare let RSQ: (rangeY: any, rangeX: any) => number;
432/**
433 * Returns the skewness of a distribution.
434 * @param values - The numerical values or range.
435 * @returns {number}
436 * @constructor
437 */
438declare let SKEW: (...values: any[]) => number;
439/**
440 * Returns the standard error of the predicted y value for each x in the regression. Text values will be ignored.
441 * @param rangeY - An array or range of data points.
442 * @param rangeX - An array or range of data points.
443 * @returns {number}
444 * @constructor
445 */
446declare let STEYX: (rangeY: any, rangeX: any) => number;
447/**
448 * Returns the probability that values in a range are between two limits. Data is the array or range of data in the
449 * sample.
450 * @param range - The array or range of data in the sample.
451 * @param probability - The array or range of the corresponding probabilities
452 * @param start - The start value of the interval whose probabilities are to be summed.
453 * @param end - [OPTIONAL] - The end value of the interval whose probabilities are to be summed. If this parameter is
454 * missing, the probability for the start value is calculated
455 * @returns {number}
456 * @constructor
457 */
458declare let PROB: (range: any, probability: any, start: any, end?: any) => any;
459/**
460 * Returns the most commonly occurring value in a range.
461 * @param values - Range(s) or values to consider.
462 * @returns {number}
463 * @constructor
464 */
465declare let MODE: (...values: any[]) => any;
466/**
467 * Returns the position of a given entry in the entire list, measured either from top to bottom or bottom to top.
468 * @param value - Value to find the rank of.
469 * @param data - Values or range of the data-set.
470 * @param isAscending - [OPTIONAL] The type of rank: 0 to rank from the highest, 1 to rank from the lowest. Defaults to
471 * 0.
472 * @returns {number}
473 * @constructor
474 */
475declare let RANK: (value: any, data: any, isAscending?: any) => number;
476/**
477 * Returns the position of a given entry in the entire list, measured either from top to bottom or bottom to top. If
478 * more than one value exists in the same data-set, the average range of the values will be returned.
479 * @param value - Value to find the rank of.
480 * @param data - Values or range of the data-set.
481 * @param isAscending - [OPTIONAL] The type of rank: 0 to rank from the highest, 1 to rank from the lowest. Defaults to
482 * 0.
483 * @returns {number}
484 * @constructor
485 */
486declare let RANK$AVG: (value: any, data: any, isAscending?: any) => number;
487/**
488 * Returns the position of a given entry in the entire list, measured either from top to bottom or bottom to top. If
489 * there is more than one entry of the same value in the dataset, the top rank of the entries will be returned.
490 * @param value - Value to find the rank of.
491 * @param data - Values or range of the data-set.
492 * @param isAscending - [OPTIONAL] The type of rank: 0 to rank from the highest, 1 to rank from the lowest. Defaults to
493 * 0.
494 * @returns {number}
495 * @constructor
496 */
497declare let RANK$EQ: (value: any, data: any, isAscending?: any) => number;
498/**
499 * Returns the cumulative lognormal distribution for the given number.
500 * @param x - The probability value.
501 * @param meanValue - The mean value of the standard logarithmic distribution.
502 * @param standardDev - The standard deviation of the standard logarithmic distribution.
503 * @returns {number}
504 * @constructor
505 */
506declare let LOGNORMDIST: (x: any, meanValue: any, standardDev: any) => number;
507/**
508 * Returns the t-distribution for the given number.
509 * @param x - Value to use in calculation.
510 * @param degreesOfFreedom - The number of degrees of freedom for the t-distribution.
511 * @param tails - 1 returns the one-tailed test, 2 returns the two-tailed test.
512 * @returns {number}
513 * @constructor
514 */
515declare let TDIST: (x: any, degreesOfFreedom: any, tails: any) => number;
516/**
517 * Returns the hypergeometric distribution. X is the number of results achieved in the random sample.
518 * @param numberOfSuccesses - The number of results achieved in the random sample.
519 * @param numberOfDraws - The size of the random sample.
520 * @param successesInPop - The number of possible results in the total population.
521 * @param populationSize - The size of the total population.
522 * @returns {number}
523 * @constructor
524 */
525declare let HYPGEOMDIST: (numberOfSuccesses: any, numberOfDraws: any, successesInPop: any, populationSize: any) => number;
526/**
527 * Returns the two-tailed P value of a z test with standard distribution.
528 * @param range - Te array of the data.
529 * @param value - The value to be tested.
530 * @param stdDev - [OPTIONAL] The standard deviation of the total population. If this argument is missing, the standard
531 * deviation of the sample is processed.
532 * @returns {number}
533 * @constructor
534 */
535declare let ZTEST: (range: any, value: any, stdDev?: any) => number;
536export { AVERAGE, AVERAGEA, AVERAGEIF, AVEDEV, CORREL, COUNT, COUNTA, PEARSON, MEDIAN, DEVSQ, EXPONDIST, FDIST$LEFTTAILED, FINV, FISHER, FISHERINV, MAX, MAXA, MIN, MINA, QUARTILE, PERCENTILE, STDEV, STDEVA, STDEVP, STDEVPA, TRIMMEAN, SLOPE, STANDARDIZE, SMALL, LARGE, KURT, INTERCEPT, FORECAST, POISSON, PERCENTRANK, PERCENTRANK$EXC, NORMSINV, NORMSDIST, NORMDIST, NORMINV, NEGBINOMDIST, GEOMEAN, HARMEAN, CONFIDENCE, BINOMDIST, COVAR, WEIBULL, VARPA, VARP, VARA, VAR, PERMUT, RSQ, SKEW, STEYX, PROB, MODE, RANK, RANK$AVG, RANK$EQ, LOGNORMDIST, TDIST, HYPGEOMDIST, ZTEST };