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
Required: Yesx
Required: Yesmean
Required: Yesstandard_dev
Required: YescumulativeNORM.INV
Required: Yesprobability
Required: Yesmean
Required: Yesstandard_devNORM.S.DIST
Required: Yesz
Required: YescumulativeNORM.S.INV
Required: YesprobabilitySTANDARDIZE
Required: Yesx
Required: Yesmean
Required: Yesstandard_devEXPON.DIST
Required: Yesx
Required: Yeslambda
Required: YescumulativePOISSON.DIST
Required: Yesx
Required: Yesmean
Required: YescumulativeBINOMDIST
Required: Yessuccesses
Required: Yestrials
Required: Yesprobability
Required: YescumulativeCONFIDENCE.NORM
Required: Yesalpha
Required: Yesstandard_dev
Required: YessizeT.DIST
Required: Yesx
Required: Yesdegrees_freedom
Required: YescumulativeCHISQ.DIST
Required: Yesx
Required: Yesdegrees_freedom
Required: YescumulativeGAMMALN
Required: YesxFISHER
Required: YesxGAUSS
Required: YeszPHI
Required: YesxPERMUT
Required: Yesn
Required: YeskBETADIST
Required: Yesx
Required: Yesalpha
Required: Yesbeta
Required: Yeslower_bound
Required: Yesupper_boundBETAINV
Required: Yesprobability
Required: Yesalpha
Required: Yesbeta
Required: Yeslower_bound
Required: Yesupper_boundBINOM.DIST.RANGE
Required: Yestrials
Required: Yesprobability_s
Required: Yesnumber_s
Required: Nonumber_s2BINOM.INV
Required: Yestrials
Required: Yesprobability_s
Required: YesalphaFISHERINV
Required: YesyGAMMA
Required: YesxGAMMA.DIST
Required: Yesx
Required: Yesalpha
Required: Yesbeta
Required: YescumulativeGAMMA.INV
Required: Yesprobability
Required: Yesalpha
Required: YesbetaGAMMALN.PRECISE
Required: YesxHYPGEOM.DIST
Required: Yessample_s
Required: Yesnumber_sample
Required: Yespopulation_s
Required: Yesnumber_pop
Required: YescumulativeLOGNORMDIST
Required: Yesx
Required: Yesmean
Required: Yesstandard_devLOGNORM.INV
Required: Yesprobability
Required: Yesmean
Required: Yesstandard_devPERMUTATIONA
Required: Yesnumber
Required: Yesnumber_chosenPOISSON
Required: Yesx
Required: Yesmean
Required: YescumulativePROB
Required: Yesx_range
Required: Yesprob_range
Required: Yeslower_limit
Required: Noupper_limitWEIBULL
Required: Yesx
Required: Yesalpha
Required: Yesbeta
Required: YescumulativeWEIBULL.DIST
Required: Yesx
Required: Yesalpha
Required: Yesbeta
Required: Yescumulative
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.
| Function | Returns | Behaviour | Form |
|---|---|---|---|
NORMDIST | decimal | The normal distribution | NORMDIST(1, 0, 1, false) |
NORM.INV | decimal | The value for a cumulative probability | NORM.INV(0.975, 0, 1) |
NORM.S.DIST | decimal | The standard normal distribution | NORM.S.DIST(0, true) |
NORM.S.INV | decimal | The standard score for a cumulative probability | NORM.S.INV(0.975) |
STANDARDIZE | decimal | The standard score of the value | STANDARDIZE(3, 2, 1) |
EXPON.DIST | decimal | The exponential distribution | EXPON.DIST(1, 2, true) |
POISSON.DIST | decimal | The Poisson distribution | POISSON.DIST(2, 3, false) |
BINOMDIST | decimal | The binomial distribution | BINOMDIST(2, 5, 0.5, false) |
CONFIDENCE.NORM | decimal | The margin of a confidence interval for a mean | CONFIDENCE.NORM(0.05, 1, 100) |
T.DIST | decimal | The Student t distribution | T.DIST(1, 10, true) |
CHISQ.DIST | decimal | The chi-squared distribution | CHISQ.DIST(3, 2, true) |
GAMMALN | decimal | The natural logarithm of the gamma function | GAMMALN(5) |
FISHER | decimal | The Fisher transformation | FISHER(0.5) |
GAUSS | decimal | The probability that a standard normal value lies between 0 and z | GAUSS(1) |
PHI | decimal | The standard normal density | PHI(0) |
PERMUT | decimal | The number of ordered arrangements of k items from n | PERMUT(5, 2) |
BETADIST | decimal | The cumulative beta distribution at x | BETADIST(0.4, 2, 3, 0, 1) |
BETAINV | decimal | The value with that chance to its left on the beta distribution | BETAINV(0.5, 2, 3, 0, 1) |
BINOM.DIST.RANGE | decimal | The chance of a number of successes within the range | BINOM.DIST.RANGE(20, 0.3, 4, 8) |
BINOM.INV | whole number | The smallest number of successes whose cumulative chance reaches alpha | BINOM.INV(20, 0.3, 0.9) |
FISHERINV | decimal | The inverse of the Fisher transformation | FISHERINV(0.5) |
GAMMA | decimal | The gamma function | GAMMA(5) |
GAMMA.DIST | decimal | The gamma distribution | GAMMA.DIST(10, 2, 3, true) |
GAMMA.INV | decimal | The value with that chance to its left on the gamma distribution | GAMMA.INV(0.9, 2, 3) |
GAMMALN.PRECISE | decimal | The natural logarithm of the gamma function | GAMMALN.PRECISE(5) |
HYPGEOM.DIST | decimal | The chance of that many successes when drawing without replacement | HYPGEOM.DIST(2, 5, 10, 50, false) |
LOGNORMDIST | decimal | The cumulative lognormal distribution at x | LOGNORMDIST(4, 3.5, 1.2) |
LOGNORM.INV | decimal | The value with that chance to its left on the lognormal distribution | LOGNORM.INV(0.9, 3.5, 1.2) |
PERMUTATIONA | decimal | The arrangements of the chosen count when an item may repeat: the number raised to the count | PERMUTATIONA(3, 2) |
POISSON | decimal | The Poisson distribution. The same as POISSON.DIST | POISSON(2, 3.5, false) |
PROB | decimal | The chance that a value falls in the range | PROB([1, 2, 3, 4], [0.1, 0.2, 0.3, 0.4], 2, 3) |
WEIBULL | decimal | The Weibull distribution. The same as WEIBULL.DIST | WEIBULL(100, 2, 120, true) |
WEIBULL.DIST | decimal | The Weibull distribution, used for the time until something fails | WEIBULL.DIST(100, 2, 120, true) |
Errors and exceptions
| Error | What happened | How to recover |
|---|---|---|
HTQL-5001 | The function was given the wrong number of arguments. The message names the function and the counts | Give it the arguments listed under Parameters |
HTQL-1004 Unsupported function | The name is not a function this engine runs | Check the name and its spelling against this entry |
HTQL-1004 | A name was written in another spelling, for example NORM_DIST | Use the name shown in this entry |
HTQL-2001 | An 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 has | Pass numbers in range |
HTQL-2002 | NORM.INV was given a probability outside 0 to 1 or a standard deviation that is not above 0 | Pass a probability from 0 to 1 and a positive deviation |
Limitations
- Argument names follow the engine's registry: for example
NORMDISTandBINOMDISThave no dot, andNORM.INVandPOISSON.DISTdo. - A probability must be between 0 and 1, and a standard deviation above 0.
alphainCONFIDENCE.NORMmust be written as a decimal such as0.05: a whole number is refused.cumulativeistrueorfalse; 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.INVorNORM.INVto turn a confidence level into a value. - Use the cumulative form for "at most" questions.