Distribution functions

Ask how likely a value is under a familiar model, or what value a probability points to.

Syntax

Write the function's name and its arguments. Where an argument is cumulative, true gives the probability up to the value and false gives the probability at the value.

NORMDIST(x, mean, standard_dev, cumulative)
NORM.INV(probability, mean, standard_dev)
NORM.S.DIST(z, cumulative)
NORM.S.INV(probability)
STANDARDIZE(x, mean, standard_dev)
EXPON.DIST(x, lambda, cumulative)
POISSON.DIST(x, mean, cumulative)
BINOMDIST(successes, trials, probability, cumulative)
CONFIDENCE.NORM(alpha, standard_dev, size)
T.DIST(x, degrees_freedom, cumulative)
CHISQ.DIST(x, degrees_freedom, cumulative)
GAMMALN(x)
FISHER(x)
GAUSS(z)
PHI(x)
PERMUT(n, k)
BETADIST(x, alpha, beta, lower_bound, upper_bound)
BETAINV(probability, alpha, beta, lower_bound, upper_bound)
BINOM.DIST.RANGE(trials, probability_s, number_s, [number_s2])
BINOM.INV(trials, probability_s, alpha)
FISHERINV(y)
GAMMA(x)
GAMMA.DIST(x, alpha, beta, cumulative)
GAMMA.INV(probability, alpha, beta)
GAMMALN.PRECISE(x)
HYPGEOM.DIST(
  sample_s,
  number_sample,
  population_s,
  number_pop,
  cumulative
)
LOGNORMDIST(x, mean, standard_dev)
LOGNORM.INV(probability, mean, standard_dev)
PERMUTATIONA(number, number_chosen)
POISSON(x, mean, cumulative)
PROB(x_range, prob_range, lower_limit, [upper_limit])
WEIBULL(x, alpha, beta, cumulative)
WEIBULL.DIST(x, alpha, beta, cumulative)

Parameters and arguments

Arguments are written in brackets, separated by commas. An argument in square brackets is optional.

  • NORMDIST

    x

    Required: Yes
  • mean

    Required: Yes
  • standard_dev

    Required: Yes
  • cumulative

    Required: Yes
  • NORM.INV

    probability

    Required: Yes
  • mean

    Required: Yes
  • standard_dev

    Required: Yes
  • NORM.S.DIST

    z

    Required: Yes
  • cumulative

    Required: Yes
  • NORM.S.INV

    probability

    Required: Yes
  • STANDARDIZE

    x

    Required: Yes
  • mean

    Required: Yes
  • standard_dev

    Required: Yes
  • EXPON.DIST

    x

    Required: Yes
  • lambda

    Required: Yes
  • cumulative

    Required: Yes
  • POISSON.DIST

    x

    Required: Yes
  • mean

    Required: Yes
  • cumulative

    Required: Yes
  • BINOMDIST

    successes

    Required: Yes
  • trials

    Required: Yes
  • probability

    Required: Yes
  • cumulative

    Required: Yes
  • CONFIDENCE.NORM

    alpha

    Required: Yes
  • standard_dev

    Required: Yes
  • size

    Required: Yes
  • T.DIST

    x

    Required: Yes
  • degrees_freedom

    Required: Yes
  • cumulative

    Required: Yes
  • CHISQ.DIST

    x

    Required: Yes
  • degrees_freedom

    Required: Yes
  • cumulative

    Required: Yes
  • GAMMALN

    x

    Required: Yes
  • FISHER

    x

    Required: Yes
  • GAUSS

    z

    Required: Yes
  • PHI

    x

    Required: Yes
  • PERMUT

    n

    Required: Yes
  • k

    Required: Yes
  • BETADIST

    x

    Required: Yes
  • alpha

    Required: Yes
  • beta

    Required: Yes
  • lower_bound

    Required: Yes
  • upper_bound

    Required: Yes
  • BETAINV

    probability

    Required: Yes
  • alpha

    Required: Yes
  • beta

    Required: Yes
  • lower_bound

    Required: Yes
  • upper_bound

    Required: Yes
  • BINOM.DIST.RANGE

    trials

    Required: Yes
  • probability_s

    Required: Yes
  • number_s

    Required: Yes
  • number_s2

    Required: No
  • BINOM.INV

    trials

    Required: Yes
  • probability_s

    Required: Yes
  • alpha

    Required: Yes
  • FISHERINV

    y

    Required: Yes
  • GAMMA

    x

    Required: Yes
  • GAMMA.DIST

    x

    Required: Yes
  • alpha

    Required: Yes
  • beta

    Required: Yes
  • cumulative

    Required: Yes
  • GAMMA.INV

    probability

    Required: Yes
  • alpha

    Required: Yes
  • beta

    Required: Yes
  • GAMMALN.PRECISE

    x

    Required: Yes
  • HYPGEOM.DIST

    sample_s

    Required: Yes
  • number_sample

    Required: Yes
  • population_s

    Required: Yes
  • number_pop

    Required: Yes
  • cumulative

    Required: Yes
  • LOGNORMDIST

    x

    Required: Yes
  • mean

    Required: Yes
  • standard_dev

    Required: Yes
  • LOGNORM.INV

    probability

    Required: Yes
  • mean

    Required: Yes
  • standard_dev

    Required: Yes
  • PERMUTATIONA

    number

    Required: Yes
  • number_chosen

    Required: Yes
  • POISSON

    x

    Required: Yes
  • mean

    Required: Yes
  • cumulative

    Required: Yes
  • PROB

    x_range

    Required: Yes
  • prob_range

    Required: Yes
  • lower_limit

    Required: Yes
  • upper_limit

    Required: No
  • WEIBULL

    x

    Required: Yes
  • alpha

    Required: Yes
  • beta

    Required: Yes
  • cumulative

    Required: Yes
  • WEIBULL.DIST

    x

    Required: Yes
  • alpha

    Required: Yes
  • beta

    Required: Yes
  • cumulative

    Required: Yes

