Constants

LOG_GAMMA_X_MAX_VALUE

LOG_GAMMA_X_MAX_VALUE = 2.55E+305

MAX_VALUE

MAX_VALUE = 1.2E+308

MAX_ITERATIONS

MAX_ITERATIONS = 256

SQRT2PI

SQRT2PI = 2.5066282746310007

Properties

$logBetaCacheP

$logBetaCacheP

$logBetaCacheQ

$logBetaCacheQ

$logBetaCacheResult

$logBetaCacheResult

$logGammaCacheResult

$logGammaCacheResult

logGamma function.

$logGammaCacheX

$logGammaCacheX

Methods

AVEDEV()

AVEDEV(mixed  ...$args) : float|string

AVEDEV.

Returns the average of the absolute deviations of data points from their mean. AVEDEV is a measure of the variability in a data set.

Excel Function: AVEDEV(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

AVERAGE()

AVERAGE(mixed  ...$args) : float|string

AVERAGE.

Returns the average (arithmetic mean) of the arguments

Excel Function: AVERAGE(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

AVERAGEA()

AVERAGEA(mixed  ...$args) : float|string

AVERAGEA.

Returns the average of its arguments, including numbers, text, and logical values

Excel Function: AVERAGEA(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

AVERAGEIF()

AVERAGEIF(mixed  $range, string  $condition, array  $averageRange = []) : null|float|string

AVERAGEIF.

Returns the average value from a range of cells that contain numbers within the list of arguments

Excel Function: AVERAGEIF(value1[,value2[, ...]],condition)

Parameters

mixed $range

Data values

string $condition

the criteria that defines which cells will be checked

array $averageRange

Data values

Returns

null|float|string —

BETADIST()

BETADIST(float  $value, float  $alpha, float  $beta, mixed  $rMin, mixed  $rMax = 1) : float|string

BETADIST.

Returns the beta distribution.

Parameters

float $value

Value at which you want to evaluate the distribution

float $alpha

Parameter to the distribution

float $beta

Parameter to the distribution

mixed $rMin
mixed $rMax

Returns

float|string —

BETAINV()

BETAINV(float  $probability, float  $alpha, float  $beta, float  $rMin, float  $rMax = 1) : float|string

BETAINV.

Returns the inverse of the Beta distribution.

Parameters

float $probability

Probability at which you want to evaluate the distribution

float $alpha

Parameter to the distribution

float $beta

Parameter to the distribution

float $rMin

Minimum value

float $rMax

Maximum value

Returns

float|string —

BINOMDIST()

BINOMDIST(float  $value, float  $trials, float  $probability, bool  $cumulative) : float|string

BINOMDIST.

Returns the individual term binomial distribution probability. Use BINOMDIST in problems with a fixed number of tests or trials, when the outcomes of any trial are only success or failure, when trials are independent, and when the probability of success is constant throughout the experiment. For example, BINOMDIST can calculate the probability that two of the next three babies born are male.

Parameters

float $value

Number of successes in trials

float $trials

Number of trials

float $probability

Probability of success on each trial

bool $cumulative

Returns

float|string —

CHIDIST()

CHIDIST(float  $value, float  $degrees) : float|string

CHIDIST.

Returns the one-tailed probability of the chi-squared distribution.

Parameters

float $value

Value for the function

float $degrees

degrees of freedom

Returns

float|string —

CHIINV()

CHIINV(float  $probability, float  $degrees) : float|string

CHIINV.

Returns the one-tailed probability of the chi-squared distribution.

Parameters

float $probability

Probability for the function

float $degrees

degrees of freedom

Returns

float|string —

CONFIDENCE()

CONFIDENCE(float  $alpha, float  $stdDev, float  $size) : float|string

CONFIDENCE.

Returns the confidence interval for a population mean

Parameters

float $alpha
float $stdDev

Standard Deviation

float $size

Returns

float|string —

CORREL()

CORREL(mixed  $yValues, null|mixed  $xValues = null) : float|string

CORREL.

Returns covariance, the average of the products of deviations for each data point pair.

Parameters

mixed $yValues

array of mixed Data Series Y

null|mixed $xValues

array of mixed Data Series X

Returns

float|string —

COUNT()

COUNT(mixed  ...$args) : int

COUNT.

Counts the number of cells that contain numbers within the list of arguments

Excel Function: COUNT(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

int —

COUNTA()

COUNTA(mixed  ...$args) : int

COUNTA.

Counts the number of cells that are not empty within the list of arguments

Excel Function: COUNTA(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

int —

COUNTBLANK()

COUNTBLANK(mixed  ...$args) : int

COUNTBLANK.

Counts the number of empty cells within the list of arguments

Excel Function: COUNTBLANK(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

int —

COUNTIF()

COUNTIF(mixed  $range, string  $condition) : int

COUNTIF.

Counts the number of cells that contain numbers within the list of arguments

Excel Function: COUNTIF(range,condition)

Parameters

mixed $range

Data values

string $condition

the criteria that defines which cells will be counted

Returns

int —

COUNTIFS()

COUNTIFS(mixed  ...$args) : int

COUNTIFS.

Counts the number of cells that contain numbers within the list of arguments

Excel Function: COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…)

Parameters

mixed $args variadic

Pairs of Ranges and Criteria

Returns

int —

COVAR()

COVAR(mixed  $yValues, mixed  $xValues) : float|string

COVAR.

Returns covariance, the average of the products of deviations for each data point pair.

Parameters

mixed $yValues

array of mixed Data Series Y

mixed $xValues

array of mixed Data Series X

Returns

float|string —

CRITBINOM()

CRITBINOM(float  $trials, float  $probability, float  $alpha) : int|string

CRITBINOM.

Returns the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value

See https://support.microsoft.com/en-us/help/828117/ for details of the algorithm used

Parameters

float $trials

number of Bernoulli trials

float $probability

probability of a success on each trial

float $alpha

criterion value

Returns

int|string —

DEVSQ()

DEVSQ(mixed  ...$args) : float|string

DEVSQ.

Returns the sum of squares of deviations of data points from their sample mean.

Excel Function: DEVSQ(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

EXPONDIST()

EXPONDIST(float  $value, float  $lambda, bool  $cumulative) : float|string

EXPONDIST.

Returns the exponential distribution. Use EXPONDIST to model the time between events, such as how long an automated bank teller takes to deliver cash. For example, you can use EXPONDIST to determine the probability that the process takes at most 1 minute.

Parameters

float $value

Value of the function

float $lambda

The parameter value

bool $cumulative

Returns

float|string —

FDIST2()

FDIST2(float  $value, int  $u, int  $v, bool  $cumulative) : float|string

F.DIST.

Returns the F probability distribution. You can use this function to determine whether two data sets have different degrees of diversity. For example, you can examine the test scores of men and women entering high school, and determine if the variability in the females is different from that found in the males.

Parameters

float $value

Value of the function

int $u

The numerator degrees of freedom

int $v

The denominator degrees of freedom

bool $cumulative

If cumulative is TRUE, F.DIST returns the cumulative distribution function; if FALSE, it returns the probability density function.

Returns

float|string —

FISHER()

FISHER(float  $value) : float|string

FISHER.

Returns the Fisher transformation at x. This transformation produces a function that is normally distributed rather than skewed. Use this function to perform hypothesis testing on the correlation coefficient.

Parameters

float $value

Returns

float|string —

FISHERINV()

FISHERINV(float  $value) : float|string

FISHERINV.

Returns the inverse of the Fisher transformation. Use this transformation when analyzing correlations between ranges or arrays of data. If y = FISHER(x), then FISHERINV(y) = x.

Parameters

float $value

Returns

float|string —

FORECAST()

FORECAST(float  $xValue, mixed  $yValues, mixed  $xValues) : bool|float|string

FORECAST.

Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value.

Parameters

float $xValue

Value of X for which we want to find Y

mixed $yValues

array of mixed Data Series Y

mixed $xValues

of mixed Data Series X

Returns

bool|float|string —

GAMMAFunction()

GAMMAFunction(float  $value) : float|string

GAMMA.

Return the gamma function value.

Parameters

float $value

Returns

float|string —

The result, or a string containing an error

GAMMADIST()

GAMMADIST(float  $value, float  $a, float  $b, bool  $cumulative) : float|string

GAMMADIST.

Returns the gamma distribution.

Parameters

float $value

Value at which you want to evaluate the distribution

float $a

Parameter to the distribution

float $b

Parameter to the distribution

bool $cumulative

Returns

float|string —

GAMMAINV()

GAMMAINV(float  $probability, float  $alpha, float  $beta) : float|string

GAMMAINV.

Returns the inverse of the Gamma distribution.

Parameters

float $probability

Probability at which you want to evaluate the distribution

float $alpha

Parameter to the distribution

float $beta

Parameter to the distribution

Returns

float|string —

GAMMALN()

GAMMALN(float  $value) : float|string

GAMMALN.

Returns the natural logarithm of the gamma function.

Parameters

float $value

Returns

float|string —

GAUSS()

GAUSS(float  $value) : float|string

GAUSS.

Calculates the probability that a member of a standard normal population will fall between the mean and z standard deviations from the mean.

Parameters

float $value

Returns

float|string —

The result, or a string containing an error

GEOMEAN()

GEOMEAN(mixed  ...$args) : float|string

GEOMEAN.

Returns the geometric mean of an array or range of positive data. For example, you can use GEOMEAN to calculate average growth rate given compound interest with variable rates.

Excel Function: GEOMEAN(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

GROWTH()

GROWTH(array  $yValues, array  $xValues = [], array  $newValues = [], bool  $const = true) : array

GROWTH.

Returns values along a predicted exponential Trend

Parameters

array $yValues

Data Series Y

array $xValues

Data Series X

array $newValues

Values of X for which we want to find Y

bool $const

a logical value specifying whether to force the intersect to equal 0

Returns

array —

of float

HARMEAN()

HARMEAN(mixed  ...$args) : float|string

HARMEAN.

Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the arithmetic mean of reciprocals.

Excel Function: HARMEAN(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

HYPGEOMDIST()

HYPGEOMDIST(float  $sampleSuccesses, float  $sampleNumber, float  $populationSuccesses, float  $populationNumber) : float|string

HYPGEOMDIST.

Returns the hypergeometric distribution. HYPGEOMDIST returns the probability of a given number of sample successes, given the sample size, population successes, and population size.

Parameters

float $sampleSuccesses

Number of successes in the sample

float $sampleNumber

Size of the sample

float $populationSuccesses

Number of successes in the population

float $populationNumber

Population size

Returns

float|string —

INTERCEPT()

INTERCEPT(array  $yValues, array  $xValues) : float|string

INTERCEPT.

Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values.

Parameters

array $yValues

Data Series Y

array $xValues

Data Series X

Returns

float|string —

KURT()

KURT(array  ...$args) : float|string

KURT.

Returns the kurtosis of a data set. Kurtosis characterizes the relative peakedness or flatness of a distribution compared with the normal distribution. Positive kurtosis indicates a relatively peaked distribution. Negative kurtosis indicates a relatively flat distribution.

Parameters

array $args variadic

Data Series

Returns

float|string —

LARGE()

LARGE(mixed  ...$args) : float|string

LARGE.

Returns the nth largest value in a data set. You can use this function to select a value based on its relative standing.

Excel Function: LARGE(value1[,value2[, ...]],entry)

Parameters

mixed $args variadic

Data values

Returns

float|string —

The result, or a string containing an error

LINEST()

LINEST(array  $yValues, null|array  $xValues = null, bool  $const = true, bool  $stats = false) : array|int|string

LINEST.

Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, and then returns an array that describes the line.

Parameters

array $yValues

Data Series Y

null|array $xValues

Data Series X

bool $const

a logical value specifying whether to force the intersect to equal 0

bool $stats

a logical value specifying whether to return additional regression statistics

Returns

array|int|string —

The result, or a string containing an error

LOGEST()

LOGEST(array  $yValues, null|array  $xValues = null, bool  $const = true, bool  $stats = false) : array|int|string

LOGEST.

Calculates an exponential curve that best fits the X and Y data series, and then returns an array that describes the line.

Parameters

array $yValues

Data Series Y

null|array $xValues

Data Series X

bool $const

a logical value specifying whether to force the intersect to equal 0

bool $stats

a logical value specifying whether to return additional regression statistics

Returns

array|int|string —

The result, or a string containing an error

LOGINV()

LOGINV(float  $probability, float  $mean, float  $stdDev) : float|string

LOGINV.

Returns the inverse of the normal cumulative distribution

Parameters

float $probability
float $mean
float $stdDev

Returns

float|string —

The result, or a string containing an error

LOGNORMDIST()

LOGNORMDIST(float  $value, float  $mean, float  $stdDev) : float|string

LOGNORMDIST.

Returns the cumulative lognormal distribution of x, where ln(x) is normally distributed with parameters mean and standard_dev.

Parameters

float $value
float $mean
float $stdDev

Returns

float|string —

The result, or a string containing an error

LOGNORMDIST2()

LOGNORMDIST2(float  $value, float  $mean, float  $stdDev, bool  $cumulative = false) : float|string

LOGNORM.DIST.

Returns the lognormal distribution of x, where ln(x) is normally distributed with parameters mean and standard_dev.

Parameters

float $value
float $mean
float $stdDev
bool $cumulative

Returns

float|string —

The result, or a string containing an error

MAX()

MAX(mixed  ...$args) : float

MAX.

MAX returns the value of the element of the values passed that has the highest value, with negative numbers considered smaller than positive numbers.

Excel Function: MAX(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float —

MAXA()

MAXA(mixed  ...$args) : float

MAXA.

Returns the greatest value in a list of arguments, including numbers, text, and logical values

Excel Function: MAXA(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float —

MAXIFS()

MAXIFS(mixed  ...$args) : float

MAXIFS.

Counts the maximum value within a range of cells that contain numbers within the list of arguments

Excel Function: MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

Parameters

mixed $args variadic

Data range and criterias

Returns

float —

MEDIAN()

MEDIAN(mixed  ...$args) : float|string

MEDIAN.

Returns the median of the given numbers. The median is the number in the middle of a set of numbers.

Excel Function: MEDIAN(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

The result, or a string containing an error

MIN()

MIN(mixed  ...$args) : float

MIN.

MIN returns the value of the element of the values passed that has the smallest value, with negative numbers considered smaller than positive numbers.

Excel Function: MIN(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float —

MINA()

MINA(mixed  ...$args) : float

MINA.

Returns the smallest value in a list of arguments, including numbers, text, and logical values

Excel Function: MINA(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float —

MINIFS()

MINIFS(mixed  ...$args) : float

MINIFS.

Returns the minimum value within a range of cells that contain numbers within the list of arguments

Excel Function: MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

Parameters

mixed $args variadic

Data range and criterias

Returns

float —

MODE()

MODE(mixed  ...$args) : float|string

MODE.

Returns the most frequently occurring, or repetitive, value in an array or range of data

Excel Function: MODE(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

The result, or a string containing an error

NEGBINOMDIST()

NEGBINOMDIST(float  $failures, float  $successes, float  $probability) : float|string

NEGBINOMDIST.

Returns the negative binomial distribution. NEGBINOMDIST returns the probability that there will be number_f failures before the number_s-th success, when the constant probability of a success is probability_s. This function is similar to the binomial distribution, except that the number of successes is fixed, and the number of trials is variable. Like the binomial, trials are assumed to be independent.

Parameters

float $failures

Number of Failures

float $successes

Threshold number of Successes

float $probability

Probability of success on each trial

Returns

float|string —

The result, or a string containing an error

NORMDIST()

NORMDIST(float  $value, float  $mean, float  $stdDev, bool  $cumulative) : float|string

NORMDIST.

Returns the normal distribution for the specified mean and standard deviation. This function has a very wide range of applications in statistics, including hypothesis testing.

Parameters

float $value
float $mean

Mean Value

float $stdDev

Standard Deviation

bool $cumulative

Returns

float|string —

The result, or a string containing an error

NORMINV()

NORMINV(float  $probability, float  $mean, float  $stdDev) : float|string

NORMINV.

Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation.

Parameters

float $probability
float $mean

Mean Value

float $stdDev

Standard Deviation

Returns

float|string —

The result, or a string containing an error

NORMSDIST()

NORMSDIST(float  $value) : float|string

NORMSDIST.

Returns the standard normal cumulative distribution function. The distribution has a mean of 0 (zero) and a standard deviation of one. Use this function in place of a table of standard normal curve areas.

Parameters

float $value

Returns

float|string —

The result, or a string containing an error

NORMSDIST2()

NORMSDIST2(float  $value, bool  $cumulative) : float|string

NORM.S.DIST.

Returns the standard normal cumulative distribution function. The distribution has a mean of 0 (zero) and a standard deviation of one. Use this function in place of a table of standard normal curve areas.

Parameters

float $value
bool $cumulative

Returns

float|string —

The result, or a string containing an error

NORMSINV()

NORMSINV(float  $value) : float|string

NORMSINV.

Returns the inverse of the standard normal cumulative distribution

Parameters

float $value

Returns

float|string —

The result, or a string containing an error

PERCENTILE()

PERCENTILE(mixed  ...$args) : float|string

PERCENTILE.

Returns the nth percentile of values in a range..

Excel Function: PERCENTILE(value1[,value2[, ...]],entry)

Parameters

mixed $args variadic

Data values

Returns

float|string —

The result, or a string containing an error

PERCENTRANK()

PERCENTRANK(float[]  $valueSet, int  $value, int  $significance = 3) : float|string

PERCENTRANK.

Returns the rank of a value in a data set as a percentage of the data set. Note that the returned rank is simply rounded to the appropriate significant digits, rather than floored (as MS Excel), so value 3 for a value set of 1, 2, 3, 4 will return 0.667 rather than 0.666

Parameters

float[] $valueSet

An array of, or a reference to, a list of numbers

int $value

the number whose rank you want to find

int $significance

the number of significant digits for the returned percentage value

Returns

float|string —

(string if result is an error)

PERMUT()

PERMUT(int  $numObjs, int  $numInSet) : int|string

PERMUT.

Returns the number of permutations for a given number of objects that can be selected from number objects. A permutation is any set or subset of objects or events where internal order is significant. Permutations are different from combinations, for which the internal order is not significant. Use this function for lottery-style probability calculations.

Parameters

int $numObjs

Number of different objects

int $numInSet

Number of objects in each permutation

Returns

int|string —

Number of permutations, or a string containing an error

POISSON()

POISSON(float  $value, float  $mean, bool  $cumulative) : float|string

POISSON.

Returns the Poisson distribution. A common application of the Poisson distribution is predicting the number of events over a specific time, such as the number of cars arriving at a toll plaza in 1 minute.

Parameters

float $value
float $mean

Mean Value

bool $cumulative

Returns

float|string —

The result, or a string containing an error

QUARTILE()

QUARTILE(mixed  ...$args) : float|string

QUARTILE.

Returns the quartile of a data set.

Excel Function: QUARTILE(value1[,value2[, ...]],entry)

Parameters

mixed $args variadic

Data values

Returns

float|string —

The result, or a string containing an error

RANK()

RANK(int  $value, float[]  $valueSet, int  $order) : float|string

RANK.

Returns the rank of a number in a list of numbers.

Parameters

int $value

the number whose rank you want to find

float[] $valueSet

An array of, or a reference to, a list of numbers

int $order

Order to sort the values in the value set

Returns

float|string —

The result, or a string containing an error

RSQ()

RSQ(array  $yValues, array  $xValues) : float|string

RSQ.

Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's.

Parameters

array $yValues

Data Series Y

array $xValues

Data Series X

Returns

float|string —

The result, or a string containing an error

SKEW()

SKEW(array  ...$args) : float|string

SKEW.

Returns the skewness of a distribution. Skewness characterizes the degree of asymmetry of a distribution around its mean. Positive skewness indicates a distribution with an asymmetric tail extending toward more positive values. Negative skewness indicates a distribution with an asymmetric tail extending toward more negative values.

Parameters

array $args variadic

Data Series

Returns

float|string —

The result, or a string containing an error

SLOPE()

SLOPE(array  $yValues, array  $xValues) : float|string

SLOPE.

Returns the slope of the linear regression line through data points in known_y's and known_x's.

Parameters

array $yValues

Data Series Y

array $xValues

Data Series X

Returns

float|string —

The result, or a string containing an error

SMALL()

SMALL(mixed  ...$args) : float|string

SMALL.

Returns the nth smallest value in a data set. You can use this function to select a value based on its relative standing.

Excel Function: SMALL(value1[,value2[, ...]],entry)

Parameters

mixed $args variadic

Data values

Returns

float|string —

The result, or a string containing an error

STANDARDIZE()

STANDARDIZE(float  $value, float  $mean, float  $stdDev) : float|string

STANDARDIZE.

Returns a normalized value from a distribution characterized by mean and standard_dev.

Parameters

float $value

Value to normalize

float $mean

Mean Value

float $stdDev

Standard Deviation

Returns

float|string —

Standardized value, or a string containing an error

STDEV()

STDEV(mixed  ...$args) : float|string

STDEV.

Estimates standard deviation based on a sample. The standard deviation is a measure of how widely values are dispersed from the average value (the mean).

Excel Function: STDEV(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

The result, or a string containing an error

STDEVA()

STDEVA(mixed  ...$args) : float|string

STDEVA.

Estimates standard deviation based on a sample, including numbers, text, and logical values

Excel Function: STDEVA(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

STDEVP()

STDEVP(mixed  ...$args) : float|string

STDEVP.

Calculates standard deviation based on the entire population

Excel Function: STDEVP(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

STDEVPA()

STDEVPA(mixed  ...$args) : float|string

STDEVPA.

Calculates standard deviation based on the entire population, including numbers, text, and logical values

Excel Function: STDEVPA(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

STEYX()

STEYX(array  $yValues, array  $xValues) : float|string

STEYX.

Returns the standard error of the predicted y-value for each x in the regression.

Parameters

array $yValues

Data Series Y

array $xValues

Data Series X

Returns

float|string —

TDIST()

TDIST(float  $value, float  $degrees, float  $tails) : float|string

TDIST.

Returns the probability of Student's T distribution.

Parameters

float $value

Value for the function

float $degrees

degrees of freedom

float $tails

number of tails (1 or 2)

Returns

float|string —

The result, or a string containing an error

TINV()

TINV(float  $probability, float  $degrees) : float|string

TINV.

Returns the one-tailed probability of the chi-squared distribution.

Parameters

float $probability

Probability for the function

float $degrees

degrees of freedom

Returns

float|string —

The result, or a string containing an error

TREND()

TREND(array  $yValues, array  $xValues = [], array  $newValues = [], bool  $const = true) : array

TREND.

Returns values along a linear Trend

Parameters

array $yValues

Data Series Y

array $xValues

Data Series X

array $newValues

Values of X for which we want to find Y

bool $const

a logical value specifying whether to force the intersect to equal 0

Returns

array —

of float

TRIMMEAN()

TRIMMEAN(mixed  ...$args) : float|string

TRIMMEAN.

Returns the mean of the interior of a data set. TRIMMEAN calculates the mean taken by excluding a percentage of data points from the top and bottom tails of a data set.

Excel Function: TRIMEAN(value1[,value2[, ...]], $discard)

Parameters

mixed $args variadic

Data values

Returns

float|string —

VARFunc()

VARFunc(mixed  ...$args) : float|string

VARFunc.

Estimates variance based on a sample.

Excel Function: VAR(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

(string if result is an error)

VARA()

VARA(mixed  ...$args) : float|string

VARA.

Estimates variance based on a sample, including numbers, text, and logical values

Excel Function: VARA(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

(string if result is an error)

VARP()

VARP(mixed  ...$args) : float|string

VARP.

Calculates variance based on the entire population

Excel Function: VARP(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

(string if result is an error)

VARPA()

VARPA(mixed  ...$args) : float|string

VARPA.

Calculates variance based on the entire population, including numbers, text, and logical values

Excel Function: VARPA(value1[,value2[, ...]])

Parameters

mixed $args variadic

Data values

Returns

float|string —

(string if result is an error)

WEIBULL()

WEIBULL(float  $value, float  $alpha, float  $beta, bool  $cumulative) : float|string

WEIBULL.

Returns the Weibull distribution. Use this distribution in reliability analysis, such as calculating a device's mean time to failure.

Parameters

float $value
float $alpha

Alpha Parameter

float $beta

Beta Parameter

bool $cumulative

Returns

float|string —

(string if result is an error)

ZTEST()

ZTEST(float  $dataSet, float  $m0, float  $sigma = null) : float|string

ZTEST.

Returns the Weibull distribution. Use this distribution in reliability analysis, such as calculating a device's mean time to failure.

Parameters

float $dataSet
float $m0

Alpha Parameter

float $sigma

Beta Parameter

Returns

float|string —

(string if result is an error)

checkTrendArrays()

checkTrendArrays(mixed  $array1, mixed  $array2) : mixed

Parameters

mixed $array1
mixed $array2

Returns

mixed —

incompleteBeta()

incompleteBeta(mixed  $x, mixed  $p, mixed  $q) : float

Incomplete beta function.

Parameters

mixed $x

require 0<=x<=1

mixed $p

require p>0

mixed $q

require q>0

Returns

float —

0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow

logBeta()

logBeta(mixed  $p, mixed  $q) : float

The natural logarithm of the beta function.

Parameters

mixed $p

require p>0

mixed $q

require q>0

Returns

float —

0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow

betaFraction()

betaFraction(mixed  $x, mixed  $p, mixed  $q) : float

Evaluates of continued fraction part of incomplete beta function.

Based on an idea from Numerical Recipes (W.H. Press et al, 1992).

Parameters

mixed $x
mixed $p
mixed $q

Returns

float —

logGamma()

logGamma(mixed  $x) : mixed

Parameters

mixed $x

Returns

mixed —

incompleteGamma()

incompleteGamma(mixed  $a, mixed  $x) : mixed

Parameters

mixed $a
mixed $x

Returns

mixed —

gamma()

gamma(mixed  $data) : mixed

Parameters

mixed $data

Returns

mixed —

inverseNcdf()

inverseNcdf(mixed  $p) : mixed

Parameters

mixed $p

Returns

mixed —

betaFunction()

betaFunction(mixed  $a, mixed  $b) : mixed

Parameters

mixed $a
mixed $b

Returns

mixed —

regularizedIncompleteBeta()

regularizedIncompleteBeta(mixed  $value, mixed  $a, mixed  $b) : mixed

Parameters

mixed $value
mixed $a
mixed $b

Returns

mixed —

modeCalc()

modeCalc(mixed  $data) : mixed

Parameters

mixed $data

Returns

mixed —