##### Page tree
Go to start of banner

# Main @RISK Functions

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

### Distribution functions

Functions that generate random values from probability distributions.

RiskBeta

Returns values from a Beta distribution.

RiskBetaGeneral
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

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.

RiskBinomial

Returns values from a Binomial distribution.

RiskChisq

Returns values from a Chi-Squared distribution.

RiskCumul

Returns values from an Ascending Cumulative distribution.

RiskCumulD

Returns values from a Descending Cumulative distribution.

RiskDiscrete

Returns values from a Discrete distribution.

RiskDuniform

Returns values from a Discrete uniform distribution.

RiskErf

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

RiskErlang

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

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

RiskExpon

Returns values from an Exponential distribution.

RiskExtvalue

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

RiskGamma

Returns values from a Gamma distribution.

RiskGeneral

Returns values from a General distribution.

RiskHistogrm

Returns values from a Histogram distribution.

RiskHypergeo

Returns values from a Hypergeometric distribution.

RiskIntuniform

Returns values from an Integer Uniform distribution.

RiskInvgauss

Returns values from an Inverse Gaussian distribution.

RiskLogistic

Returns values from a Logistic distribution.

RiskLoglogistic

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

RiskLognorm

Returns values from a Lognormal distribution.

RiskLognorm2

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

RiskNegbin

Returns values from a Negative Binomial distribution.

RiskNormal

Returns values from a Normal distribution.

RiskPareto

Returns values from a Pareto distribution.

RiskPareto2

Returns values from a shifted Pareto distribution:

RiskPearson5

Returns values from a Pearson5 distribution.

RiskPearson6

Returns values from a Pearson6 distribution.

RiskPert

Returns values from a PERT distribution.

RiskPoisson

Returns values from a Poisson distribution.

RiskRayleigh

Returns values from a Rayleigh distribution.

RiskResample

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

RiskSimtable

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

RiskStudent

Returns values from a Student, or t- distribution.

RiskTexpon

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: RiskTlognorm

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: RiskTnormal

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: RiskTpareto2

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

RiskTriang

Returns values from a Triangle distribution.

RiskTrigen

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.

RiskUniform

Returns values from a Uniform distribution.

RiskWeibull

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:

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): RiskCollect

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:

or

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

is less confusing than

RiskCorrmat

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.

RiskDep

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

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:

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

RiskIndep

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.

RiskIndepC

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( ):

or

RiskLock

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

RiskName

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

RiskShift

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

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:

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

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

RiskCurrentSim

RiskCurrentSim() reports the current simulation when running.

RiskData

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

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

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

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

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

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.

RiskOutput

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

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

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

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.

RiskResultsGraph

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

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

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

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