Examples

Deliveries average 100 minutes with a standard deviation of 10: the chance of one arriving within 85, how unusual 85 is and the time that 95 per cent of deliveries beat.

Return type and behaviour

Each function returns one value. The table shows its type, what it does and one way to write it; the examples use the functions in realistic statements.

FunctionReturnsBehaviourForm
NORMDISTdecimalThe normal distributionNORMDIST(1, 0, 1, false)
NORM.INVdecimalThe value for a cumulative probabilityNORM.INV(0.975, 0, 1)
NORM.S.DISTdecimalThe standard normal distributionNORM.S.DIST(0, true)
NORM.S.INVdecimalThe standard score for a cumulative probabilityNORM.S.INV(0.975)
STANDARDIZEdecimalThe standard score of the valueSTANDARDIZE(3, 2, 1)
EXPON.DISTdecimalThe exponential distributionEXPON.DIST(1, 2, true)
POISSON.DISTdecimalThe Poisson distributionPOISSON.DIST(2, 3, false)
BINOMDISTdecimalThe binomial distributionBINOMDIST(2, 5, 0.5, false)
CONFIDENCE.NORMdecimalThe margin of a confidence interval for a meanCONFIDENCE.NORM(0.05, 1, 100)
T.DISTdecimalThe Student t distributionT.DIST(1, 10, true)
CHISQ.DISTdecimalThe chi-squared distributionCHISQ.DIST(3, 2, true)
GAMMALNdecimalThe natural logarithm of the gamma functionGAMMALN(5)
FISHERdecimalThe Fisher transformationFISHER(0.5)
GAUSSdecimalThe probability that a standard normal value lies between 0 and zGAUSS(1)
PHIdecimalThe standard normal densityPHI(0)
PERMUTdecimalThe number of ordered arrangements of k items from nPERMUT(5, 2)
BETADISTdecimalThe cumulative beta distribution at xBETADIST(0.4, 2, 3, 0, 1)
BETAINVdecimalThe value with that chance to its left on the beta distributionBETAINV(0.5, 2, 3, 0, 1)
BINOM.DIST.RANGEdecimalThe chance of a number of successes within the rangeBINOM.DIST.RANGE(20, 0.3, 4, 8)
BINOM.INVwhole numberThe smallest number of successes whose cumulative chance reaches alphaBINOM.INV(20, 0.3, 0.9)
FISHERINVdecimalThe inverse of the Fisher transformationFISHERINV(0.5)
GAMMAdecimalThe gamma functionGAMMA(5)
GAMMA.DISTdecimalThe gamma distributionGAMMA.DIST(10, 2, 3, true)
GAMMA.INVdecimalThe value with that chance to its left on the gamma distributionGAMMA.INV(0.9, 2, 3)
GAMMALN.PRECISEdecimalThe natural logarithm of the gamma functionGAMMALN.PRECISE(5)
HYPGEOM.DISTdecimalThe chance of that many successes when drawing without replacementHYPGEOM.DIST(2, 5, 10, 50, false)
LOGNORMDISTdecimalThe cumulative lognormal distribution at xLOGNORMDIST(4, 3.5, 1.2)
LOGNORM.INVdecimalThe value with that chance to its left on the lognormal distributionLOGNORM.INV(0.9, 3.5, 1.2)
PERMUTATIONAdecimalThe arrangements of the chosen count when an item may repeat: the number raised to the countPERMUTATIONA(3, 2)
POISSONdecimalThe Poisson distribution. The same as POISSON.DISTPOISSON(2, 3.5, false)
PROBdecimalThe chance that a value falls in the rangePROB([1, 2, 3, 4], [0.1, 0.2, 0.3, 0.4], 2, 3)
WEIBULLdecimalThe Weibull distribution. The same as WEIBULL.DISTWEIBULL(100, 2, 120, true)
WEIBULL.DISTdecimalThe Weibull distribution, used for the time until something failsWEIBULL.DIST(100, 2, 120, true)
Errors and exceptions
ErrorWhat happenedHow to recover
HTQL-5001The function was given the wrong number of arguments. The message names the function and the countsGive it the arguments listed under Parameters
HTQL-1004 Unsupported functionThe name is not a function this engine runsCheck the name and its spelling against this entry
HTQL-1004A name was written in another spelling, for example NORM_DISTUse the name shown in this entry
HTQL-2001An argument is not a number, a standard deviation for STANDARDIZE is not above 0, FISHER is outside -1 to 1, GAMMALN is not above 0, or PERMUT chooses more than it hasPass numbers in range
HTQL-2002NORM.INV was given a probability outside 0 to 1 or a standard deviation that is not above 0Pass a probability from 0 to 1 and a positive deviation
Limitations
  • Argument names follow the engine's registry: for example NORMDIST and BINOMDIST have no dot, and NORM.INV and POISSON.DIST do.
  • A probability must be between 0 and 1, and a standard deviation above 0.
  • alpha in CONFIDENCE.NORM must be written as a decimal such as 0.05: a whole number is refused.
  • cumulative is true or false; the engine also reads 1 as true.
  • NORM.S.INV(0) answers 0 instead of refusing the probability. Keep the probability above 0 and below 1.
Permissions and security

These functions read nothing from your tables and write nothing.

When a function is applied to a column or a variable, the statement that reads the data needs read access, as its own entry says.

Best practices
  • Use NORM.S.INV or NORM.INV to turn a confidence level into a value.
  • Use the cumulative form for "at most" questions.