To learn more about EpiX Analytics' work, please visit our modeling applications, white papers, and training schedule.

Page tree


A list of all the public @RISK functions, which are grouped into three types:

Distribution functions

Functions that generate random values from probability distributions.


Returns values from a Beta distribution.

RiskBetaGeneral(a1,a2,min,max) returns values from a Beta(a1,a2) distribution that has been rescaled to run between the specified minimum and maximum.
RiskBetaGeneral(a1,a2,min,max) = RiskBeta(a1,a2)*(max-min)+ma

RiskBetaSubj(min, mode, mean, max) returns values from a Beta distribution that has been rescaled to run between the specified minimum and maximum. The Beta distribution values are determines such that the rescaled distribution has the required mode and mean. The idea is apparently to offer an option to model a subjective estimate by requiring four simple parameters. However, we have not fund any use for this function as it is extremely difficult to ask a person to estimate the distribution mean.

Returns values from a Binomial distribution.

Returns values from a Chi-Squared distribution.

Returns values from an Ascending Cumulative distribution.

Returns values from a Descending Cumulative distribution.

 Returns values from a Discrete distribution.

 Returns values from a Discrete uniform distribution.

Returns values from an Error Function distribution a special case of the Normal distribution:

RiskErf(h) = RiskNormal (0, \frac{1} {\sqrt{2h}})

 Returns values from an Erlang distribution a special case of the Gamma distribution:

RiskErlang(m,b) = RiskGamma(a,b)

the only difference being that the m parameter for the Erlang distribution is restricted to being an integer.

 Returns values from an Exponential distribution.

 Returns values from a Gumbel distribution for maximum observations, one of three Extreme Value distributions.

 Returns values from a Gamma distribution.

 Returns values from a General distribution.

 Returns values from a Histogram distribution.

 Returns values from a Hypergeometric distribution.

 Returns values from an Integer Uniform distribution.

 Returns values from an Inverse Gaussian distribution.

 Returns values from a Logistic distribution.

 Returns values from a Loglogistic distribution. Related to the logistic distribution.

 Returns values from a Lognormal distribution.

 Returns values from a Lognormal distribution where the parameters are the mean and standard deviation of the corresponding Normal distribution, i.e:

RiskLognorm2(m,s) = EXP(RiskNormal(m,s))

Returns values from a Negative Binomial distribution.

Returns values from a Normal distribution.

Returns values from a Pareto distribution.

Returns values from a shifted Pareto distribution:

RiskPareto2(a,q) = RiskPareto(q,a) a

 Returns values from a Pearson5 distribution.

 Returns values from a Pearson6 distribution.

 Returns values from a PERT distribution.

 Returns values from a Poisson distribution.

 Returns values from a Rayleigh distribution.

Resamples data under the following methods: based on the Sampling_method option:

  • RiskResample(1, Data) samples the Data range in order (i.e. from top row to bottom row)
  • RiskResample(2, Data) samples the Data range randomly, with replacement (identical to the Discrete Uniform distribution)
  • RiskResample(3, Data) samples the Data range randomly, without replacement

 Not strictly a distribution, this function works in conjunction with running multiple simulations.

 Returns values from a Student, or t- distribution.

 RiskTexpon(b,min,max) returns values from an Exponential distribution. with mean b truncated  to lie between min and max. The function is now redundant since the introduction of the RiskTruncate function:

RiskTexpon(5,1,12) = RiskExpon(5,RiskTruncate(1,12))


 RiskTlognorm(m,s,min,max) returns values from a Lognormal distribution with mean m and standard deviation s, truncated  to lie between min and max. The function is now redundant since the introduction of the RiskTruncate function:

RiskTlognorm(4,3,1,9) = RiskLognorm(4,3,Risktruncate(1,9))


 RiskTnormal(m,s,min,max) returns values from a Normal distribution with mean m and standard deviation s, truncated  to lie between min and max.


The function is now redundant since the introduction of the RiskTruncate function:

RiskTnormal(4,3,1,9) = RiskNormal(4,3,RiskTruncate(1,9))


 Returns values from a truncated Pareto2 distribution. The function is redundant, since:

