Skip to main content
Statistics functions operate over a table.

Reading the table

Most take a single-column table, or a multi-column table plus a column index to operate on. The first column is index 1, and when column is omitted it defaults to 1; a column out of range returns an Invalid array dimensions error.

Aggregation

These read a table column — see Reading the table.

Count [count]

The number of rows in table.

Sum [sum]

The sum of the first column of table, or of the given column.

Average [avg, mean, average]

The average of the values. mean and average are aliases.

Product [product]

The product of the values in a one-dimensional list.

Range and extremes

These read a table column — see Reading the table.

Minimum [min, minimum]

The minimum value. Given several equal-length single-column tables, returns the row-wise minimum as a table.

Maximum [max, maximum]

The maximum value, with the same forms as min.

Range [range]

The difference between the maximum and minimum.

Dispersion

These read a table column — see Reading the table.

Standard deviation [stddev, stddevp]

stddev is the sample standard deviation; stddevp is the population standard deviation.

Variance [variance, variancep]

variance is the sample variance; variancep is the population variance.

Median and quartiles [median, quartile1, quartile3]

The median, first quartile, and third quartile.

Sums of products

These read a table column — see Reading the table.

Sum of products [sumofproducts]

Multiplies the items within each row, then sums those products. This is the operation for a weighted sum or dot product — a table of (weight; value) rows totals to sumofproducts(table), where sum reads only the first column. With resultsAsTable set to true, returns the per-row products as a table instead.

Sum of squares [sum2]

The sum of the squares of the values.

Sum XY [sumxy]

The sum of each row’s x_column value multiplied by its y_column value.

Probability

Factorial [fact]

The factorial of value, a whole number from 1 to 170. Values outside that range return a Parameter out of range error.

Permutations [perm]

The number of permutations of n taken r at a time (order matters). n and r must be whole numbers with nr > 0.

Combinations [comb]

The number of combinations of n taken r at a time (order does not matter). n and r must be whole numbers with nr > 0.

Random [rand]

A random real number between 0 and 1 inclusive, or a random whole number between lower and upper inclusive. With length, returns a table of that many random values.