RiskTpareto2(b,q,min,max) = RiskPareto2(b,q,RiskTruncate(min,max))

 Returns values from a Triangle distribution.

 RiskTrigen(low, mode, high, low percentile, high percentile) returns values from a Triangle distribution, where the user specifies low and high values (instead of the Triangs minimum and maximum values) and their cumulative percentiles. It is useful for modeling expert opinion where one wishes to avoid asking for absolute minimum and maximum values of the parameter, but be careful as the percentile parameters run from 0 to 100 (i.e. actual percents) not 0 to 1. For example, a Trigen(1,2,5,10,90) has a 10% chance of being below 1 and a 90% chance of being below 5:

Notice also that you should check whether the variable stays within a sensible range. We specified a low of 1, but the distribution extended to a negative value in this example.

 Returns values from a Uniform distribution.

 Returns values from a Weibull distribution.



Property functions

Functions that modify the way that @RISK generates and treats values from its distribution functions. These functions can often be strung together when set within a distributions parameters, for (a rather silly) example:


=RiskTriang(1, 2, 3, RiskName("Test"), RiskCollect(),RiskIndepC("X"),RiskShift(A1),RiskTruncate(1.4,))

is a Triang(1,2,3) distribution given the input label Test, locked at its mean value (i.e. 2), whose values are being collected for sensitivity analysis, that is the independent variable labeled X to be correlated with others, that is shifted along the x-axis by the value in Cell A1, and is also truncated to have a minimum of 1.4 & to give (when A1 = 23):


 Labels the @RISK distribution with which it is connected as one for which the generated values will be collected when the collect Inputs marked with Collect option is selected. The function can be implemented in two ways:

=RiskCollect()+RiskTriang(1,2,3)

or

=RiskTriang(1,2,3,RiskCollect())

The latter is preferable because it is gathered into one function. It also makes collecting two distributions in one cell easier:

=RiskTriang(1,2,3,RiskCollect())+RiskTriang(4,5,6,RiskCollect())

is less confusing than

=RiskCollect()+RiskTriang(1,2,3)+RiskCollect()+RiskTriang(4,5,6)

 RiskCorrmat(Matrix,column,instance) allows a distribution to be associated with a column of a correlation matrix so that rank order correlated values can be generated from several distributions. The optional instance parameter allows the same correlation matrix to be used several times in the one model. Examples of using RiskCorrmat function: Rank order correlation.

 A hidden @RISK function that used to be used, together with RiskIndep( ) to correlate distribution samples, but was found to have problems. However, it does have one use.

RiskDepC(Name,r) is used together with the RiskIndepC(Name) function to create a rank order correlation between simulated distributions. It correlates the distribution it is associated with to the distribution labeled Name by the RiskIndep function, with a correlation coefficient r (-1 ≤ r ≤ 1). In this way several distribution can be correlated to the one labeled with the RiskIndepC function. For example:

A1: =RiskTriang(1,2,3, RiskIndepC(Nails)) \\B1: =RiskPert(1,2,3, RiskDepC(Nails,0.7)) \\B2: =RiskNormal(100,10, RiskDepC(Nails,0.5))

This one-to-many correlation is very useful but there is no explicit control of the level of correlation between the dependent variables.

 A hidden @RISK function that used to be used, together with RiskDep( ) to correlate distribution samples, but was found to have problems. However, it does have one use.

This function is used together with the RiskIndep( ) function to create a rank order correlation between simulated distributions. The RiskIndepC(Name) function assigns a name to the distribution it is connected to (but solely for the purpose of correlation: it does not acquire a name that Excel would recognize). It is used in similar way to other label functions like RiskOutput( ):

=RiskIndepC(Name)+RiskTriang(1,2,3)

or

=RiskTriang(1,2,3, RiskIndepC(Name))

RiskLock(Value):

Sets the @RISK distribution to its mean value when value is left out or set to TRUE (not 1);

Sets the @RISK distribution to a random sample when the lock parameter value is set to FALSE (not 0);

Sets the @RISK distribution to the lock parameter value when value it is any number.


For example:

=RiskNormal(100,10,RiskLock()) returns a value of 100

=RiskNormal(100,10,RiskLock(TRUE)) returns a value of 100

=RiskNormal(100,10,RiskLock(FALSE)) returns a random value from the Normal(100,10)

=RiskNormal(100,10,RiskLock(17)) returns a value of 17

=RiskNormal(100,10,RiskLock(1)) returns a value of 1

=RiskNormal(100,10,RiskLock(0)) returns a value of 0

 Assigns a name to any distribution for purposes of recognition within @RISK.

RiskShift(value) simply shifts a distribution along the x-axis by the specified value. For example:


=RiskTriang(1,2,4,RiskShift(2)) = RiskTriang(3,4,6) = RiskTriang(1,2,4)+2

=RiskNormal(100,10,RiskShift(-50)) = RiskNormal(50,10) = RiskNormal(100,10)-50

Risktruncate(Min,Max) truncates a distribution to lie between the specified Min and Max values. It must obviously increase the probability of the remaining values to compensate. For example:


=RiskNormal(100,10,RiskTruncate(90,110))

truncates a Normal(100,10) distribution to lie between 90 and 110:


Statistics functions

Functions that report the simulation results within Excel cells. These functions are very useful, in combination with on-screen recalculation, to monitor some aspect of the simulation. They are also useful for automatically producing reports in Excel, though this can slow down you models.


 RiskCurrentIter() reports the current iteration of the simulation when running.

 RiskCurrentSim() reports the current simulation when running.

 RiskData(source,i,s)  reports the value generated for the source (cell reference, cell name or output name) for the ith iteration. Optionally, you may specify the sth simulation too. The model   RiskData gives examples.

RiskKurtosis(source,s) reports the kurtosis for the values generated for the source (cell reference, cell name or output name) so far in the simulation. Optionally, you may specify the sth simulation too.

RiskMax(source,s) reports the maximum of the values generated for the source (cell reference, cell name or output name) so far in the simulation. Optionally, you may specify the sth simulation too.

RiskMean(source,s) reports the average of the values generated for the source (cell reference, cell name or output name) so far in the simulation. Optionally, you may specify the sth simulation too.

RiskMin(source,s) reports the minimum of the values generated for the source (cell reference, cell name or output name) so far in the simulation. Optionally, you may specify the sth simulation too.

RiskMode(source,s) reports the mode of the values generated for the source (cell reference, cell name or output name) so far in the simulation. Optionally, you may specify the sth simulation too. This is only a reliable statistic for discrete sources.

Single output cell:

RiskOutput(Label) nominates the calculation in the cell as an @RISK output, optionally with the name Label, which can be either a cell address or text in . The function can be implemented in two ways:


=RiskTriang(1,2,3, RiskOutput(A21)) to make the Triang distribution an output with the name specified by the text in Cell A21


or


= RiskOutput(Tolerance) +A12^A16+C18 making the calculation an @RISK output wit the name Tolerance.


Output array:


RiskOutput(Label,Array,Position) is used as a group where each cell in a range to be named as an output starts with the RiskOutput(Label,Array,Position) function. The first parameter is optional and gives each cell in the array its individual label; the second parameter is the array name so @RISK will group these outputs under the one title, and can also offer a summary plot; the third parameter is the position within the array (1, 2, etc.).

RiskPercentile(source,P,s) reports for which of the values generated for the source (cell reference, cell name or output name) so far in the simulation, the fraction P are lower. Optionally, you may specify the sth simulation too.

RiskPercentileD(source,P,s) reports for which of the values generated for the source (cell reference, cell name or output name) so far in the simulation, the fraction P are higher. Optionally, you may specify the sth simulation too.

RiskRange(source,s) reports the range between the minimum and maximum of the values generated for the source (cell reference, cell name or output name) so far in the simulation. Optionally, you may specify the sth simulation too.

A function with 11 parameters that lets you produce a plot of the values generated from any spreadsheet Cell (it automatically adds the Cell as an output). The plot can be Excel or metafile format, and there are a number of formatting controls. Excellent if you wish to create an automated report.

RiskSkewness(source,s) reports the skewness of the values generated for the source (cell reference, cell name or output name) so far in the simulation. Optionally, you may specify the sth simulation too.

 RiskStdDev(source,s) reports the standard deviation of the values generated for the source (cell reference, cell name or output name) so far in the simulation. Optionally, you may specify the sth simulation too.

 RiskTarget(Data source, target X value, sim #) returns the cumulative probability for target value in the simulated distribution for the cell, output, or input.




  • No labels