@RISK
Risk Analysis and Simulation
Add-In for Microsoft Excel
Version 6
July, 2012
Palisade Corporation
798 Cascadilla St.
Ithaca, NY USA 14850
(607) 277-8000
(607) 277-8001 (fax)
http://www.palisade.com (website)
sales@palisade.com (e-mail)
Copyright Notice
Copyright 2012, Palisade Corporation.
Trademark Acknowledgments
Microsoft, Excel and Windows are registered trademarks of Microsoft Corporation.
IBM is a registered trademark of International Business Machines, Inc.
Palisade, TopRank, BestFit and RISKview are registered trademarks of Palisade
Corporation.
RISK is a trademark of Parker Brothers, Division of Tonka Corporation and is used under
license.
Welcome
@RISK for Microsoft Excel
Welcome to @RISK, the revolutionary software system for the
analysis of business and technical situations impacted by risk! The
techniques of Risk Analysis have long been recognized as powerful
tools to help decision-makers successfully manage situations subject
to uncertainty. Their use has been limited because they have been
expensive, cumbersome to use, and have substantial computational
requirements. However, the growing use of computers in business
and science has offered the promise that these techniques can be
commonly available to all decision-makers.
That promise has been finally realized with @RISK (pronounced at
risk) a system which brings these techniques to the industry
standard spreadsheet package, Microsoft Excel. With @RISK and
Excel any risky situation can be modeled, from business to science
and engineering. You are the best judge of what your analysis needs
require, and @RISK, combined with the modeling capabilities of
Excel, allows you to design a model which best satisfies those needs.
Anytime you face a decision or analysis under uncertainty, you can
use @RISK to improve your picture of what the future could hold.
Modeling Features
As an add-in to Microsoft Excel, @RISK links directly to Excel to
add Risk Analysis capabilities. The @RISK system provides all the
necessary tools for setting up, executing and viewing the results of
Risk Analyses. And @RISK works in a style you are familiar with
Excel style menus and functions.
@RISK allows you to define uncertain cell values in Excel as
@RISK
probability distributions using functions. @RISK adds a set of new
Functions
functions to the Excel function set, each of which allows you to
specify a different distribution type for cell values. Distribution
functions can be added to any number of cells and formulas
throughout your worksheets and can include arguments which are
cell references and expressions allowing extremely sophisticated
specification of uncertainty. To help you assign distributions to
uncertain values, @RISK includes a graphical pop-up window where
distributions can be previewed and added to formulas.
The probability distributions provided by @RISK allow the
Probability
specification of nearly any type of uncertainty in cell values in your
Distributions
spreadsheet. A cell containing the distribution function
NORMAL(10,10), for example, would return samples during a
simulation drawn from a normal distribution (mean = 10, standard
deviation = 10). Distribution functions are only invoked during a
simulation in normal Excel operations, they show a single cell
value just the same as Excel before @RISK.
All distributions may be truncated to allow only samples within a
given ranges of values within the distribution. Also, many
distributions can also use alternate percentile parameters. This allows
you to specify values for specific percentile locations of an input
distribution as opposed to the traditional arguments used by the
distribution.
@RISK has sophisticated capabilities for specifying and executing
@RISK
simulations of Excel models. Both Monte Carlo and Latin Hypercube
Simulation
Analysis sampling techniques are supported, and distributions of possible
results may be generated for any cell or range of cells in your
spreadsheet model. Both simulation options and the selection of
model outputs are entered with Windows style menus, dialog boxes
and use of the mouse.
High resolution graphics are used to present the output distributions
Graphics
from your @RISK simulations. Histograms, cumulative curves and
summary graphs for cell ranges all lead to a powerful presentation of
results. And all graphs may be displayed in Excel for further
enhancement and hard copy. An essentially unlimited number of
output distributions may be generated from a single simulation
allowing for the analysis of even the largest and most complex
spreadsheets!
The options available for controlling and executing a simulation in
Advanced
@RISK are among the most powerful ever available. They include:
Simulation
Capabilities Latin Hypercube or Monte Carlo sampling
Any number of iterations per simulation
Any number of simulations in a single analysis
Animation of sampling and recalculation of the spreadsheet
Seeding the random number generator
Real time results and statistics during a simulation
Table of Contents v
@RISK graphs a probability distribution of possible results for each
High Resolution output cell selected in @RISK. @RISK graphics include:
Graphic
Displays Relative frequency distributions and cumulative probability
curves
Summary graphs for multiple distributions across cell ranges
(for example, a worksheet row or column)
Statistical reports on generated distributions
Probability of occurrence for target values in a distribution
Export of graphics as Windows metafiles for further
enhancement
Execution time is of critical importance because simulation is
Product
extremely calculation intensive. @RISK is designed for the fastest
Execution
Speed possible simulations through the use of advanced sampling
techniques.
Table of Contents
Introduction .........................................................................................3
Quick Start...........................................................................................9
Introduction .......................................................................................15
@RISK Icons 81
Model Commands 91
Define Distributions..........................................................................91
RISKOptimizer 311
Introduction .....................................................................................397
Project 425
Library 485
Introduction .....................................................................................485
Introduction .....................................................................................527
Welcome.......................................................................................... 835
What is Sampling?..........................................................................857
Readings by Category....................................................................889
Table of Contents xi
xii @RISK for Microsoft Excel
Getting Started
Introduction .........................................................................................3
About This Version .................................................................................3
Working with your Operating Environment ......................................3
If You Need Help .....................................................................................3
@RISK System Requirements................................................................5
Installation Instructions .....................................................................6
General Installation Instructions ..........................................................6
The DecisionTools Suite.........................................................................6
Setting Up the @RISK Icons or Shortcuts............................................7
Macro Security Warning Message on Startup ....................................7
Software Activation ............................................................................8
Quick Start...........................................................................................9
On-line Videos .........................................................................................9
Starting On Your Own ............................................................................9
Quick Start with Your Own Spreadsheets ........................................10
Using @RISK 6 Spreadsheets in @RISK 3.5 or earlier.....................11
Using @RISK 6 Spreadsheets in @RISK 4.0 ......................................11
Using @RISK 6 Spreadsheets in @RISK 4.5 ......................................11
Using @RISK 6 Spreadsheets in @RISK 5 .........................................12
Getting Started 1
2 @RISK for Microsoft Excel
Introduction
About This Version
This version of @RISK can be used with Microsoft Excel 2003 or higher.
Getting Started 3
Contacting Palisade Corporation welcomes your questions, comments or suggestions
Palisade regarding @RISK. Contact our technical support staff using any of the
following methods:
Email us at support@palisade.com
Telephone us at (607) 277-8000 any weekday from 9:00 AM to 5:00 PM,
EST. Follow the prompt to reach Technical Support
Fax us at (607) 277-8001.
Mail us a letter to:
Technical Support
Palisade Corporation
798 Cascadilla St
Ithaca, NY 14850
USA
If you want to contact Palisade Europe:
Email us at support@palisade-europe.com
Telephone us at +44 1895425050 (UK).
Fax us at +44 1895425051(UK).
Mail us a letter to:
Palisade Europe
31 The Green
West Drayton
Middlesex
UB7 7PN
United Kingdom
If you want to contact Palisade Asia-Pacific:
Email us at support@palisade.com.au
Telephone us at + 61 2 9252 5922 (AU).
Fax us at + 61 2 9252 2820(AU).
Mail us a letter to:
Palisade Asia-Pacific Pty Limited
Suite 404, Level 4
20 Loftus Street
Sydney NSW 2000
Australia
4 Introduction
Regardless of how you contact us, please include the product name, exact
version and serial number. The exact version can be found by selecting the
Help About command on the @RISK menu in Excel.
Student
Telephone support is not available with the student version of @RISK. If
Versions
you need help, we recommend the following alternatives:
Consult with your professor or teaching assistant.
Log-on to http://www.palisade.com for answers to frequently asked
questions.
Contact our technical support department via e-mail or fax.
Getting Started 5
Installation Instructions
General Installation Instructions
The Setup program copies the @RISK system files into a directory you
specify on your hard disk. To run the Setup program in Windows XP or
higher:
1) Double-click the RISK Setup.exe from your download or installation CD
and follow the Setup instructions on the screen
If you encounter problems while installing @RISK, verify that there is
adequate space on the drive to which youre trying to install. After youve
freed up adequate space, try rerunning the installation.
Removing If you wish to remove @RISK from your computer, use the Control Panels
@RISK from Add/Remove Programs utility and select the entry for @RISK.
Your Computer
The DecisionTools Suite
@RISK for Excel is a member of the DecisionTools Suite, a set of products for
risk and decision analysis described in Appendix D: Using @RISK With
Other DecisionTools. The default installation procedure of @RISK puts
@RISK in a subdirectory of a main Program Files\Palisade directory. This
is quite similar to how Excel is often installed into a subdirectory of a
Microsoft Office directory.
One subdirectory of the Program Files\Palisade directory will be the @RISK
directory (by default called RISK6). This directory contains the program
files plus example models and other files necessary for @RISK to run.
Another subdirectory of Program Files\Palisade is the SYSTEM directory
which contains files which are needed by every program in the
DecisionTools Suite, including common help files and program libraries.
6 Installation Instructions
Setting Up the @RISK Icons or Shortcuts
The @RISK setup program automatically creates an @RISK command in the
Creating the
Programs menu of the Taskbar. However, if problems are encountered
Shortcut in the
Windows during Setup, or if you wish to do this manually another time, follow these
Taskbar directions.
1) Click the Start button, and then point to Settings.
2) Click Taskbar, and then click the Start Menu Programs tab.
3) Click Add, and then click Browse.
4) Locate the file RISK.EXE and double click it.
5) Click Next, and then double-click the menu on which you want the
program to appear.
6) Type the name @RISK, and then click Finish.
Getting Started 7
Software Activation
Activation is a one time license verification process that is required in order
for your Palisade software to run as a fully licensed product. An activation
ID is on your printed/emailed invoice and may resemble a dash separated
sequence like "DNA-6438907-651282-CDM". If you enter your Activation ID
during installation, then your software is activated at the end of the
installation process and no further user action is required. If you wish to
activate your software after installation, select the Help menu License
Manager command.
The License Manager can be used to activate, deactivate and move software
licenses. It is also used to manage licenses for network installations. Follow
the prompts and dialogs in the License Manager to perform the desired
licensing operation.
8 Software Activation
Quick Start
On-line Videos
In the available on-line videos, @RISK experts guide you through sample
models in movie format. These tutorials are multi-media presentations on
the main features of @RISK.
Videos can be selected and run using the @RISK Videos command.
Getting Started 9
Quick Start with Your Own Spreadsheets
Working through the @RISK On-Line Tutorial and reading the @RISK
Reference Guide is the best method for preparing to use @RISK on your
own spreadsheets. However, if you're in a hurry, or just don't want to work
through the Tutorial, here is a quick step-by-step guide to using @RISK with
your own spreadsheets:
1) Click the @RISK icon in the Windows Start Programs Palisade
DecisionTools group.
2) If necessary, use the Excel Open command to open your spreadsheet
3) Examine your spreadsheet and locate those cells where uncertain
assumptions or inputs are located. You will substitute @RISK distribution
functions for these values.
4) Enter distribution functions for the uncertain inputs which reflect the
range of possible values and their likelihood of occurrence. Start with the
simple distribution types such as UNIFORM, which just requires a
minimum and maximum possible value, or TRIANG which just requires a
minimum, most likely and maximum possible value.
5) Once you've entered your distributions, select the spreadsheet cell or cells
for which you wish to get simulation results and click the Add Output
icon the one with the single red arrow on the @RISK Toolbar.
To run a simulation:
Click the Start Simulation icon the one with the red distribution
curve on the @RISK Toolbar. A simulation of your spreadsheet will be
executed and results displayed.
10 Quick Start
Using @RISK 6 Spreadsheets in @RISK 3.5 or earlier
@RISK 6 spreadsheets can only be used in @RISK 3.5 or earlier when the
simple forms of distribution functions are used. In the simple distribution
function format only required distribution parameters can be used. No new
@RISK 5 or 6 distribution property functions can be added. In addition,
RiskOutput functions must be removed and outputs reselected when
simulating in @RISK 3.5.
Getting Started 11
Using @RISK 6 Spreadsheets in @RISK 5
@RISK 6 spreadsheets can be used directly in @RISK 5 with the following
exceptions:
The Distribution property function RiskIsDate specific to @RISK
5.5 and 6 will return #NAME? in @RISK 5.
Other new functions specific to @RISK 6 such as
RiskExtremeValMin, RiskF, RiskLevy and others will return
#NAME? in @RISK 5.
12 Quick Start
An Overview of Risk Analysis
Introduction .......................................................................................15
Characteristics of Risk
Risk derives from our inability to see into the future, and indicates a degree
of uncertainty that is significant enough to make us notice it. This
somewhat vague definition takes more shape by mentioning several
important characteristics of risk.
Firstly, risk can be either objective or subjective. Flipping a coin is an
objective risk because the odds are well known. Even though the outcome
is uncertain, an objective risk can be described precisely based on theory,
experiment, or common sense. Everyone agrees with the description of an
objective risk. Describing the odds for rain next Thursday is not so clear cut,
and represents a subjective risk. Given the same information, theory,
computers, etc., weatherman A may think the odds of rain are 30% while
weatherman B may think the odds are 65%. Neither is wrong. Describing a
subjective risk is open-ended in the sense that you could always refine your
assessment with new information, further study, or by giving weight to the
opinion of others. Most risks are subjective, and this has important
implications for anyone analyzing risk or making decisions based on a Risk
Analysis.
18 What Is Risk?
Risks for Investment in Exploration for Oil and Minerals Will
anything be found? If a deposit is found, will it be uneconomical, or a
bonanza? Will the costs of developing the deposit be as forecast? Will
some political event like an embargo, tax reform, or new environmental
regulations drastically alter the economic viability of the project?
Risks for Policy Planning If the policy is subject to legislative
approval, will it be approved? Will the level of compliance with any policy
directives be complete or partial? Will the costs of implementation be as
forecast? Will the level of benefits be what you projected?
20 What Is Risk?
What Is Risk Analysis?
In a broad sense, Risk Analysis is any method qualitative and/or
quantitative for assessing the impacts of risk on decision situations.
Numerous techniques are used that blend both qualitative and quantitative
techniques. The goal of any of these methods is to help the decision-maker
choose a course of action, to enable a better understanding of the possible
outcomes that could occur.
Risk Analysis in @RISK is a quantitative method that seeks to determine the
outcomes of a decision situation as a probability distribution. In general,
the techniques in an @RISK Risk Analysis encompass four steps:
1. Developing a Model by defining your problem or situation in Excel
worksheet format
2. Identifying Uncertainty in variables in your Excel worksheet and
specifying their possible values with probability distributions, and
identifying the uncertain worksheet results you want analyzed
3. Analyzing the Model with Simulation to determine the range and
probabilities of all possible outcomes for the results of your worksheet
4. Making a Decision based on the results provided and personal
preferences
@RISK helps with the first three steps, by providing a powerful and flexible
tool that works with Excel to facilitate model building and Risk Analysis.
The results that @RISK generates can then be used by the decision-maker to
help choose a course of action.
Fortunately, the techniques @RISK employs in a Risk Analysis are very
intuitive. As a result, you won't have to accept our methodology on faith,
and you won't have to shrug your shoulders and resort to calling @RISK a
black box when your colleagues and superiors query you as to the nature
of your Risk Analysis. The following discussion will give you a firm
understanding of just what @RISK needs from you in the way of a model,
and how an @RISK Risk Analysis proceeds.
Variables
Variables are the basic elements in your Excel worksheets that you have
identified as being important ingredients to your analysis. If you are
modeling a financial situation, your variables might be things like Sales,
Costs, Revenues or Profits, whereas if you are modeling a geologic situation
your variables might be things like Depth to Deposit, Thickness of Coal
Seam or Porosity. Each situation has its own variables, identified by you. In
a typical worksheet, a variable labels a worksheet row or column, for
example:
Certain or You may know the values your variables will take in the time frame of your
Uncertain model they are certain, or what statisticians call deterministic.
Conversely, you may not know the values they will take they are
uncertain, or stochastic. If your variables are uncertain you will need to
describe the nature of their uncertainty. This is done with probability
distributions, which give both the range of values that the variable could
take (minimum to maximum), and the likelihood of occurrence of each
value within the range. In @RISK, uncertain variables and cell values are
entered as probability distribution functions, for example:
RiskNormal(100,10)
RiskUniform(20,30)
RiskExpon(A1+A2)
RiskTriang(A3/2.01,A4,A5)
These distribution functions can be placed in your worksheet cells and
formulas just like any other Excel function.
Output Variables
Any model needs both input values and output results, and a Risk Analysis
model is no different. An @RISK Risk Analysis generates results on cells in
your Excel worksheet. Results are probability distributions of the possible
values which could occur. These results are usually the same worksheet
cells that give you the results of a regular Excel analysis profit, the
bottom line or other such worksheet entries.
Simulation
@RISK uses simulation, sometimes called Monte Carlo simulation, to do a
Risk Analysis. Simulation in this sense refers to a method whereby the
distribution of possible outcomes is generated by letting a computer
recalculate your worksheet over and over again, each time using different
randomly selected sets of values for the probability distributions in your cell
values and formulas. In effect, the computer is trying all valid combinations
of the values of input variables to simulate all possible outcomes. This is
just as if you ran hundreds or thousands of what-if analyses on your
worksheet, all in one sitting.
What is meant by saying that simulation tries all valid combinations of the
values of input variables? Suppose you have a model with only two input
variables. If there is no uncertainty in these variables, you can identify a
single possible value for each variable. These two single values can be
combined by your worksheet formulas to calculate the results of interest
also a certain or deterministic value. For example, if the certain input
variables are:
Revenues = 100
Costs = 90
then the result:
Profits = 10
would be calculated by Excel from:
Profits = 100 90
There is only one combination of the input variable values, because there is
only one value possible for each variable.
Now consider a situation where there is uncertainty in both input variables.
For example,
Revenues = 100 or 120
Costs = 90 or 80
gives two values for each input variable. In a simulation, @RISK would
consider all possible combinations of these variable values to calculate
possible values for the result, Profits.
-10 0 10
B
90 100 110
90 100 110
90 100 110
90 100 110
F
90 100 110
Skewness
A simulation output distribution can also show skewness, that is how much
the distribution of possible results deviates from being symmetrical.
Suppose your distribution had a large positive 'tail'. If you saw only a
single number for the expected result, you might not realize the possibility
of a highly positive outcome that could occur in the tail. Skewness such as
this can be very important to decision makers. By presenting all the
information, @RISK opens up a decision by showing you all possible
outcomes.
@RISK Toolbars An @RISK toolbar is added to Excel 2003 and also an @RISK ribbon bar to
Excel 2007 and higher. The icons and commands on these bars allow you to
quickly access most @RISK options.
@RISK In @RISK, probability distributions are entered directly into your worksheet
Distribution formulas using custom distribution functions. These new functions, each of
Functions which represents a type of probability distribution (such as NORMAL or
BETA), are added to your spreadsheets functions set by @RISK. When
entering a distribution function you enter both the function name, such as
RiskTriang a triangular distribution and the arguments which
describe the shape and range of the distribution, such as RiskTriang
(10,20,30), where 10 is the minimum value, 20 the most likely value and 30
the maximum value.
Distribution functions may be used anywhere in your spreadsheet that there
is uncertainty about the value being used. The @RISK functions may be
used just as you would use any normal spreadsheet functions including
them in mathematical expressions and having cell references or formulas as
arguments.
In addition, any report window can be exported to an Excel sheet where you
can access its values with formulas.
Define All entries made in the Define Distribution Window are converted to
Distribution distribution functions that are placed in your spreadsheet. For example, the
Window and distribution function created by the entries in the window displayed here
Resulting would be:
Functions in
Excel =RiskNormal(3000,1000,RiskTruncate(1000,5000))
Thus, all the distribution arguments that are assigned through the Define
Distribution window can also be entered directly in the distribution itself.
In addition, all arguments can be entered as cell references or as formulas,
as are standard Excel functions.
It often helps to first use the Define Distribution window to enter your
distribution functions to better understand how to assign values to function
arguments. Then, once you better understand the syntax of distribution
function arguments, you can enter the arguments yourself directly in Excel,
bypassing the Define Distribution window.
Fitting Options A variety of options are available for controlling the fitting process. Specific
distributions can be selected to fit. In addition, input data can be in the form
of sample, density or cumulative data. You can also filter your data prior to
fitting.
Placing a Fit Clicking Write to Cell places a fit result in your model as a new distribution
Result in Excel function. Selecting Update and Refit at the Start of Each Simulation causes
@RISK, at the start of each simulation, to automatically refit your data when
it has changed, and place the new resulting distribution function in your
model.
Placing Inputs Inputs in the Model Window can be grouped by category. By default, a
in Categories category is made when a group of inputs share the same row (or column)
name. In addition, inputs can be placed in any category you wish.
Targets
Target values can be calculated on simulation results. A target shows the
probability of achieving a specific outcome or the value associated with any
probability level. Using targets you can answer questions such as What is
the chance of a result greater than one million? or What is the chance of a
negative outcome?. Targets can be entered in the Detailed Statistics
window, the @RISK Results Summary window, and set directly using
delimiters on graphs of simulation results.
By entering a desired target such as 1% for an output in the @RISK
Results Summary Window and copying it across all outputs, you can
quickly see the same target calculated for all simulation results.
Summary Trend A Summary graph displays how risk changes across a range of output or
Graphs input cells. You can create a summary graph for an output range, or select
individual inputs or outputs to compare in a summary graph. Summary
graphs have two forms Summary Trend graphs and Summary Box Plot
graphs. Each of these graphs can be made by:
Clicking the Summary Graph icon at the bottom of a graph window
and then selecting the cell(s) in Excel whose results you want to
include in the graph.
Selecting the rows in the @RISK Results Summary Window for the
outputs, or inputs, you wish to include in the summary graph, then
clicking the Summary Graph icon at the bottom of the window (or
right-clicking in the table), and selecting Summary Trend or
Summary Box Plot.
A Summary Trend graph is especially useful in displaying trends such as
how risk changes across time. If, for example, a range of 10 output cells
contained Profit in years 1 through 10 of a project, the Summary Trend
In the Scatter Plot Matrix, ranked scenario analysis results are displayed
with scatter plots. To show the Scatter Plot Matrix, click the Scatter Plot icon
in the lower left of the Scenarios window.
Scenarios Scenario analysis results are graphically displayed in tornado graphs. A
Tornado Graph tornado graph can be generated by clicking the Tornado graph icon in the
Scenarios window or clicking the Scenarios icon on a graph window. This
tornado graph shows the key inputs affecting the output when the output
meets the entered scenario, such as when the output is above its 90th
percentile.
@RISK Icons 81
Display current output cell(s) along with all
distribution functions entered in the worksheet in
the @RISK Model window
Location: Model group, Model Window
Performs an optimization
Location: Tools group, RISKOptimizer
@RISK Icons 83
Colors cells with @RISK functions
Location: Tools group, Help
Open Application Settings, Show Window Panel,
Open Simulation File, Clear @RISK Data, Unload
@RISK Add-In
Location: Tools group, Utilities
Display @RISK Help
Location: Tools group, Help
@RISK Icons 85
Browse results in the current worksheet(s)
Command equivalent: Results commands Browse Results command
Display Results Summary window
Command equivalent: Results commands Results Summary
Window command
Filter results
Command equivalent: Results commands Define Filters command
Display detailed statistics window
Command equivalent: Results commands Detailed Statistics
command
Display data window
Command equivalent: Results commands Data command
Display sensitivity analysis window
Command equivalent: Results commands Sensitivity command
Display scenario analysis window
Command equivalent: Results commands Scenarios command
Performs an advanced analysis
Command equivalent: Tools commands Advanced Analyses
commands
Performs an optimization
Command equivalent: Tools commands RISKOptimizer commands
Work with Time Series functions
Command equivalent: Tools commands Time Series commands
Develop simulation models for project schedules
Command equivalent: Tools commands Project commands
Display @RISK Library
Command equivalent: Tools commands Library commands
Colors cells with @RISK functions
Location: Help commands Color Cells command
@RISK Icons 87
Settings @RISK Toolbar (Excel 2003)
The following icons are shown on the @RISK Settings toolbar in Excel.
@RISK Icons 89
Zooms in on a region of a graph
Command equivalent: None
Resets zoom to default scaling
Command equivalent: None
Changes a floating graph to a graph attached to the cell it
references
Command equivalent: None
@RISK MiniToolbar
The @RISK MiniToolbar is a popup toolbar that can be used to quickly
create @RISK graphs and enter probability distributions. The MiniToolbar
is displayed by pressing the left mouse button while making a selection in
Excel.
Define Distributions
Define Distributions Command
Defines or edits probability distributions entered in the current
cell formula
The Define Distributions command displays the Define Distribution pop-up
window. Using this window, probability distributions can be assigned to
values contained in the formula of the selected cell. This window also
allows you to edit distributions already present in a cells formula.
The @RISK Define Distribution window graphically displays probability
distributions which can be substituted for values in the formula in the
current cell. By changing the displayed distribution you can see how
various distributions would describe the range of possible values for an
uncertain input in your model. The displayed statistics also shows how a
distribution defines an uncertain input.
The graphical display of an uncertain input is useful in showing your
definition of risk to others. It clearly displays the range of possible values
for an input, and the relative probability of any value in the range occurring.
Working with distribution graphs you can easily incorporate other
individual assessments of uncertainty into your risk analysis models.
Model Commands 91
Define Clicking the Define Distributions icon displays the Define Distribution
Distribution window. As you click on different cells in your spreadsheet, the Define
Window Distribution window updates to show the formula for each cell you select.
Press <Tab> to move the window among cells with distributions in open
workbooks.
All changes and edits made are added directly to the cells formula when
you 1) click on another cell to move the Define Distribution window to that
formula or 2) click OK to close the window.
The Define Distribution window has a Primary curve i.e. the one for the
function entered in the cell formula and up to ten Overlay curves,
representing other distributions that you may wish to graphically display
on top of the Primary curve. Overlays are added by clicking the Add
Overlay icon at the bottom of the window.
92 Define Distributions
Contents of
the Define
Distribution
Window
The different elements of the Define Distribution window are as follows:
Name. Displays the default name that @RISK has identified for the
cell. By clicking the Reference Entry icon (the icon after the name),
you can select an alternate cell in Excel that contains the name to
use. Alternatively, simply type a name.
Cell Formula. Displays the current cell formula including any
@RISK distribution functions. This formula may be edited here just
as in Excel. The text shown in red and underlined is the distribution
that is graphed.
Select Distribution. Adds the currently selected distribution in the
Distribution Palette. For the shortcut to Select Distribution
double-click on the distribution you wish to use from the displayed
Distribution Palette.
Make Favorite. Adds the currently selected distribution in the
Distribution Palette to the Favorites tab in the Palette.
Splitter Bar. To make the Cell Formula box larger or smaller, move
the splitter bar, up and down, between the Cell Formula box and
the graph.. To make the Distribution Argument panel larger, move
the splitter bar, left and right, between the panel and the graph .
Delimiters and Statistics are used to display underlying statistics on
displayed distribution graphs:
Delimiters. Delimiters allow setting of target probabilities and x-
axis scaling using the mouse. Cumulative probabilities can be set
directly on a distribution graph using the displayed probability
delimiters. Dragging probability delimiters changes left and right x
and p values, shown in the probability bar, above the graph.
Dragging the delimiters, at either end of the x-axis, rescales the x-
axis.
Statistics. The statistics displayed for the graphed distributions,
including any overlays, can be selected in the Legends tab of the
Graph Options dialog. To display this dialog, click the Graph
Options dialog icon in the bottom left of the window.
Distribution
To assign a distribution to a specific value in the Cell Formula, simply click
Palette
on it to select it (the value turns blue), then double-click the distribution you
wish to use from the displayed Distribution Palette.
Model Commands 93
Changing the To change the distribution used in the formula, click the Replace
Distribution Distribution in Formula button at the bottom of the window and select or
Using the double-click the distribution you want to change to from the Palette.
Palette
94 Define Distributions
The small version of the Palette contains additional icons at the bottom that
allow you to delete all overlays, make favorites to be shown on the Favorites
tab or select a distribution you wish to use from a cell in Excel.
Adding To add overlays to a displayed distribution graph, click the Add Overlay
Overlays Using icon at the bottom of the window.
the Palette
Model Commands 95
Argument values can be entered in the Distribution Argument panel, or
Distribution
Argument Panel typed directly in the shown formula. This panel is displayed to the left of
the graph. Spinner buttons allow you to quickly change a parameter value.
If you have Overlays, the Distribution Argument panel allows you to switch
between entering arguments for the Primary curve and any of the overlays.
96 Define Distributions
- Selecting Truncation Limits will put an entry for Trunc. Min and
Trunc. Max in the Distribution Argument panel, allowing the
distribution to be truncated at the values specified.
- Selecting Shift Factor will put an entry for Shift in the
Distribution Argument panel. A Shift Factor shifts the domain of
the distribution in which it is used by the entered shift amount
- Selecting Alternate Parameters allows the entry of alternate
parameters for the distribution.
- Selecting Static Value allows the entry of the Static Value for the
distribution.
- Selecting Date Formatting instructs @RISK to display dates in the
Distribution Argument panel and to display graphs and statistics
using dates. This selection will result in a RiskIsDate property
function being placed in your distribution.
Note: In the Application Settings dialog, you can specify that Truncation
Limits, Shift Factor and Static Value always be displayed in the
Distribution Argument panel.
Model Commands 97
Alternate Alternate Parameters allow you to specify values for specific percentile
Parameters locations of an input distribution as opposed to the traditional arguments
used by the distribution. The percentiles to be entered are specified using
the Alternate Distribution Parameters options, displayed when Alternate
Parameters is selected.
98 Define Distributions
In the Application Settings dialog you can select the default parameters you
Defaults for
Alternate wish to use for Alternate Parameter Distributions, or those distribution
Parameter types that end in ALT (such as RiskNormalAlt). Your default parameters
Distributions will be used each time you select an Alternate Parameter distribution from
the Distribution Palette.
Model Commands 99
Distribution Icons in the Distribution Argument panel deletes curves, displays the
Argument Distribution Palette and allows Excel cell references to be used as argument
Panel Icons values.
Icons in the Distribution Argument panel include:
Deletes the curve whose arguments are shown in the selected region of
the Distribution Argument panel.
Displays the Distribution Palette for selecting a new distribution type
for the selected curve.
Displays the Distribution Argument panel in a mode which allows
Excel cell references to be selected for argument values. When in this mode,
simply click on the cells in Excel which contain the argument values you
wish to use. Click the Dismiss Reference entry icon (at the top of the
window) when complete.
At any time a name may be changed by 1) editing the name argument to the
RiskOutput function, 2) re-selecting the output cell and clicking the Add
Output icon again or 3) changing the name shown for the output in the
Model window.
The default settings for an output to be used in Six Sigma calculations are
set on the Six Sigma tab. These properties include:
Calculate Capability Metrics for This Output. Specifies that
capability metrics will be displayed in reports and graphs for the
output. These metrics will use the entered LSL, USL and Target
values.
LSL, USL and Target. Sets the LSL (lower specification limit), USL
(upper specification limit) and Target values for the output.
Use Long Term Shift and Shift. Specifies an optional shift for
calculation of long-term capability metrics.
Upper/Lower X Bound. The number of standard deviations to the
right or the left of the mean for calculating the upper or lower X-
axis values.
Entered Six Sigma settings are entered in a RiskSixSigma property
function. Only outputs which contain a RiskSixSigma property function
will display six sigma markers and statistics in graphs and reports. @RISK
six sigma statistics functions in Excel worksheets can reference any output
cell that contains a RiskSixSigma property function.
Note: All graphs and reports in @RISK use the LSL, USL and Target values
from RiskSixSigma property functions that existed at the start of a
simulation. If you change the Specification Limits for an output (and its
associated RiskSixSigma property function), you need to re-run the
simulation to view changed graphs and reports.
Model Commands 113
114 Add Output
Insert Function
Insert Function Command
Inserts an @RISK function in the active cell
@RISK provides a variety of custom functions that can be used in Excel
formulas for defining probability distributions, returning simulation
statistics to Excel and performing other modeling tasks. The @RISK Insert
Function command allows you to quickly insert an @RISK function into
your spreadsheet model. You can also set up a list of favorite functions that
can be quickly accessed. When the @RISK Insert Function command is
used, the Excel Insert Function Arguments dialog is displayed where
arguments to the functions can be entered.
If you use the @RISK Insert Function command to enter a distribution
function, a graph of the distribution function may also be displayed. As
with the Define Distribution window, you can add overlays to this graph,
add input property functions or even change the type of distribution
function being entered.
Changing the To change the distribution used in the formula from the Insert Function
Distribution in Graph window, click the Distribution Palette button at the bottom of the
the Insert window and select or double-click the distribution you want to change to
Function Graph from the Palette. Once selected, the new distribution and arguments will be
Window entered in the Excel formula bar and a graph of the new function will be
shown.
Once you click OK and a distribution property function is entered, you can
click on the distribution property function in the Excel formula bar and the
Excel Function Argument window will be displayed for the property
function itself. The arguments may then be edited using the Excel Function
Argument window.
Note: There are two possible cells where the correlation between any two
inputs may be entered (row of the first and column of the second, or column
of the first and row of the second). You can use either cell as you enter a
coefficient value in one it is automatically entered in the second cell.
The Delete Matrix button deletes the displayed correlation matrix. All
Deleting a
RiskCorrmat functions will be removed from distribution functions used in
Matrix
the matrix and the correlation matrix displayed in Excel will be deleted.
Matrix Name. Specifies the name of the matrix. This name will be
used to 1) name the range where the matrix is located in Excel and
2) identify the matrix in the RiskCorrmat functions that are created
for each input distribution included in the matrix. This name must
be a valid Excel range name.
Description. Gives a description of the correlations included in the
matrix. This entry is optional.
Location. Specifies the range in Excel that the matrix will occupy.
Add Heading Row/Column and Format. Optionally displays a
heading row and column that includes the names and cell reference
for the correlated inputs and formats the matrix with colors and
borders, as shown:
@RISK Correlations US Interest Rate in $D$17 $/Pound in $D$18 $/Euro in $D$19
US Interest Rate in $D$17 1 -0.7 -0.5
$/Pound in $D$18 -0.7 1 0.6
$/Euro in $D$19 -0.5 0.6 1
Note: the Correlated Time Series discussed here is not the same as
correlated time series functions available with @RISKs Time Series tool.
@RISKs Time Series tool uses array functions to model a variety of time
series processes. These can also be correlated, as discussed in the Time
Series chapter of this manual.
Deleting Rows, Additional options shown, when you right-click on a matrix, allow you to
Columns and delete rows or columns from a matrix, or remove an input from the matrix:
Inputs
Insert Row/Column. Inserts a new row and column in the active
correlation matrix. A new column will be placed in the matrix at
the cursor location, shifting existing columns to the right. A new
row is also added, at the same position as the added column,
shifting existing rows down.
Delete Selected Row/Column(s). Deletes the selected rows and
columns from the active correlation matrix.
Delete Inputs in Selected Row/Columns(s) from Matrix. Removes the
selected input(s) from the active correlation matrix. When inputs
are deleted, only the inputs are removed the coefficients specified
in the matrix remain.
Note: If you enter an Adjustment Weight of 100, @RISK will make all
possible efforts to keep the coefficent associated with that weight fixed.
However, if no valid matrix can be generated with the fixed coefficent , it
will have to be adjusted in order to create a valid matrix.
Adjustment When you place a correlation matrix in Excel, its Adjustment Weights may
Weight Matrix in also be placed in an Adjustment Weight matrix in Excel. This matrix has
Excel the same number of elements as the correlation matrix it is used with. Cells
in this matrix hold the entered Adjustment Weight values. Any matrix cells
for which no weight was entered (shown as blanks in the matrix) have a
weight of 0 indicating that they may be adjusted as necessary during matrix
correction. An Adjustment Weight matrix in Excel is given an Excel range
name using the name of the correlation matrix it is used with plus the
extension _Weights. For example, a matrix named Matrix1 could have an
associated Adjustment Weight matrix with the name Matrix1_Weights.
Note: You do not have to place an Adjustment Weight matrix in Excel when
exiting the Define Correlations window. You can just place the corrected
correlation matrix in Excel and discard any entered weights if you are
happy with the corrections made and do not wish to access the weights at a
later time.
The Data Set options specify the source of the data to be fitted and its type.
Data Set
Options include:
Name. Specifies a name for the fitted data set. This will be the
name shown in the Fit Manager, and in any RiskFit functions which
link a distribution function to the results from a fit.
Range. Specifies a range in Excel that contains the data to be fitted.
Note: If you are unsure about the number or type of bins to use for a Chi-
Square test, set Number of Bins to Automatic and set Bin
Arrangement to Equal Probabilities.
Fit Ranking The Fit Ranking list displays all distributions for which valid fit results were
generated. These distributions are ranked, according to the goodness-of-fit
test selected from the Fit Ranking selector at the top of the Fit Ranking
table. Only distribution types selected, using the Distributions to Fit tab in
the Fit Distributions to Data dialog, are tested when fitting.
A goodness-of-fit statistic provides a quantitative measure of how closely
the distribution of the data being fit resembles the fitted distribution. In
general, a lower statistic indicates a better the fit. The goodness-of-fit
statistic can be used for comparing the values to the goodness-of-fit of other
distribution functions. Goodness-of-Fit information is only available when
the Input Data type is Sampled Values.
Checking a distribution listed in the Fit Ranking list displays the fit results
for that distribution, including graphs and statistics on the selected fit.
Q-Q Graph A Q-Q (or Quantile-Quantile graph) plots the plot percentile values of the
fitted distribution vs. percentile values of the input data. If the fit is good,
the plot will be nearly linear.
Fitted When a bootstrap analysis is run, a distribution is generated for the values
Parameters for each parameter in the fitted distribution. A bootstrap is performed by
sampling a set of values from a fitted distribution and refitting those values.
Each fit in the bootstrap generates a new value for each fitted parameter of
the distribution type. For example, for a Weibull distribution type, a
distribution is generated for the alpha parameter and the beta parameter. A
distribution of these values is displayed with along with values for the
selected confidence interval. The confidence interval allows you to make
statements such as you are 95% confident that the alpha parameter is in the
range 1.48 to 1.91, with a fitted value of 1.67.
The Batch Fit dialog is similar to the Fit dialog, as it allows you to select the
parameters to use when fitting each data set. An additional setting, Best Fit
Selection, specifies the statistic (AIC, BIC, Chi-Sq, A-D, or K-S) that will be
used to select the best fitting distribution shown in the reports in Excel.
Batch Fit - Two types of reports can be generated a Standard Report or a Live
Standard Report Report. The standard report has a worksheet for each fitted data set with an
@RISK distribution function for the best fit for each data set plus statistics
on fit results. The standard report does not update if your fitted data
changes. You need to re-run the batch fit.
Batch Fit - Live The Live report has a single worksheet with an @RISK RiskFitDistribution
Report function for each fitted data set. In addition, @RISK fit statistics functions
are used to return information on each fit to the report.
Model Commands 161
RiskFitDistribution The @RISK RiskFitDistribution function fits data interactively and returns
Function samples from the best fitting distribution during a simulation. It operates
the same as an @RISK distribution function for the best fit that is entered in
a cell. It may be correlated, named, or include property functions; just as
can be done with standard @RISK distribution functions.
@RISK fit statistics functions return information on the results from a fit
performed by RiskFitDistribution. For example, RiskFitDescription
returns the name and arguments for the bestfitting distribution, and
RiskFitStatistic returns a specified statistic for the fit.
RiskFitDistribution automatically updates the fitted distribution when fitted
data changes in Excel. Correlations are also updated. Using this capability
you can have fitted distributions automatically update as new data is
received or data changes during a simulation.
Fitted data sets, and their settings, are saved when you save your workbook.
By selecting the Fit Manager command, you can navigate between fitted
data sets and delete unneeded ones.
The Outputs and Inputs table displayed in the @RISK Model window is
set up automatically, when you display the window. When the window is
displayed, your worksheets are scanned or re-scanned for @RISK functions.
How Are If a name is not entered in a RiskOutput function, or in a distribution
Variable Names function, @RISK will automatically try to create a name. These names are
Generated? created by scanning the spreadsheet around the cell where the input or
output is located. To identify names, @RISK moves from the input or
output cell across the row of the spreadsheet, to the left and up the column,
towards the top. It moves across these ranges of the spreadsheet until it
finds a label cell, or a cell without a formula in it. It then takes these row
and column headings and combines them to create a possible name for
the input or output.
If you select to show Percentile values in the table, the actual percentile is
entered in the rows Value at Entered Percentile.
The Outputs tab in the Model window lists all outputs in your model.
These are cells where RiskOutput functions are located. For each output, the
table shows:
Name, or the name of the output. To change the name of the output,
simply type a new name in the table, or click the Reference Entry
icon to select a cell in Excel, where the name you wish to use, is
located.
Cell, where the output is located.
Function, or the actual RiskOutput function entered in the Excel
formula. You may edit this function directly in the table.
The properties of each output may be entered by clicking the fx icon shown
on each row. For more on properties for outputs, see the Add Output
command in this chapter.
Simulation Settings
Simulation Settings Command
Changes the settings which control the simulations performed by
@RISK
The Simulation Settings command affects the tasks performed during a
simulation. All settings come with default values, which you may change if
you wish. The simulation settings affect the type of sampling @RISK
performs, the updating of the worksheet display during simulation, the
values returned by Excel in a standard recalculation, seeding of the random
number generator used for sampling, the status of convergence monitoring
and macro execution during simulation. All simulation settings are saved
when you save your workbook in Excel.
To save simulation settings, so they will be used as the default settings each
time you start @RISK, use the Utilities commands Application Settings
command.
Important! A single recalc with sampling, done with the When a Simulation
is Not Running, Distributions Return Random Values (Monte Carlo) option
on, possibly will not resolve circular references. If an @RISK distribution
function is located in a cell which is recalculated during an Excel iteration,
it will be resampled each iteration of the single recalc. Because of this, the
When a Simulation is Not Running, Distributions Return Random Values
(Monte Carlo) option should not be used for worksheets which use Excel
Iterations capabilities to solve circular references.
The Pause on Error in Outputs dialog shows, on the left, an explorer list
containing each output for which an error was generated. A cell whose
formula caused an error will be showed in the field on the right when you
select an output with an error in the explorer list. @RISK identifies this cell,
by searching through the list of precedent cells for the output with the error,
until values switch from error to a non-error value. The last precedent
cell(s) returning error prior to precedent cells returning non-error values, is
identified as the error causing cell.
You can also review the formulas and values for cells, which are precedents
to the error causing cell, by expanding the error-causing cell in the right-
hand Explorer list. This allows you to examine values which feed into the
problem formula. For example, a formula might return #VALUE because of
a combination of values which are referenced by the formula. Looking at
precedents to the error causing formula allows you to examine these
referenced values
For more information on these available Excel reports, see the Excel Reports
command.
Note: The Initial Seed set, in the Sampling tab only, affects the random
numbers generated for input distributions that do not have an independent
seed specified using the RiskSeed property function. Input distributions
which use RiskSeed always have their own reproducible stream of random
numbers.
196 Simulation Settings
Other settings on the Sampling tab include:
Other Sampling
Options Collect Distribution Samples. Specifies how @RISK will collect
random samples drawn from input distribution functions during a
simulation. Options include:
- All. Specifies that samples will be collected for all input
distribution functions.
- Inputs Marked with Collect. Specifies that samples will be
collected only for those input distributions which the Collect
property is selected; i.e., a RiskCollect property function is
entered inside the distribution. Sensitivity and Scenario analyses
will only include those distributions marked with Collect.
- None. Specifies that no samples will be collected during a
simulation. If no samples are collected, Sensitivity and Scenario
analyses will not be available as simulation results. In addition,
statistics will not be provided on samples drawn for input
distribution functions. Deselecting sample collection, however,
does allow simulations to run faster, and will sometimes allow
large simulations with many outputs to be run on memory
constrained systems.
Smart Sensitivity Analysis. Enables or disables Smart Sensitivity
Analysis. For more information on Smart Sensitivity Analysis and
situations you may wish to disable it, see the Sensitivities
Command.
Update Statistic Functions. Specifies when @RISKs statistics
functions (such as RiskMean, RiskSkewness, etc) will be updated
during a simulation. In most cases, statistics do not need to be
updated until the end of a simulation when you wish to view final
simulation statistics in Excel. However, if the calculations in your
model require a a new statistic to be returned each iteration (for
example, when a custom convergence calculation has been entered
using Excel formulas), the Each Iteration should be used.
The Convergence tab settings specify how @RISK will monitor convergence
during a simulation. Convergence monitoring shows how statistics on
output distributions change as additional iterations are run during the
simulation.
As numerous iterations are executed, the output distributions generated
become more stable. Distributions become stable because the statistics
which describe them change less, as additional iterations are performed.
The number of iterations required, to generate stable output distributions,
varies depending on the model being simulated and the distribution
functions in the model.
By monitoring convergence you can ensure that you have run a sufficient,
but not excessive, number of iterations. This is especially important with
complex models that take a long time to recalculate.
Convergence monitoring does add to simulation runtime. If the fastest
simulation is desired for a preset number of iterations, turn convergence
monitoring off to maximize speed.
The Update Display option may be toggled on and off by pressing <Num
Lock> during the simulation.
The example file Template.XLS shown above contains a template sheet. You
can review this sheet to see how to set up your own custom reports and
template sheets.
To exit the Browse Results mode, simply close the popup graph, or click the
Browse Results icon on the toolbar.
210 Summary
The commands for the Results Summary Window may be accessed by
Commands in
the Results clicking the icons displayed at the bottom of the table, or by right-clicking
Summary and selecting from the pop-up menu. Commands will be performed on the
Window current selected rows in the table.
212 Summary
Columns The Results Summary Window columns can be customized to select which
Displayed in statistics you want to display on your results. The Columns icon, at the
the Results bottom of the window, displays the Columns for Table dialog.
Summary
Window
If you select to show Percentile values in the table, the actual percentile is
entered in the rows Value at Entered Percentile.
Note: Column selections are retained as you change them. Separate column
selections can be made for the @RISK Model and @RISK Results
Summary window.
Graph Menu The Graph menu is accessed by 1) clicking the Graph icon, at the bottom of
the Results Summary Window or 2) right-clicking in the table. Selected
commands will be performed on the selected rows in the table. This allows
you to quickly make graphs of multiple simulation results from your model.
The command Automatic creates graphs using the default type (relative
frequency), for distributions of simulation results.
214 Summary
Copy and The Results Summary window can be copied to the clipboard, or exported
Report Menu to Excel, using the commands on the Copy and Report menu. In addition,
where appropriate, values in the table can be filled down or copied and
pasted. This allows you to quickly copy editable P1 and X1 values.
Commands on the Edit menu include:
Report in Excel. Exports the table to a new worksheet in Excel.
Copy Selection. Copies the current selection in the table to the
clipboard.
Copy Grid. Copies the entire grid (text only; no thumbnail graphs)
to the clipboard.
Paste, Fill Down. Pastes or fills values into the current selection in
the table.
The Detailed Statistics window displays statistics that were calculated for all
output cells and sampled input distributions. In addition, percentile values
(in increments of 5 perc%) are shown, along with filter information, and up
to 10 target values and probabilities.
The Detailed Statistics window may be pivoted so that it displays statistics
in columns and outputs and inputs, in rows. To pivot the table, click the
Pivot Table of Statistics icon at the bottom of the window.
The target entry area is viewed by scrolling the Detailed Statistics window
to the target rows, where values and probabilities can be entered. If a value
is entered, @RISK calculates the probability of a value occurring that is less
than, or equal to, the entered value. If the @RISK Defaults menu Display
Cumulative Descending Percentiles option is selected, the reported target
probability will be in terms of a probability of exceeding the entered target
value.
If a probability is entered, @RISK calculates the value in the distribution
whose associated cumulative probability equals the entered probability.
Default target percentiles shown in the Detailed Statistics window may be
set using the Utilities menu Application Settings command.
Data is displayed, by iteration, for each output cell and sampled input
distribution. By moving across a row of the Data window you can see the
exact combination of input samples, which led to the shown output values
in any given iteration.
Sorting the Data from a simulation may be sorted to show key values you are interested
Data Window in. For example, you could sort to show those iterations where an error
occurred. You can also sort to show, decreasing or increasing, values for
any result. Optionally, you can hide filtered values or errors. Sorting can be
combined with the Iteration Step option to set Excel to the values for any
iteration you are interested in.
Note: If your workbook in Excel has been changed since the simulation was
run, the Iteration values that were calculated in the simulation may no
longer match those calculated during the Iteration Step. When this
happens, the error is reported in the Title Bar of the Data window.
Note: Clicking a column header ranks the inputs for the output in the
selected column.
The statistic used for an output can be its mean or a percentile value. The
number of iterations in each scenario or bin is determined by the total
number of iterations divided by the number of bins. Thus, if you ran 1000
iterations and had 10 bins, the statistic for the output for each bin would be
calculated using 100 values. If you run few iterations, you will have a
limited number of values in each bin and your results will not be stable.
Regression and Two methods Multivariate Stepwise Regression and Rank Order
Correlation Correlation are also used for calculating sensitivity analysis results, as
discussed here.
Regression is simply another term for fitting data to a theoretical equation.
In the case of linear regression, the input data is fit to a line. You may have
heard of the Least-Squares method, which is a type of linear regression.
Multiple regression tries to fit multiple input data sets to a planar equation
that could produce the output data set. The sensitivity values, returned by
@RISK, are normalized variations of the regression coefficients.
Stepwise regression is a technique for calculating regression values with
What is
multiple input values. Other techniques exist for calculating multiple
Multivariate
Stepwise regressions, but the stepwise regression technique is preferable for large
Regression? numbers of inputs, since it removes all variables that provide an
insignificant contribution from the model.
The coefficients listed in the @RISK sensitivity report are normalized
regression coefficients associated with each input. A regression value of 0
Results Commands 229
indicates that there is no significant relationship between the input and the
output, while a regression value of 1 or -1 indicates a 1 or -1 standard
deviation change in the output for a 1 standard deviation change in the
input.
The R-squared value, listed at the top of the column, is simply a
measurement of the percentage of variation that is explained by the linear
relationship. If this number is less than ~ 60% then the linear regression
does not sufficiently explain the relationship between the inputs and
outputs, and another method of analysis should be used.
Even if your sensitivity analysis produces a relationship with a large value
of R-squared, examine the results to verify that they are reasonable. Do any
of the coefficients have an unexpected magnitude or sign?
Mapped values are simply a transformation of the beta coefficient for the
What Are
Regression (Coefficient) into actual values. The beta coefficient indicates the
Mapped Values?
number of standard deviations the output will change, given a one standard
deviation change in the input (assuming all other variables are held
constant).
Correlation is a quantitative measurement of the strength of a relationship
What is
between two variables. The most common type of correlation is linear
Correlation?
correlation, which measures the linear relationship between two variables.
The rank order correlation value returned by @RISK can vary between -1
and 1. A value of 0 indicates there is no correlation between variables; they
are independent. A value of 1 indicates a complete positive correlation
between the two variables; when the input value samples high, the output
value will sample high. A value of -1 indicates a complete inverse
correlation between the two variables; when the input value samples
high, the output value will sample low. Other correlation values
indicate a partial correlation; the output is affected by changes in the
selected input, but may be affected by other variables as well.
Rank order correlation calculates the relationship between two data sets by
What is Rank comparing the rank of each value in a data set. To calculate rank, the data is
Order
ordered from lowest to highest and assigned numbers (the ranks) that
Correlation?
correspond to their position in the order.
This method is preferable to linear correlation when we do not necessarily
know the probability distribution functions from which the data were
drawn. For example, if data set A was normally distributed and data set B
was lognormally distributed, rank order correlation would produce a better
representation of the relationship between the two data sets.
Using Drag and Drop, a thumbnail scatter plot in the Scatter Plot Matrix can
be dragged, and expanded, into a full graph window. In addition, overlays
of scatter plots may be created by dragging additional scatter thumbnail
graphs from the matrix onto an existing scatter plot
What is Scenario analysis allows you to determine which input variables contribute
Scenario significantly towards reaching a goal. For example, which variables
Analysis? contribute to exceptionally high sales? Or, which variables contribute to
profits below $1,000,000?
@RISK allows you to define target scenarios for each output. You might be
interested in the highest quartile of values in the Total Sales output, or the
value less than 1 million in the Net Profits output. Enter these values
directly in the Scenarios row of the @RISK Scenario Analysis window to
study these situations.
When you display a scenarios window, @RISK looks at the data created by
your @RISK simulation. For each output, the following steps are followed:
1) The median and standard deviation of the samples, for each input
distribution for the entire simulation, are calculated.
2) A subset is created containing only the iterations in which the
output achieves the defined target.
3) The median of each input is calculated for the subset of data.
Caution: The greatest danger in using scenario analysis is that the analysis
results may be deceiving, if the subset contains a small number of data
points. For example, in a simulation of 100 iterations, and a scenario target
of >90%, the subset will contain only 10 data points!
Editing The default scenarios may be changed by clicking the Edit Scenarios icon
Scenarios (either in a graph window or in the Scenarios window) or by double
clicking on a scenario such a >90% - that is displayed in the first row of the
Scenarios Window.
Three scenarios can be entered for each simulation output. Each scenario
may have one or two bounds. If you enter two bounds you will be
specifying a scenario that has a min-max range for the output, such as >90%
and <99%. Each bound may be specified as a percentile or an actual value,
such as >1000000.
Scatter Plot A scatter plot in the Scenarios window is an x-y scatter plot with an overlay.
Matrix in This graph shows:
Scenarios
Window 1) the input value sampled vs. the output value calculated in each iteration
of the simulation,
2) overlaid with a scatter plot of the input value sampled vs. the output
value calculated when the output value meets the entered scenario.
In the Scatter Plot Matrix, ranked scenario analysis results are displayed
with scatter plots. To show the Scatter Plot Matrix, click the Scatter Plot icon
in the lower left of the Scenarios window.
Note: You may only overlay the same input and output, under different
scenarios, in a scatter graph which displays scenario analysis results.
Overview
Graphs in @RISK come in two types of windows:
Floating and
Callout Floating windows, sitting by themselves on top of Excel. These
Windows windows are permanent, until they are closed by you.
Callout windows, attached to a cell. This is the type of window
used in the Browse mode. Only one of these windows is open at a
time, as the graph changes when a new cell is selected in Excel.
Using the icons on the graph you can detach a callout window and turn it
into a floating window, or reattach a floating window to the cell it
represents.
The type of graph displayed may be changed, using the icons at the bottom
of the Graph window. In addition, by clicking the right mouse button on a
graph window, a pop-up menu is displayed with commands that allow the
changing of a graphs format, scaling, colors, titles, and other characteristics.
The legend and Statistics Grid displayed on the right of a graph can be
Statistics and
changed as desired. By default you see detailed statistics for the result that
Reports
is graphed. Changing the selector at the top to Legend (with Statistics)
shows a smaller statistics legend directly on the graph instead of the grid.
Each graph and its statistics may be copied to the clipboard, and pasted into
your spreadsheet. As graphs are transferred, as Windows metafiles, they
may be resized and annotated once pasted into a spreadsheet.
Using the Chart in Excel command, graphs can be drawn in Excel's native
graph format. These graphs can be changed, or customized, just as with any
Excel graph.
Formatting @RISK graphics use a graphing engine designed specifically for processing
Graphs simulation data. Graphs can be customized and enhanced as needed, often
by simply clicking on the appropriate element in the graph. For example,
to change the title of a graph, simply click on the title and type the new
entry:
The Graph Options dialog may change depending on the type of graph
being customized. Graph options specific to a certain graph type are
discussed in the reference section pertaining to the graph type.
The Select Simulation dialog is also available in report windows when you
wish to filter the report to show only those results from a specific
simulation.
When markers are displayed, they are included in graphs when you copy
them into a report.
Note: If your tornado graph has many bars, there may not be enough room
to display labels for each bar. In that case, simply drag a corner of the
graph to increase its size, which will allow more bar labels to be shown.
The spider graph shows how the output statistic value changes as the
sampled input value changes. The steeper the line, the greater the impact of
the input on the output. This shows more information than a tornado
graph, as the tornado only shows the overall swing in output statistic value,
while the spider gives you information on the rate of change in output value
as the input changes.
In the above scatter plot, the input has a large affect on the output Net
Income/ 2010 but no impact on the output Net Income/ 2011.
Note: Overlays may be added to a scatter plot by clicking the Add icon
(with a plus sign) shown at the bottom of the graph window.
Note: Grabbing the crossing point of the X and Y axis delimiters allows you
to adjust both delimiters at the same time.
Note: Elements may be added to a summary graph by clicking the Add icon
(with a plus sign) shown at the bottom of the graph window.
Note: Depending on the type of graph in use, the options displayed on the X
and Y axis tabs may be different; as different scaling options are available
for different types of graphs (summary, distribution, scatter, etc.).
Statistics or data may be displayed for each curve in a graph. The available
statistics change depending on the type of graph displayed. These statistics
can be shown in a grid next to the graph (with a column for each curve) or
in a table in the graph legend.
Legend statistics are copied with the graph when it is pasted into a report.
They also update as a simulation runs. To change the statistics displayed
with a graph legend:
1) Uncheck Automatic to allow customization of the displayed
statistics
2) Check the Statistics desired
3) Click Redefine to change the percentile values that will be reported,
if desired
To remove the statistics from a graph:
Change the Style option to Simple Legend.
To remove legend and statistics from a graph:
Change Show option to Never.
268 @RISK Graphs
Graph Options The options on the Graph Options Other Tab specify other available
Other Tab settings for a displayed graph. These include the Basic Color Scheme used
and the formatting of numbers and dates displayed in the graph.
Numbers displayed on a graph can be formatted to show the level of
precision desired using the Number Formats options shown on the Other
tab. The available numbers for formatting changes depending on the type
of graph displayed.
Dates displayed on a graph can be formatted to show the level of precision
desired using the Date Formats options shown on the Other tab. The
available dates for formatting changes depending on the type of graph
displayed.
For distribution graphs, Statistics (Unitless) refers to reported statistics
such as Skewness and Kurtosis that are not in the units of the values for the
graph. Statistics (with Units) refers to reported statistics such as Mean and
Standard Deviation that use the units of the graph.
It is possible that Goal Seek will converge on a goal, but will not be able to
converge within the requested accuracy. In this case Goal Seek will prompt
you with its best solution.
An @RISK Goal Seek uses a two-tiered approach to converging on the
How Are Input
target:
Values Selected
in an @RISK 1) If no brackets are set using Changing Cell Minimum and
Goal Seek? Maximum, Goal Seek will attempt to bracket the target value using
a geometric expansion around the original value.
Note: Goal Seek is not designed to work with multiple simulation models.
For RiskSimtable functions, the first value in the table will be used for all
simulations.
The Multiple Inputs section allows you to stress all of your specified @RISK
distributions during one simulation, or to run a separate simulation for each
@RISK distribution.
Stress Each Input in its Own Simulation Specifies that a full
simulation will be run for each stress range entered. The only
change made to the model, during each simulation, will be the
stressing of a single input. The number of simulations run will
equal the number of stress ranges entered.
Stress All Inputs in a Single Simulation Specifies that a single
simulation will be run using all stress ranges entered. The
simulation results will combine the effects of all stress ranges.
The left and right of the box are indicators of the first and third quartiles.
The vertical line, inside the box represents the median, and the X indicates
the location of the mean. The box width represents the interquartile range
(IQR). The IQR is equal to the 75th percentile data point minus the 25th
percentile data point. The horizontal lines, extending from either side of the
box, indicate the first data point that is less than 1.5 times the IQR below the
low edge of the box, and the last data point that is less than 1.5 times the
IQR above the high edge of the box. Mild outliers, shown as hollow squares,
are data points between 1.5 times IQR and 3.0 times IQR outside the box.
Extreme outliers, shown as solid squares, are points beyond 3.0 times IQR
outside the box.
If you are selecting worksheet cells as inputs, the name of a single input can
be typed directly in the Name entry. When you have selected a range of
inputs, the Name entry shows the names of each cell, separated by commas.
Cell names are defined in the Input Definition dialog only for the purposes
of Advanced Sensitivity Analysis. These names are used in @RISK Results
Summary Window, and in the reports generated by Advanced Sensitivity
Analysis These cell names do not, however, become part of your Excel
model.
Base Value. The Base Value is used to determine the sequence of
values to step through for an input, and as a reference point in the
Percent Change report graph. The Base Value is especially
important when you wish to apply a Variation Method that is a
change from base, such as +/- Percent Change from Base. By
default, the Base Value is the value a distribution or cell evaluates to
when Excel recalculates the worksheet, but you can change it to a
different value. Note: If your distribution or cell evaluates to 0, and
Base Value is set to Auto, you need to enter a non-zero base value if
you use the +/- Percent Change from Base option.
Change from Base Value. With this Variation method, the first and
the last value in the sequence to step through, are obtained by
adding to the Base Value the values specified in Min Change and
Max Change entries. The intermediate values are at equal intervals,
with the number of values to test set by # of Steps.
Add Analysis By clicking the Add Analysis Names button, a descriptive name can be
Names added to each input value that will be tested in an Advanced Sensitivity
Analysis. This name will be used to identify the simulation run when an
input is fixed at a particular value. These names will make your reports
more readable and will help identify individual simulations, when results
are reviewed in the @RISK Results Summary window.
The Sensitivity Analysis Names dialog allows you to enter a name for the
simulation to be run at each stepped input value. The default name @RISK
has created is initially shown, and you can change this as desired.
When a smaller, faster analysis, is desired, the Cancel button gives the user
an opportunity to change the # of Iterations per simulation in the
Simulation Settings dialog, the number of Inputs to Analyze, or the number
of values in the sequence associated with each input (that is, # of Steps or
table items).
When an Advanced Sensitivity Analysis is run, the following actions occur
for each input in the analysis:
1) A single step value for the input is substituted for the existing cell
value, or @RISK distribution, in the worksheet.
2) A full simulation of the model is run.
3) The simulation results, for the tracked output Cell to Monitor, are
collected and stored.
4) This process is repeated, until a simulation has been run, for each
possible step value for the input.
The results of the Sensitivity Analysis are also available in the @RISK-
Results Summary Window. You can analyze them further using tools
available in this window.
Percentile The Percentile Graph plots the Cell To Monitor statistic against percentiles
Graphs of each of the @RISK distributions that were selected for analysis with step
type Percentiles of Distribution. Note: Only inputs that were @RISK
distributions will be displayed on this graph.
Introduction
RISKOptimizer combines simulation and optimization to allow the
optimization of models that contain uncertain factors. RISKOptimizer,
through the application of powerful optimization techniques and Monte
Carlo simulation, can find optimal solutions to problems which are
"unsolvable" for standard linear and non-linear optimizers. RISKOptimizer
combines the simulation technology of @RISK, and the optimization engines
of Evolver, Palisades genetic algorithm based solver, and OptQuest, a
widely used optimizer. Users familiar with either Evolver or Excels built in
Solver should be able to use RISKOptimizer with little difficulty.
Why RISKOptimizer?
RISKOptimizer opens up a whole new spectrum of problems to
optimization. With RISKOptimizer, optimal solutions can be found when
problems contain variables outside your control whose values are not
known. Current optimizers such as Solver (a linear and non-linear
optimizer included with Excel) and Evolver (software from Palisade
Corporation based on genetic and OptQuest optimization methods) cannot
find optimal solutions when ranges of possible values are entered for
uncertain factors in a model.
Traditional Traditional Excel-based optimization problems analyzed using Solver or
Optimization Evolver are comprised of:
Problems
An output or target cell that you wish to minimize or maximize
A set of input or adjustable cells whose values you control
A set of constraints that need to be met, often specified using
expressions such as COSTS<100 or A11>=0
During an optimization in Solver or Evolver, the adjustable cells are
changed across allowable ranges you specify. For each possible set of
adjustable cell values the model is recalculated, and a new value for the
target cell is generated. When the optimization is complete, an optimal
solution (or combination of adjustable cell values) is found. This solution is
the combination of adjustable cell values which yields the best (i.e.,
minimum or maximum) value for the target cell while satisfying the
constraints youve entered.
RISKOptimizer 311
When a model has uncertain elements, however, both Solver and Evolver
Optimization of
Uncertain cannot generate optimal solutions. In the past, many optimization models
Models just ignored uncertainty, making models unrealistic but optimizable. If an
attempt was made to find optimal values by using simulation, a "brute-
force" approach was employed to search possible adjustable cell values on
an iterative basis. This involved running an initial simulation, changing one
or more values, rerunning the simulation, and repeating this process until
what looked like an optimal solution was found. This is a lengthy process,
and it is usually not clear how to change the values from one simulation to
the next.
With RISKOptimizer the uncertainty present in a model may be included
and reliable optimal solutions which take that uncertainty into account can
be generated. RISKOptimizer uses simulation to deal with the uncertainty
present in the model and uses advanced optimization techniques to
generate possible values for the adjustable cells. The result of this
simulation optimization is the combination of values for the adjustable
cells which minimizes or maximizes a statistic for the simulation results for
the target cell. You may, for example, wish to find the combination of
adjustable cell values which maximizes the mean of the target cells
probability distribution, or minimizes the standard deviation.
Modeling For modeling uncertainty, RISKOptimizer allows you to describe the
Uncertainty possible values for any spreadsheet element using any of the probability
distribution functions available in @RISK. A value of 10, for example, in a
spreadsheet cell could be replaced with the @RISK function
=RiskNormal(10,2). This would specify that the possible values for the cell
are described by a probability distribution with a mean of 10 and a standard
deviation of 2.
312 Introduction
Optimization When optimizing, RISKOptimizer runs a full simulation for each possible
Using trial solution that is generated by Optquest or Evolvers GA-based
Simulation optimizer. In each iteration of a trial solution's simulation, probability
distribution functions in the spreadsheet are sampled and a new value for
the target cell is generated. At the end of a simulation, the result for the trial
solution is the statistic for the distribution of the target cell which you wish
to minimize or maximize. This value is then returned to the optimizer and
used by the genetic algorithms to generate new and better trial solutions.
For each new trial solution, another simulation is run and another value for
the target statistic is generated.
As in traditional optimizers, constraints that need to be met can be entered
in RISKOptimizer. Constraints can either be checked each iteration of a
simulation (an iteration constraint) or at the end of each simulation (a
simulation constraint). Iterations constraints are typically traditional
Solver or Evolver style constraints, such as A11>1000, where the value of
cell A11 does not change during a simulation. Simulation constraints are
constraints that reference a statistic on the distribution of simulation results
for any cell in your model you specify. A typical simulation constraint
could be Mean of A11>1000 or the mean of the distribution of simulation
results for cell A11 must be greater than 1000. As in Evolver, constraints can
be hard or soft, and a violated hard constraint causes a trial solution to be
rejected.
As large numbers of simulations are being run by RISKOptimizer, two
important techniques are used to minimize runtimes and generate optimal
solutions as quickly as possible. First, RISKOptimizer uses convergence
monitoring to determine when a sufficient number of iterations have been
run (but not too many). This insures that the resulting statistic from the
target cells probability distribution is stable, and that any statistics from
output distributions referenced in constraints are stable. Secondly,
RISKOptimizer optimization engines generate trial solutions that move
toward an optimal solution as quickly as possible.
RISKOptimizer 313
All @RISKs graphs and reports are available for viewing the results of a
Simulation
Results best simulation in RISKOptimizer. This includes simulation statistics
functions which can be used to return simulation results directly to your
spreadsheet. The function RiskMean(cell reference), for example, returns the
mean of the simulated distribution for the entered cell directly to a
worksheet cell or formula.
Applications of The availability of optimization for uncertain models allows the solution of
Simulation many previously "unoptimizable" problems. As a rule, any model that has
Optimization uncertain elements can be optimized through the combination of simulation
Using and optimization, including:
RISKOptimizer
Selection of optimal production and capacity levels for new products
with uncertain market conditions
Identification of optimal inventory levels with uncertain demand
Portfolio allocation for risk minimization
Identification of optimal product mix from a factory where product
markets are geographically distributed and demand levels are uncertain
Determining optimal levels for options purchases when hedging
Yield management when the same product is sold at different prices
under different restrictions
Scheduling with uncertain task times
314 Introduction
What Is RISKOptimizer?
RISKOptimizer provides users with an easy way to find optimal solutions to
models that include uncertainty. Simply put, RISKOptimizer finds the best
inputs that produce a desired simulation output. You can use
RISKOptimizer to find the right mix, order, or grouping of variables that
produces the highest expected value for profits, the lowest risk (i.e., the
minimum variance) for profits, or the largest expected value for goods from
the least amount of materials. With RISKOptimizer you first set up a model
of your problem in Excel, then call up RISKOptimizer to solve it.
You must first model your problem in Excel, then describe it to the RISKOptimizer add-in.
Excel provides all of the formulas, functions, graphs, and macro capabilities
that most users need to create realistic models of their problems.
RISKOptimizer provides the interface to describe the uncertainty in your
model and what you are looking for, and provides the engines that will find
it. Together, they can find optimal solutions to virtually any problem that
can be modeled.
RISKOptimizer 315
How does RISKOptimizer work?
RISKOptimizer uses two optimization engines (OptQuest and Genetic
Algorithms) to search for optimum solutions to a problem, along with
probability distributions and simulation to handle the uncertainty present in
your model.
OptQuest OptQuest Engine uses metaheuristic, mathematical optimization, and
neural network components to guide the search for best solutions to
decision and planning problems of all types. OptQuests methods integrate
state-of-the-art metaheuristic procedures, including Tabu Search, Neural
Networks, Scatter Search, and Linear/Integer Programming, into a single
composite method. To learn more about OptQuest, see Appendix B -
Optimization.
Genetic Genetic algorithms used in RISKOptimizer mimic Darwinian principles of
Algorithms natural selection by creating an environment where hundreds of possible
solutions to a problem can compete with one another, and only the fittest
survive. Just as in biological evolution, each solution can pass along its
good genes through offspring solutions so that the entire population of
solutions will continue to evolve better solutions.
As you may already realize, the terminology used when working with
genetic algorithms is often similar to that of its inspiration. We talk about
how crossover functions help focus the search for solutions, mutation
rates help diversify the gene pool, and we evaluate the entire
population of solutions or organisms. To learn more about how
RISKOptimizers genetic algorithm works, see Appendix B - Optimization.
Probability Probability distributions and simulation are used in RISKOptimizer to
Distributions handle the uncertainty present in the variables in your model. Probability
and Simulation distributions are used to describe the range of possible values for uncertain
elements in your model and are entered using probability distribution
functions such as RiskTriang(10,20,30). This would specify that a variable in
your model could take a minimum value of 10, a most likely value of 20 and
a maximum value of 30. Simulation is then used to generate a distribution
of possible outcomes for each possible trial solution that is generated by the
optimizer.
316 Introduction
What Is Optimization?
Optimization is the process of trying to find the best solution to a problem
that may have many possible solutions. Most problems involve many
variables that interact based on given formulas and constraints. For
example, a company may have three manufacturing plants, each
manufacturing different quantities of different goods. Given the cost for
each plant to produce each good, the costs for each plant to ship to each
store, and the limitations of each plant, what is the optimal way to
adequately meet the demand of local retail stores while minimizing the
transportation costs? This is the sort of question that optimization tools are
designed to answer.
RISKOptimizer 317
assume a quantity for demand from each store. This would allow the model
to be optimized; however, the assumed demand levels would make your
model an inaccurate depiction of what will actually occur. With
RISKOptimizer, you don't have to assume a level for demand. You describe
the possible values for demand using a probability distribution and then use
RISKOptimizer's built-in simulation capabilities to include all possible
values for demand in your optimization results.
When RISKOptimizer is used, the best solution generated by the optimizer
is not a single maximum or minimum value for the objective or "target cell"
in the model you are trying to optimize, but a maximum or minimum
simulation statistic for the objective. Each simulation run by RISKOptimizer
generates a distribution of possible results for your objective. This
distribution has a variety of statistics, such as a mean, standard deviation,
minimum, etc. In the above example, you might want to find the
combination of inputs that maximizes the mean of the distribution for profit
or minimizes its standard deviation.
318 Introduction
Modeling Uncertainty in Excel Models
Variables are the basic elements in your Excel models that you have
identified as being important ingredients to your analysis. If you are
modeling a financial situation, your variables might be things like Sales,
Costs, Revenues or Profits. If you are modeling a geologic situation, your
variables might be things like Depth to Deposit, Thickness of Coal Seam, or
Porosity. Each situation has its own variables, identified by you.
In some cases, you may know the values your variables will take in the time
frame of your model they are certain or what statisticians call
"deterministic". Conversely, you may not know the values they will take
they are uncertain, or "stochastic". If your variables are uncertain you will
need to describe the nature of their uncertainty. This is done with
probability distributions, which give both the range of values that the
variable could take (minimum to maximum), and the likelihood of
occurrence of each value within the range. In RISKOptimizer, uncertain
variables and cell values are entered as probability distribution functions,
for example:
RiskNormal(100,10)
RiskUniform(20,30)
RiskExpon(A1+A2)
RiskTriang(A3/2.01,A4,A5)
These "distribution" functions can be placed in your worksheet cells and
formulas just like any other Excel function.
RISKOptimizer 319
In each iteration of the simulation, probability distribution functions in the
spreadsheet are sampled and a new value for the target cell is generated. At
the end of a simulation, the result for the trial solution is the statistic which
you wish to minimize or maximize for the distribution of the target cell.
This value is then returned to the optimizer and used by the genetic
algorithms to generate new and better trial solutions. For each new trial
solution, another simulation is run, and another value for the target statistic
is generated.
320 Introduction
More Flexible There are many solving algorithms which do a good job at solving small,
simple linear and non-linear types of problems, including hill-climbing,
baby-solvers, and other mathematical methods. Even when offered as
spreadsheet add-ins, these general-purpose optimization tools can only
perform numerical optimization. For larger or more complex problems, you
may be able to write specific, customized algorithms to get good results, but
this may require a lot of research and development. Even then, the resulting
program would require modification each time your model changed.
Not only can RISKOptimizer handle numerical problems, it is the only
commercial program in the world that can solve most combinatorial
problems. These are problems where the variables must be shuffled around
(permuted) or combined with each other. For example, choosing the batting
order for a baseball team is a combinatorial problem; it is a question of
swapping players positions in the lineup. RISKOptimizer can find the
optimal ordering of tasks to be performed as part of a project, evaluating
only solutions that meet specified precedence constraints (that is constraints
that require certain tasks to be performed before others). Complex
scheduling problems are also combinatorial. The same RISKOptimizer can
solve all these types of problems and many more that nothing else can solve.
RISKOptimizers unique optimization and simulation technology allows it to
optimize virtually any type of model; any size and any complexity.
Easier to Use In spite of its obvious power and flexibility advantages, RISKOptimizer
remains easy to use because an understanding of the complex optimization
techniques it uses is completely unnecessary. RISKOptimizer doesnt care
about the nuts and bolts of your problem; it just needs a spreadsheet
model that can evaluate how good different scenarios are. Just select the
spreadsheet cells that contain the variables and tell RISKOptimizer what
you are looking for. RISKOptimizer intelligently hides the difficult
technology, automating the what-if process of analyzing a problem.
Although there have been many commercial programs developed for
mathematical programming and model-building, spreadsheets are by far
the most popular, with literally millions being sold each month. With their
intuitive row and column format, spreadsheets are easier to set up and
maintain than other dedicated packages. They are also more compatible
with other programs such as word processors and databases, and offer more
built-in formulas, formatting options, graphing, and macro capabilities than
any of the stand-alone packages. Because RISKOptimizer is an add-in to
Microsoft Excel, users have access to the entire range of functions and
development tools to easily build more realistic models of their system.
RISKOptimizer 321
322 Traditional Optimization vs. Simulation Optimization
Traditional Optimization vs. Simulation
Optimization
RISKOptimizer combines simulation and optimization to allow the
optimization of models with uncertain factors. The optimizer uses the
results from successive runs of the simulation model to guide its search for
better, more optimal solutions. This section provides background
information on how simulation and optimization work together in
RISKOptimizer.
Traditional In the traditional process for optimizing a spreadsheet using an
Spreadsheet optimization add-in such as Solver or Evolver, the following steps are
Optimization undertaken:
Process
1) An output or target cell that you wish to minimize or maximize is
identified.
2) A set of input or adjustable cells whose values you control are
identified, and ranges of possible values for those cells are described.
3) A set of constraints that need to be met, often specified using
expressions such as COSTS<100 or A11>=0 are entered.
4) An optimization is run, in which the spreadsheet is recalculated
successive times using different possible values for the adjustable
cells.
5) During this process:
a) Each recalculation generates a new "answer" or value for the target
cell.
b) The optimizer uses this new target cell value to select the next set of
values for the adjustable cells it will try.
c) Another recalculation is performed, providing another new answer
that the optimizer can use for identifying a new set of values for the
adjustable cells.
This process in 5) repeats over and over again, as the optimizer moves
towards identifying an optimal solution - that is, the set of values for the
adjustable cells that minimizes or maximizes the target cell value.
Simulation Simulation optimization using RISKOptimizer follows many of the same
Optimization steps as the traditional spreadsheet optimization process outlined here.
Process However, changes are made to 1) allow uncertainty to be entered in the
spreadsheet and 2) to use simulation, instead of a simple recalculation of
the spreadsheet, to provide the new target cell "answer" that provides
RISKOptimizer 323
feedback to the optimizer for guiding its selection of a new set of values for
the adjustable cells.
The new process for simulation optimization using RISKOptimizer is
described below, with differences from traditional spreadsheet optimization
shown in bold:
1) Probability distribution functions are used to describe the range of
possible values for the uncertain elements in the model.
2) An output or target cell is identified and the simulation statistic
(mean, standard deviation, etc.) for the cell that you wish to minimize
or maximize is selected.
3) A set of input or adjustable cells whose values you control are
identified and ranges of possible values for those cells are described.
4) A set of constraints that need to be met, often specified using
expressions such as COSTS<100 or A11>=0 are entered. Additional
constraints based on simulation statistics (i.e., 95th Percentile of
A11>1000) can also be entered.
5) An optimization is run, in which the spreadsheet is simulated
successive times, with each simulation using different possible values
for the adjustable cells. During this process:
a) Each simulation generates a new distribution of possible values
for the target cell. The statistic you wish to minimize or
maximize is calculated from this distribution.
b) The optimizer uses this new statistic for the target cell to select the
next set of values for the adjustable cells it will try.
c) Another simulation is performed, providing another new statistic
that the optimizer can use for identifying a new set of values for the
adjustable cells
This process in 5) repeats over and over again, as the optimizer moves
towards identifying an optimal solution - that is, the set of values for the
adjustable cells that minimizes or maximizes the statistic for the simulation
results for the target cell. Figure 2-1 outlines both the traditional
optimization and simulation optimization processes.
RISKOptimizer 325
Each Step of an Optimization with RISKOptimizer
Each step in the simulation optimization process used by RISKOptimizer is
detailed here:
Entering Probability distributions are used in RISKOptimizer to describe the
Probability uncertainty present in the components of a model. For example, you could
Distributions enter RiskUniform(10,20) to a cell in your worksheet. This specifies that the
values for the cell will be generated by a uniform distribution with a
minimum of 10 and a maximum of 20. This range of values replaces the
single "fixed" value required by Excel. In traditional spreadsheet
optimization, no uncertainty can be added to a model so probability
distributions are not used.
In RISKOptimizer, a simulation of your model is run for each possible
combination of input values generated by the optimizer. Distribution
functions are used by RISKOptimizer during these simulations for sampling
sets of possible values. Each iteration of a simulation uses a new set of
values sampled from each distribution function in your worksheet. These
values are then used in recalculating your worksheet and generating a new
value for your target cell.
As with Excel functions, distribution functions contain two elements, a
function name and argument values which are enclosed in parentheses. A
typical distribution function is:
RiskNormal(100,10)
Like Excel functions, distribution functions may have arguments which are
references to cells or expressions. For example:
RiskTriang(B1,B2*1.5,B3)
In this case the cell value would be specified by a triangular distribution
with a minimum value taken from cell B1, a most likely value calculated by
taking the value for cell B2 and multiplying it by 1.5 and a maximum value
taken from cell B3.
Distribution functions also may be used in cell formulas, just as are Excel
functions. For example, a cell formula could read:
B2: 100+RiskUniform(10,20)+(1.5*RiskNormal(A1,A2))
For more information on entering probability distributions, see Distribution
Functions in this manual or Help.
RISKOptimizer 327
Entering In RISKOptimizer, as in traditional spreadsheet optimization, hard
Constraints constraints that must be met can be entered. In traditional spreadsheet
optimization, hard constraints are tested for each trial solution. If they are
not met, the solution is discarded.
In RISKOptimizer, a full simulation is run for each trial solution. Each
simulation is comprised of a number of iterations, or individual
recalculations of the spreadsheet using new samples from probability
distributions in the model. A hard constraint can be tested:
Each iteration of each simulation (an iteration constraint). If an iteration
results in values which violate the hard constraint, the trial solution
rejected. RISKOptimizer may stop a simulation as soon as an iteration
shows the constraint is not met; it may also continue the simulation,
since more complete information about the invalid solution can help in
the search for the best solution. Typically iteration constraints are used
if the values of the constrained cells do not change during a simulation.
At the end of the simulation (a simulation constraint). This type of
constraint is specified in terms of a simulation statistic for a spreadsheet
cell; for example the Mean of A11>1000. In this case, the constraint is
evaluated at the end of a simulation. A simulation constraint, as
opposed to an iteration constraint, will never cause a simulation to be
stopped prior to completion.
A second form of constraints - "soft constraints" can also be used in
RISKOptimizer. The resulting penalties from soft constraints are calculated
at the end of a simulation. Any penalty calculated is added to (or subtracted
from) the target statistic which is being minimized or maximized.
For more information on entering constraints, see the section "Constraints"
in RISKOptimizer Commands.
Setting the In RISKOptimizer, as in traditional spreadsheet optimization, a variety of
Optimization options are available for controlling how long an optimization runs.
and Simulation However, RISKOptimizer adds new options for controlling how long each
Options simulation runs for each trial solution.
RISKOptimizer will search for better solutions and run simulations until the
selected optimization stopping options are met. You might have
RISKOptimizer run a specified number of minutes, run until it has
generated a specific number of trial solutions or run until the best
simulation statistic for the target cell has not changed significantly for a
given number of trials.
328 Traditional Optimization vs. Simulation Optimization
You can also specify how long each trial solution's simulation will run. You
may select to have each simulation run a specified number of iterations or,
alternatively, let RISKOptimizer determine when to stop each simulation.
When you select to have RISKOptimizer decide stop each simulation it will
stop simulating when distributions generated for both 1) the target cell of
the optimization and 2) cells referenced in simulation constraints are stable
and the statistics of interest converge.
Running the When RISKOptimizer runs an optimization the spreadsheet is simulated
Optimization successive times, with each simulation using different possible values for
the adjustable cells. During this process:
1) The optimizer generates a set of values for the adjustable cells.
2) The spreadsheet is simulated with the adjustable cells set to the
values generated by the optimizer . In each iteration of the
simulation all distribution functions in the spreadsheet are
sampled and the spreadsheet is recalculated, generating a new
value for the target cell.
3) At the end of each simulation a new distribution of possible
values for the target cell is generated. The statistic you wish to
minimize or maximize is calculated from this distribution. If any
simulation constraints are not met, the trial solution and simulation
results are discarded and the optimizer generates a new trial
solution to be simulated
4) The optimizer uses the new statistic for the target cell calculated in
the simulation to select the next set of values for the adjustable cells
it will try.
5) Another simulation is performed, providing another new statistic
that the optimizer can use for identifying a new set of values for
the adjustable cells
This process repeats itself over and over again, as the optimizer moves
towards identifying an optimal solution - that is, the set of values for the
adjustable cells that minimizes or maximizes the statistic for the target cell.
RISKOptimizer 329
330 Traditional Optimization vs. Simulation Optimization
RISKOptimizer: Step-by-Step
Introduction
Here we will take you through an entire RISKOptimizer optimization one
step at a time. We will start by opening a pre-made spreadsheet model, and
then we will define the problem to RISKOptimizer using probability
distributions and the RISKOptimizer dialogs. Finally we will oversee
RISKOptimizers progress as it is searching for solutions, and explore some
of the many options in the RISKOptimizer Watcher.
NOTE: The screens shown below are from Excel 2010. If you are using other
versions of Excel, your windows may appear slightly different from the
pictures.
The problem-solving process begins with a model that accurately represents
your problem. Your model needs to include probability distributions that
describe the range of possible values for any uncertain elements. Your
model must also be able to evaluate the target cell and constraints for given
values of adjustable cells. As RISKOptimizer searches for solutions, the
simulation results provide feedback, telling RISKOptimizer how good or
bad each guess is, thereby allowing RISKOptimizer to generate increasingly
better guesses. When you create a model of your problem, you must pay
close attention to how the target cell value is calculated, because
RISKOptimizer will be doing everything it can to maximize (or minimize)
the simulation results for this cell.
RISKOptimizer 331
Starting RISKOptimizer
Opening an To review the features of RISKOptimizer, you'll examine a RISKOptimizer
Example Model example model that was installed when you installed @RISK. To do this:
1) Open the AIRLINE REVENUE MANAGEMENT - WALKTHROUGH
TUTORIAL.XLS worksheet from your
RISK6\Examples\RISKOptimizer Examples directory.
This example sheet contains a yield management model which identifies the
optimal limits on the number of full and discount fare seats to sell on a
given flight. This is a classic overbooking problem: more tickets than the
number of available seats may be sold, if that maximizes expected profit
(taking into account the possible cost of bumping passengers from flights).
Theres just one catch to this standard optimization problem -- some
estimates in the model are uncertain or stochastic. This includes the
demand for tickets and the number of passengers in each fare category that
will actually show up to board the flight. Traditionally, single point
estimates are used for these items, allowing a normal optimization to be
performed. But what if your estimates arent right? You might end up
taking too few reservations, sending seats out empty, or overbooking too
much. You could sell too many discount seats lowering your profit. You
might also set aside too many full fare seats, resulting in half-filled planes.
RISKOptimizer will solve this optimization problem while allowing you to
account for the uncertainty inherent to your model!
332 RISKOptimizer: Step-by-Step
With the Airlines example, first you will describe the uncertainty present in
your model using probability distributions. You will then use @RISK
dialogs (mainly those specific to optimization functionality) to set up your
optimization problem. Then, RISKOptimizer will run to identify the
optimal limits on the number of full and discount fare reservations to
maximize profit while keeping risk at acceptable levels.
RISKOptimizer 333
2) Enter the formula =ROUND(RiskNormal(C15,C16),0). The Excel
ROUND function simply takes the sample returned by the RiskNormal
function and rounds it to the nearest integer. (You can't have 175.65
tickets demanded!)
RISKOptimizer 335
Selecting the Statistic for the Target Cell
"Profit" in cell F20 in the Airline Revenue Management - Walkthrough
Tutorial.xls model is what's known as the target cell. This is the cell whose
simulation statistic you are trying to minimize or maximize, or the cell
whose simulation statistic you are trying to make as close as possible to a
pre-set value. To specify the simulation statistic for the target cell:
1) Set the Optimization Goal option to Maximum.
2) Enter the target cell, $F$20, in the Cell field.
3) Select "Mean" from the dropdownStatistic list to select the Mean as
the simulation statistic to maximize.
Cell references can be entered in RISKOptimizer dialog fields two ways: 1)
You may click in the field with your cursor, and type the reference directly
into the field, or 2) with your cursor in the selected field, you may click on
Reference Entry icon to select the worksheet cell(s) directly with the mouse.
This specifies the last adjustable cell, C20, representing the total reservations
that will be allotted to full fare seats.
If there were additional variables in this problem, we would continue to add
sets of adjustable cells. In RISKOptimizer, you may create an unlimited
number of groups of adjustable cells. To add more cells, click the Add
button once again.
RISKOptimizer 337
Later, you may want to check the adjustable cells or change some of their
settings. To do this, simply edit the min-max range in the table. You may
also select a set of cells and delete it by clicking the Delete button.
Selecting a When defining adjustable cells, you can specify a solving method to be used.
Solving Method Different types of adjustable cells are handled by different solving methods.
Solving methods are set for a Group of adjustable cells and are changed by
clicking the Group button and displaying the Adjustable Cell Group
Settings dialog box. Often you'll use the default recipe solving method
where each cells value can be changed independently of the others. Since
this is selected as the default method, you don't have to change it.
The recipe and order solving methods are the most popular and they
can be used together to solve complex combinatorial problems. Specifically,
the recipe solving method treats each variable as an ingredient in a recipe,
trying to find the best mix by changing each variables value
independently. In contrast, the order solving method swaps values
between variables, shuffling the original values to find the best order.
RISKOptimizer 339
Constraints are displayed in the bottom Constraints section of the
RISKOptimizer Model dialog box. Two types of constraints can be specified
in RISKOptimizer:
Hard. These are conditions that must be met for a solution to be valid
(i.e., a hard iteration constraint could be C10<=A4; in this case, if a
solution generates a value for C10 that is greater than the value of cell
A4, the solution will be thrown out)
Soft. These are conditions which we would like to be met as much as
possible, but which we may be willing to compromise for a big
improvement in fitness or target cell result. (i.e., a soft constraint could
be C10<100. In this case, C10 could go over 100, but when that happens
the calculated value for the target cell would be decreased according to
the penalty function you have entered).
Adding a To add a constraint:
Constraint
1) Click the Add button in the Constraints section of the main
RISKOptimizer dialog.
This displays the Constraint Settings dialog box, where you enter the
constraints for your model.
RISKOptimizer 341
To enter the constraints for the Airlines model you'll specify two new
constraints. First, enter the Simple Range of Values format hard constraint for
Profit > 0:
1) Enter "Make at Least $15,000" in the description box.
2) In the Range to Constrain box, enter F20.
3) Select the > operator to the right of the Range to Constrain.
4) Enter 15,000 in the Maximum box
5) To the left of Range to Constrain, clear the operator by selecting a
blank from the drop down list
6) Select Percentile (X for a given P) in Statistic to Constrain
7) Enter 0.05 for the percentile to use
8) Click OK to enter this constraint.
In the Optimization Settings dialog you can select any combination of these
optimization stopping conditions, or none at all. If you select more than one
stopping condition, RISKOptimizer will stop when any one of the selected
conditions are met. If you do not select any stopping conditions,
RISKOptimizer will run until all the possible solutions have been tried, or
until you stop it manually by pressing the stop button in the
RISKOptimizer toolbar.
RISKOptimizer 343
Trials Time Progress Formula is True
This option sets the RISKOptimizer will This stopping RISKOptimizer will
number of stop after the condition is the most stop if the entered
simulations that you specified amount of popular because it Excel formula
would like time has elapsed. keeps track of the evaluates to TRUE in
RISKOptimizer to This number can be a improvement and a simulation.
run. RISKOptimizer fraction (4.25). allows
runs a simulation for RISKOptimizer to run
one complete set of until the rate of
variables or one improvement has
possible solution to decreased. For
the problem. example,
RISKOptimizer could
stop if 100
simulations have
passed and we still
havent had any
change in the best
scenario found so far.
During the run, the Progress window displays: 1) the best solution found so
far, 2) the original value for the selected simulation statistic for the target
cell when the RISKOptimizer optimization began, 3) the number of
simulations of your model that have been executed and number of those
simulations which were valid; i.e., all constraints were met and 4) the time
that has elapsed in the optimization.
RISKOptimizer 345
@RISK also displays the distribution for the Profit for each new best solution
found. Examining this graph youll notice that the 5th percentile of Profit is
greater than 15000 for the best solution.
Any time during the run you can click the Turn Excel Updating Options
On and Off; with this option on, the screen will update every iteration.
The RISKOptimizer can also display a running log of the simulations performed
RISKOptimizer for each trial solution. This is displayed in the RISKOptimizer Watcher
Watcher while RISKOptimizer is running. The RISKOptimizer Watcher allows you
to explore and modify many aspects of your problem as it runs. To view a
running log of the simulations performed:
1) Click the Watcher (magnifying glass) icon in the Progress window to
display the RISKOptimizer Watcher
2) Click the Log tab.
In this report the results of the simulation run for each trial solution is
shown. The column for Result shows by simulation the value of the target
cell's statistic that you are trying to maximize or minimize - in this case, the
mean of Profit in F20. Columns for Output Mean, Output StdDev, Output
Min and Output Max describe the probability distribution for the target cell
Profit that was calculated by each simulation. The columns for C19 and C20
identify the values used for your adjustable cells. The column for Make at
Least $15,000 shows whether your constraint was met in each simulation.
These same options will automatically appear when any of the stopping
conditions that were set in the RISKOptimizer Optimization Settings dialog
are met.
RISKOptimizer 347
RISKOptimizer can create an optimization summary report that contains
Summary
Report information such as date and time of the run, the optimization settings used,
the value calculated for the target cell and the value for each of the
adjustable cells.
RISKOptimizer 349
IMPORTANT NOTE: Although in our example you can see that
RISKOptimizer found a solution which yielded a total profit of 20111.29,
your result may be higher or lower than this. RISKOptimizer may have also
found a different combination of Limit on Discount Tickets and Limit on
Full Fare Tickets that produced the same total score. These differences are
due to an important distinction between RISKOptimizer and all other
problem-solving algorithms: it is the random nature of RISKOptimizers
optimization engines that enables it to solve a wider variety of problems,
and find better solutions.
When you save any sheet after RISKOptimizer has run on it (even if you
restore the original values of your sheet after running RISKOptimizer), all
of the RISKOptimizer settings in the RISKOptimizer dialogs will be saved
along with that sheet. The next time that sheet is opened, all of the most
recent RISKOptimizer settings load up automatically. All of the other
example worksheets have the RISKOptimizer settings pre-filled out and
ready to be optimized.
RISKOptimizer 351
Options in the Model dialog include:
Optimization Goal. The Optimization Goal option determines what
kind of answer RISKOptimizer is to search for. If Minimum is selected,
RISKOptimizer will look for variable values that produce the smallest
possible value for the selected statistic of the simulation results for the
target cell (all the way down to -1e300). If Maximum is selected,
RISKOptimizer will search for the variable values that result in the
largest possible value for the selected statistic (up to +1e300).
If Target Value is selected, RISKOptimizer will search for variable values
that produce a value for the selected statistic as close as possible to the
value you specify. When RISKOptimizer finds a solution which
produces this result, it will automatically stop. For example, if you
specify that RISKOptimizer should find the mean of the distribution of
simulation results that is closest to 14, RISKOptimizer might find
scenarios that result in a mean such as 13.7 or 14.5. Note that 13.7 is
closer to 14 than 14.5; RISKOptimizer does not care whether the
statistic's value is greater or less than the value you specify, it only looks
at how close the value is.
Cell. The cell or target cell contains the output of your model. A
distribution of possible values for this target cell will be generated (via
simulation) for each "trial solution" that RISKOptimizer generates (i.e.,
each combination of possible adjustable cell values). The target cell
should contain a formula which depends (either directly or through a
series of calculations) on the adjustable cells. This formula can be made
with standard Excel formulas such as SUM() or user-defined VBA
macro functions. By using VBA macro functions you can have
RISKOptimizer evaluate models that are very complex.
As RISKOptimizer searches for a solution it uses the statistic for the
simulation results of the target cell to evaluate how good each possible
scenario is, and to determine which variable values should continue to
be adjusted. When you build your model, your target cell must reflect
the goodness of any given scenario, so as RISKOptimizer calculates
the possibilities, it can accurately measure its progress.
To select the statistic for the target cell which you wish to minimize,
maximize, or set to a specific value, simply select the desired statistic from
the displayed dropdown list. If you wish to select a Percentile or Target for
the target cell's distribution, simply:
1) Select Percentile (X for given P) or Target (P for given X).
2) For Percentile (X for given P), enter the desired "P" value between 0
and 100 in the % field. The value that will be minimized or maximized
will be the value associated with the entered percentile; i.e., Percentile
(99%) will cause RISKOptimizer to identify the combination of
adjustable cell values that minimizes or maximizes the 99th percentile of
the distribution of simulation results for the target cell.
3) For Target (P for given X), enter the desired "X" value. The value that
will be minimized or maximized will be the cumulative probability
associated with the entered value; i.e., Target (1000) will cause
RISKOptimizer to identify the combination of adjustable cell values that
minimizes or maximizes the cumulative probability of the value 1000
(as calculated using the distribution of simulation results for the target
cell).
RISKOptimizer 353
Users may choose to collect statistics inside their models by using
@RISK/RISKOptimizer statistic functions like RiskMean. To optimize the
value of such a cell, the statistic to optimize does not need to be specified,
since the cell itself contains that information. In this case, select the Value
option from the Statistic dropdown list, telling RISKOptimizer to optimize
the value of a given cell at the end of a simulation. For example, if a user
wishes to optimize the mean of cell C5, they can type =RiskMean(C5) in cell
C6, specify C6 as the cell to optimize in the Model dialog, and select Value
from the Statistic dropdown list. This is equivalent to specifying C5 as the
cell to optimize, and selecting Mean from the Statistic dropdown list.
Because the adjustable cells contain the variables of the problem, you must
define at least one group of adjustable cells to use RISKOptimizer. Most
problems will be described with only one group of adjustable cells, but
more complex problems may require different blocks of variables to be
solved with different solving methods simultaneously. This unique
architecture allows for highly complex problems to be easily built up from
many groups of adjustable cells.
The following options are available for entering Adjustable Cell Ranges:
Add. You can add new adjustable cells by clicking on the Add button
next to the Adjustable Cells list box. Select the cell or cell range to be
added, and a new row will appear in the Adjustable Cell Ranges table.
In the table, you can enter a Minimum and Maximum value for the
cells in the range, along with the type of Values to test Integer values
across the range, Discrete values with a defined step size, or Any values.
Minimum and Maximum. After you have specified the location of the
adjustable cells, the Minimum and Maximum entries set the range of
acceptable values for each adjustable cell. By default, each adjustable
cell takes on a real-number (double-precision floating point) value
between -infinity and +infinity.
Range settings are constraints that are strictly enforced. RISKOptimizer
will not allow any variable to take on a value outside the set ranges.
You are encouraged to set more specific ranges for your variables
whenever possible to improve RISKOptimizers performance. For
example, you may know that the number cannot be a negative, or that
RISKOptimizer 355
RISKOptimizer should only try values between 50 and 70 for a given
variable.
Range. The reference for the cell(s) to be adjusted is entered in the
Range field. This reference can be entered by selecting the region in the
spreadsheet with the mouse, entering a range name or typing in a valid
Excel reference such as Sheet1!A1:B8. The Range field is available for
all solving methods. For recipe and budget methods, however,
Minimum, Maximum and Values options can be added to allow the entry
of a range for the adjustable cells.
NOTE: By assigning tight ranges to your variables, you can limit the
scope of the search, and speed up RISKOptimizers convergence on a
solution. But be careful not to limit the ranges of your variables too
tightly; this may prevent RISKOptimizer from finding optimal
solutions.
RISKOptimizer 357
The recipe solving method, for example, treats each variable selected as
an ingredient in a recipe; each variables value can be changed
independently of the others. In contrast, the order solving method swaps
values between the adjustable cells, reordering the values that were
originally there.
There are six solving methods that come with RISKOptimizer. Three of the
solving methods (recipe, order, and grouping) use entirely different
algorithms. The other three are descendants of the first three, adding
additional constraints.
The following section describes the function of each solving method. To get
a better understanding of how each solving method is used, you are also
encouraged to explore the example files included with the software.
Recipe Solving The recipe solving method is the most simple and most popular type of
Method solving method. Use recipe whenever the set of variables that are to be
adjusted can be varied independently of one another. Think of each
variable as the amount of an ingredient in a cake; when you use the recipe
solving method, you are telling RISKOptimizer to generate numbers for
those variables in an effort to find the best mix. The only constraint you
place on recipe variables is to set the range (the highest and lowest value)
that those values must fall between. Set these values in the Min and Max
fields in the Adjustable Cells dialog (e.g. 1 to 100), and also indicate
whether or not RISKOptimizer should be trying integers (1, 2, 7) or real
numbers (1.4230024, 63.72442).
Grouping The grouping solving method should be used whenever your problem
Solving Method involves multiple items to be grouped together in sets. By default, the
number of different groups that RISKOptimizer creates will be equal to the
number of unique values present in the adjustable cells at the start of an
optimization. If some of the groups are not represented in the workbook at
the beginning of optimization, make sure to specify the list of group IDs
using the Group IDs" field in the Adjustable Cell Group Settings dialog:
Using the Group IDs field allows one to specify a cell range containing all
the group IDs.
RISKOptimizer 359
If the option All Groups Must Be Used is selected, RISKOptimizer will not
attempt any solutions in which there is a group without any items in it.
For example, suppose a range of 50 cells contains only the values 2, 3.5, and
17. When you select the 50 cells and adjust the values using the grouping
solving method, RISKOptimizer will assign each of the fifty cells to one of
the three groups, 2, 3.5 or 17. All of the groups are represented by at least
one of the adjustable cells; just like tossing each of the 50 variables in one of
several bins, and making sure there is at least one variable in each bin.
Another example would be assigning 1s, and 0s, and -1s to a trading system
to indicate buy, sell and hold positions. Like the order solving method,
RISKOptimizer is arranging existing values, so there is no min-max range or
integers option to define.
NOTE: When using the grouping solving method, do not leave any cells
blank, unless you would like 0.0 to be considered one of the groups.
You may realize that the grouping solving method could be
approximated by using the recipe solving method with the integers
option on and the ranges set from 1 to 3 (or whatever number of groups
there are). The difference lies in the way a recipe and a grouping perform
their search. A grouping is much more concerned with the values of all the
variables, because it can swap a set of variables from one group with a set of
variables from another group.
Instead of using the budget solving method, one could use the recipe
solving method and add a constraint specifying a fixed total value of the
adjustable cells. This approach will work well if the OptQuest engine is
used. However, with the Genetic Algorithm the budget method will be
more efficient.
RISKOptimizer 361
Project Solving The project solving method is similar to the order solving method
Method except that certain items (tasks) must precede others. The project solving
method can be used in project management to rearrange the order in which
tasks are carried out, but the order will always meet the precedence
constraints.
A problem modeled using the Project solving method will be much easier to
work with and understand if the adjustable cells containing the task order
are in a single column, rather than in a row. This is because the solving
method expects the preceding tasks cells to be arranged vertically rather
than horizontally, and it will be easier to examine your worksheet if the
adjustable cells are also vertical.
After you have specified the location of the adjustable cells, you should
specify the location of the preceding tasks cells in the Preceding Tasks section
of the dialog. This is a table of cells that describes which tasks must be
preceded by which other tasks. The solving method uses this table to
rearrange the order of variables in a scenario until the precedence
constraints are met. There should be one row in the preceding tasks range
for each task in the adjustable cells. Starting in the first column of the
preceding tasks range, the identifying number of each task on which that
rows task depends should be listed in separate columns.
In the Optimization Parameters section, you will notice that you can also have
a constraint cell range attached to it. This range can be of any length, but
must be exactly three columns wide. Eight kinds of constraints are
recognized:
1) (with) The tasks in the 1st & 3rd columns must occur in the same time block.
2) (not with) The tasks in the 1st & 3rd columns must not occur in the same time
block.
3) (before) The task in the 1st column must occur before the task in the 3rd
column.
4) (at) The task in the 1st column must occur in the time block in the 3rd column.
RISKOptimizer 363
5) (not after) The task in 1st column must occur at the same time or before the
task in the 3rd column.
6) (not before) The task in 1st column must occur at the same time or after the
task in the 3rd column.
7) (not at) The task in the 1st column must not occur in the time block in the 3rd
column.
8) (after) The task in the 1st column must occur after the task in the 3rd column.
Either a numeric code (1 through 8) or the description (after, not at, etc.) can
be entered for a constraint. (Note: All language versions of the
RiskOptimizer will recognize the English description entered for a
constraint as well as the its translated form). All of the constraints specified
in your problem will be met. To create constraints, find an empty space on
your worksheet and create a table where the left and right columns
represent tasks, and the middle column represents the type of constraints.
A number from 1 to 8 represents the kind of constraint listed above. The
cells in the constraint range must have the constraint data in them before
you start optimizing.
NOTE: When you select the schedule solving method, integers starting from
1 are always used (1,2,3...), regardless of the original values in the
adjustable cells.
Number of Time For more information on these options, see the Schedule Solving method in
Blocks and the Solving Methods section of this chapter.
Constraint Cells
Preceding For more information on these options, see the Project Solving method in the
Tasks Solving Methods section of this chapter.
RISKOptimizer 365
Constraints
RISKOptimizer allows you to enter constraints, or conditions that must be
met for a solution to be valid. Constraints you have entered are shown in
the Constraints table in the Model Definition dialog box.
Add - Adding Clicking the Add button next to the Constraints table displays the
Constraints Constraint Settings dialog box where constraints are entered. Using this
dialog box the type of constraint desired, along with its description, type,
definition and evaluation time can be entered.
Evaluation Time Hard constraints may be evaluated 1) each iteration of a simulation run for
a trial solution (an iteration constraint), or 2) at the end of the
simulation run for a trial solution (a simulation constraint).
An iteration constraint is a constraint that is evaluated each iteration of
a simulation run for a given trial solution. If an iteration results in
values which violate the hard constraint, the trial solution is rejected.
RISKOptimizer may stop a simulation as soon as an iteration shows the
constraint is not met; it may also continue the simulation, since more
complete information about the invalid solution can help in the search
for the best solution. Typically iteration constraints are used if the
values of the constrained cells do not change during a simulation.
A simulation constraint is specified in terms of a simulation statistic for
a spreadsheet cell; for example the Mean of A11>1000. In this case, the
constraint is evaluated at the end of a simulation. A simulation
constraint, as opposed to an iteration constraint, will never cause a
simulation to be stopped prior to completion.
RISKOptimizer 367
Evaluation Time can be left as Automatic. In this case if values of
constrained cells do not change during a simulation, the constraint will be
treated as an iteration constraint; otherwise it will be treated as a simulation
constraint.
Simulation A simulation constraint is specified in terms of a simulation statistic for a
Constraints spreadsheet cell; for example the Mean of A11>1000. The statistic to use in
the constraint is selected from the available dropdown list:
RISKOptimizer 369
More information about penalty functions is as follows:
Entering a Penalty Function. RISKOptimizer has a default penalty
function which is displayed when you first enter a soft constraint. Any
valid Excel formula, however, may be entered to calculate the amount
of penalty to apply when the soft constraint is not met. An entered
penalty function should include the keyword deviation which
represents the absolute amount by which the constraint has gone
beyond its limit. At the end of each simulation for a trial solution
RISKOptimizer checks if the soft constraint has been met; if not, it places
the amount of deviation in the entered penalty formula and then
calculates the amount of penalty to apply to the target cell statistic.
The penalty amount is either added or subtracted from the calculated
statistic for the target cell in order to make it less "optimal". For
example, if Maximum is selected in the Optimization Goal field in the
RISKOptimizer Model Dialog, the penalty is subtracted from the
calculated statistic for the target cell.
Viewing the Effects of an Entered Penalty Function. RISKOptimizer
includes an Excel worksheet Penalty Functions And Soft Constraints
In Riskoptimizer.XLS which can be used to evaluate the effects of
different penalty functions on specific soft constraints and target cell
results.
RISKOptimizer 371
Settings Command Runtime Tab
Defines the runtime settings for an optimization
The Optimization Settings dialog Runtime tab displays RISKOptimizer
settings that determine the runtime of the optimization. These stopping
conditions specify how and when RISKOptimizer will stop during an
optimization. Once you select the Start Optimization command,
RISKOptimizer will continuously run, searching for better solutions and
running simulations until the selected stopping criteria are met. You can
turn on any number of these conditions, or none at all; if you do not select
any stopping conditions, RISKOptimizer will run until all the possible
solutions have been tried, or until you stop it manually by pressing the
stop button. When multiple conditions are checked, RISKOptimizer stops
as soon as one of the chosen conditions is met. You may also override these
selections and stop RISKOptimizer at any time manually using the stop
button in the RISKOptimizer Watcher or Progress windows.
RISKOptimizer 373
plateau or flatten out for a while before this condition is met and
RISKOptimizer stops. Progress is really just an automatic way to do
what you could do yourself with the graph -- let it run until the
improvement levels off.
Formula is True. This stopping condition causes the optimization to
stop whenever the entered (or referenced) Excel formula evaluates to
TRUE during the optimization.
Stop on Error. This stopping condition causes the optimization to stop
whenever an Error value is calculated for the target cell.
NOTE: You can also select no stopping conditions, in which case
RISKOptimizer will run until all the possible solutions have been tried, or
until you stop it manually by pressing the stop button..
Simulation RISKOptimizer runs a full simulation of your model for each trial solution it
Runtime generates, stopping the simulation based on @RISK simulation settings.
Options Those settings may specify a fixed number of iterations or may instruct
@RISK to stop automatically based on convergence of the values of
statistics.
Optimization In most cases, RISKOptimizer can automatically detect which engine will
Mode give the best and fastest solutions to your model. The Automatic setting
specifies this. However, there may be times when you wish to specify that
specific engine should be used. You might, for example, have a model that
requires the Project or Schedule solving methods that are only available
with the Genetic Algorithm engine.
Optimize Using Two optimization engines - Genetic Algorithm and OptQuest - are
available to search for optimum solutions to a problem.
The Genetic Algorithm engine is that which originated in Evolver,
Palisades solver and was used in pre 6.0 versions of RISKOptimizer. The
Genetic Algorithm engine mimics Darwinian principles of natural selection
by creating an environment where hundreds of possible solutions to a
problem can compete with one another, and only the fittest survive. Just
as in biological evolution, each solution can pass along its good genes
through offspring solutions so that the entire population of solutions will
continue to evolve better solutions.
The OptQuest Engine uses metaheuristic, mathematical optimization, and
neural network components to guide the search for best solutions to
decision and planning problems of all types. OptQuests methods integrate
state-of-the-art metaheuristic procedures, including Tabu Search, Neural
Networks, Scatter Search, and Linear/Integer Programming, into a single
composite method.
RISKOptimizer 375
Genetic Algorithm Settings on the Engine tab include:
Genetic
Algorithm Population Size. The population size tells RISKOptimizer how many
Settings organisms (or complete sets of variables) should be stored in memory at any
given time. Although there is still much debate and research regarding the
optimal population size to use on different problems, generally we
recommend using 30-100 organisms in your population, depending on the
size of your problem (bigger population for larger problems). The common
view is that a larger population takes longer to settle on a solution, but is
more likely to find a global answer because of its more diverse gene pool.
Crossover and Mutation. One of the most difficult problems with searching
for optimal solutions, when your problem has seemingly endless
possibilities, is in determining where to focus your energy. In other words,
how much computational time should be devoted to looking in new areas of
the solution space, and how much time should be devoted to fine-tuning
the solutions in our population that have already proven to be pretty good?
A big part of the genetic algorithm success has been attributed to its ability
to preserve this balance inherently. The structure of the GA allows good
solutions to breed, but also keeps less fit organisms around to maintain
diversity in the hopes that maybe a latent gene will prove important to
the final solution.
Crossover and Mutation are two parameters that affect the scope of the
search, and RISKOptimizer allows users to change these parameters before,
and also during the evolutionary process. This way, a knowledgeable user
can help out the GA by deciding where it should focus its energy. For most
purposes, the default crossover and mutation settings (.5 and .1
respectively) do not need adjustment. In the event that you wish to fine-
tune the algorithm to your problem, conduct comparative studies, or just to
experiment, here is a brief introduction to these two parameters:
Crossover. The crossover rate can be set to between 0.01 and 1.0, and
reflects the likelihood that future scenarios or organisms will contain
a mix of information from the previous generation of parent organisms.
This rate can be changed by experienced users to fine-tune
RISKOptimizers performance on complex problems.
In other words, a rate of 0.5 means that an offspring organism will
contain roughly 50% of its variable values from one parent and the
remaining values from the other parent. A rate of 0.9 means that
roughly 90% of an offspring organisms values will come from the first
parent and 10% will come from the second parent. A Crossover rate of
RISKOptimizer 377
RISKOptimizer includes selectable genetic operators when used with the
Operators
Recipe solving method. Clicking the Operators button in the Optimization
Settings dialog Engine tab allows you to select a specific genetic operator
(such as heuristic crossover or boundary mutation) to be used when
generating possible values for a set of adjustable cells. In addition, you can
have RISKOptimizer automatically test all available operators and identify
the best performing one for your problem.
RISKOptimizer 379
Settings Command Macros Tab
Defines macros to be run during an optimization
VBA macros can be run at different times during an optimization and
during the simulation run for each trial solution. This allows the
development of custom calculations that will be invoked during an
optimization.
RISKOptimizer 381
Options on the RISKOptimizer Toolbar of the Progress window include:
Display Excel Updating Options. Turn Excel Updating Options On
and Off. With this option on, the screen will update every iteration.
Display RISKOptimizer Watcher. Displays the full RISKOptimizer
Watcher window.
Run. Clicking the Run icon causes RISKOptimizer to begin searching
for a solution based on the current description in the RISKOptimizer
Model Dialog. If you pause RISKOptimizer you will still be able to click
the Run icon to continue the search for better solutions.
Pause. If you would like to pause the RISKOptimizer process, just click
the Pause icon, and you temporarily freeze the RISKOptimizer
process. While paused, you may wish to open and explore the
RISKOptimizer Watcher and change parameters, look at the whole
population, view a status report, or copy a graph.
Stop. Stops the optimization.
Graph of Best During an optimization @RISK also displays the distribution for the
Solution optimization goal cell for each new best solution found. This happens when
the @RISK Simulation Settings Automatically Display Output Graph is
selected.
RISKOptimizer 383
A button in the Progress Window allows the user to switch to the
RISKOptimizer Watcher. In the Constraint Solver mode the details of
optimization progress are available like in regular mode optimizations, in
Progress, Summary, Log, Population and Diversity tabs. In the Constraint
Solver mode the Watcher contains an additional tab, entitled Constraint
Solver. This tab shows the status of each hard constraint (Met or Not Met)
for the Best, Original, and Last solution.
RISKOptimizer 385
386 RISKOptimizer Commands
RISKOptimizer Watcher
The magnifying glass icon on the RISKOptimizer Progress window toolbar
displays the RISKOptimizer Watcher. RISKOptimizer Watcher is
responsible for regulating and reporting on all RISKOptimizer activity.
From RISKOptimizer Watcher, you can change parameters and analyze the
progress of the optimization. You can also see real-time information about
the problem and information on RISKOptimizers progress in the status bar
across the bottom of RISKOptimizer Watcher.
RISKOptimizer 387
RISKOptimizer Watcher Progress Tab
Displays progress graphs for target cell value
The Progress Tab in the RISKOptimizer Watcher graphically shows how
results are changing, by simulation, for the selected target cell.
Progress graphs show the simulation count on the X-axis and target cell
value on the Y-axis. Right-clicking on the Progress graph can display the
Graph Options dialog where the graph can be customized.
RISKOptimizer 389
RISKOptimizer Watcher Summary Tab
Displays details for adjustable cell values
The Summary Tab in the RISKOptimizer Watcher displays a summary table
of adjustable cell values tested during the optimization. If the Genetic
Algorithm engine is in use, tools for adjusting the crossover and mutation
rate for each Adjustable Cell Group in the model are also displayed.
The Show options select to show a log of All Trials or only those
simulations where there was a Progress Step (i.e. where the optimization
result improved). The log includes:
1) Elapsed Time, or the start time of the simulation
2) Iters, or the number of iterations run
3) Result, or the value of the target cell's statistic that you are trying to
maximize or minimize, including penalties for soft constraints
4) Output Mean, Output StdDev, Output Min and Output Max, or the
statistics for the probability distribution for the target cell that was
calculated
5) Input columns, or the values used for your adjustable cells
6) Constraint columns showing whether your constraints were met
RISKOptimizer 391
RISKOptimizer Watcher Population Tab
Lists all the variables of each organism (each possible solution) in
the current population
If the Genetic Algorithm engine is in use, the Population Tab is shown. The
Population Tab includes a grid which lists all the variables of each organism
(each possible solution) in the current population. These organisms (Org
n) are ranked in order from worst to best. Since this table lists all
organisms in the population, the population size setting in the
RISKOptimizer Settings dialog determines how many organisms will be
listed here (default 50). In addition, the first column of the chart shows the
resulting value of the target cell for each organism.
RISKOptimizer 393
RISKOptimizer Watcher Stopping Options Tab
Displays stopping options for the optimization
When you click the Stop button, the RISKOptimizer Watcher dialog
Stopping Options tab is displayed. This includes the options available for
updating your worksheet with the best calculated values for adjustable cells,
restoring original values, and generating an optimization summary report.
This dialog will also appear if one of the user specified stopping conditions
has been met (number of requested trials have been evaluated, minutes
requested have elapsed, etc.). The Stopping Options allow you to restore
the adjustable cells to their original values before RISKOptimizer was run.
All of the actions available in the Stopping Options tab can also be
performed using commands on @RISK menu/toolbar. If the Watcher is
dismissed by clicking OK without selecting any of the actions, the user can
still reset adjustable cells to their original values and generate reports using
menu/toolbar commands.
RISKOptimizer 395
Log of All Trials. This report logs the results of all trial simulations
performed. The values shown in magenta indicate that a constraint was
not met.
Log of Progress Steps. This report logs the results of all trial
simulations that improved the result for the target cell.
Introduction
In statistics, economics, and mathematical finance, a time series is a
sequence of observations, typically measured at regularly spaced times,
such as every week, every month, or every quarter. Examples of time series
are weekly currency exchange rates, the daily closing value of the NASDAQ
Composite index, and monthly crude oil prices.
The Time Series section of @RISK provides two types of tools: (1) Fit and
Batch Fit tools for fitting various time series processes to historical data, and
then projecting these to the future, and (2) a Define tool for simulating data
from a selected time series process for use in an @RISK model. The time
series results from such a simulation can be viewed with the normal @RISK
results or by using the Time Series Results window.
The Fit and Batch Fit tools are analogous, in a time series context, to the Fit
and Batch Fit tools in @RISKs Distribution Fitting. The Define tool is
analogous, in a time series context, to @RISKs Define Distribution tool.
Whereas Distribution Fitting and Define Distributions are concerned with
individual probability distributions, the Time Series tools are concerned
with time series processes. These Time Series tools add @RISK functions to
your spreadsheet, just as does @RISKs Define Distribution tool. Different
from standard @RISK distribution functions, these added @RISK time series
functions are array functions as they change the cells where your time series
forecast is located as a group each iteration of a simulation.
The range of data, including the variable names at the top, is shown. You
Name, Range
can change this range if necessary and supply a meaningful name to the
data set. Note that if there is a date variable in the data set, it will be
included in the suggested range. You should change the range so that the
date variable is not included. (Alternatively, you can separate the date
variable from the rest of the data with a blank column.)
Data requirements for sample data include:
You must have at least six data values for each time series.
All sample values should fall in the range -1E+37 <= x <= +1E+37.
There must not be any missing data.
Data You can check the Data Transformations option to apply a number of
Transformations possible transformations to your Time Series.
When you click OK in the Define Time Series dialog, an array formula is
entered in the range you selected. The random data behave just like random
data from any other @RISK distribution function, except that all cells now
change as a group, due to the array formula. (And as usual, all values
appear as the mean of the process unless you toggle the @RISK
Random/Static Standard Recalc dice button on the ribbon or toolbar to
Random, or run an @RISK simulation.)
As another example, you can click Summary to see results for each time
series cell.
Modeling Features
@RISK for Excel allows you to simulate projects through a unique link
between Microsoft Excel and Microsoft Project. @RISK imports a project
.MPP file into Excel where it can be enhanced with Excel formulas and
@RISK distributions. An Excel workbook becomes a new view of your
project, and even includes a Gantt chart similar to what you see in Microsoft
Project.
Once in Excel, changes to project schedules can be made and relevant dates
and costs in the schedule will be updated. This is done by linking the
values shown for the project in Excel with relevant tasks and fields in
Microsoft Project. Behind the scenes, @RISK passes changed Excel values to
Microsoft Project for recalculation and then returns newly calculated values
back to Excel. All scheduling calculations are performed in Microsoft
Project but the results of those calculations are shown in Excel.
Project 425
@RISK allows a far wider scope of modeling capabilities for projects
compared with what is available in Microsoft Project alone. For example,
Excel formulas can be used to perform calculations on values that will be
passed to Microsoft Project. A formula in a cell representing a project task
or resource field can contain an @RISK distribution function or an Excel
function. This will calculate a value in Excel. The calculated value will
then be passed to Microsoft Project for schedule recalculation.
Alternatively, values returned from Microsoft Project (such as a Cost
calculation) can be referenced in formulas in other cells in Excel.
The entire range of modeling and reporting capabilities of @RISK for Excel
are available for use with projects. This includes all probability distribution
functions, correlations, alternate parameters, sensitivity analyses and more.
Users should familiarize themselves with the use of @RISK for Excel with
standard Excel spreadsheets prior to using it with projects.
Additional modeling capabilities specific to the use of @RISK with projects
include:
Risk Categories, where common risk definitions can be applied to
categories or groups of tasks; such as the duration of all testing
tasks.
Parameter Entry Tables, where tables that allow easy entry of
parameter values are setup in Excel
Probabilistic branching, where branching between tasks can
change during a simulation based on probabilities you enter
Probabilistic calendars, where working and non-working periods
can change based on probabilities you enter
Additional reporting capabilities specific to the use of @RISK with projects
include:
Probabilistic Gantt Chart, showing task critical indices and
probabilistic start and finish dates
Timescaled Data Report, showing probabilistic information for
timescaled project data, such as cost per time period.
Using @RISK with projects often requires use of dates in probability
distribution functions. For example, you may wish to use a function which
describes an uncertain start date for a task or project. To learn more about
using dates with @RISK functions, see the section Dates in Functions in the
chapter @RISK: Functions in this manual.
System Requirements
To use the Project simulation capabilities of @RISK for Excel, a copy of
Microsoft Project Version 2003 or higher needs to be installed on your
system. This is in addition to the standard requirements for using @RISK
for Excel. The 64-bit version of Microsoft Project is not supported by the
Project simulation capabilities of @RISK for Excel.
Simulation Speed
Recalculation speed has changed between versions of Microsoft Project and
this impacts the runtimes of @RISK simulations. This is because each
iteration of a simulation @RISK must fully recalculate Microsoft Project.
Recalculations are the fastest in Microsoft Project 2003 and slowest in
Microsoft Project 2007. Microsoft Project 2010 is an improvement over 2007,
but still is substantially slower than Microsoft Project 2003. If you have
large projects in which simulation runtime is an issue, use the fastest
possible hardware configuration, and if possible, run the simulation using
Microsoft Project 2003.
Project 427
428 Risk Analysis for Microsoft Project
Using @RISK with Project Schedules
Introduction
@RISK for Excel allows you to simulate projects through a unique link
between Microsoft Excel and Microsoft Project. @RISK imports a
project contained in an .MPP file into Excel where it can be enhanced
with Excel formulas and @RISK distributions. An Excel workbook
becomes a new view of your project, and even includes a Gantt
chart similar to what you see in Microsoft Project.
When @RISK for Excel is used with projects, a new Project menu is
added to the @RISK ribbon in Excel 2007 or higher (or the @RISK
toolbar in Excel 2003). The commands on this menu allow you to
import project .MPP files into Excel, use Project-specific modeling
tools, generate reports and more.
Get to Know Outside of the Project menu, using @RISK for Excel with project
@RISK for Excel schedules is virtually the same as using @RISK for Excel on standard
Excel spreadsheets. If you know @RISK for Excel, youll know most
of what you need to know for conducting a risk analysis of a project.
If youre new to @RISK for Excel, get to know it first. Take a look at
the tutorials and manual for @RISK for Excel. What you learn will
make it easy to model the risk in your projects.
If you dont have a project open you can use @RISK for Excel as it is
normally used on Excel spreadsheets. Only when you import a
project, or open a workbook with a saved project, do the commands
on the Project menu become available.
A set of example spreadsheets in Project Examples folder of your
@RISK directory illustrate different aspects of using @RISK with
projects. Each of these has a linked .MPP file that is automatically
Project 429
opened in Microsoft Project when you use the example. Take a look
at these to learn more about using @RISK with Project.
Microsoft When you use @RISK for Excel with a project, a copy of Microsoft
Projects Role Project is also running at the same time. The project you are working
with @RISK for on in Excel is also open in Microsoft Project. This is because @RISK
Excel uses Microsoft Project to perform scheduling recalculations.
In the Excel view of your project, changes to project schedules can be
made and relevant dates and costs in the schedule shown in Excel will
be updated when you sync Excel with your project. @RISK links
the values shown for the project in Excel with relevant tasks and
fields in Microsoft Project. Behind the scenes, @RISK passes changed
Excel values to Microsoft Project for recalculation and then returns
newly calculated values back to Excel. All scheduling calculations are
performed in Microsoft Project but the results of those calculations are
shown in Excel.
You can view and change your project in Microsoft Project while
using @RISK. If you make changes that affect what is displayed in
Excel, @RISK will syncup those changes when you select the Sync
Now command on @RISKs Project menu.
When importing an .MPP file into Excel, @RISK first opens the
selected project in Microsoft Project and then reads task, resource and
field values from the project. It then builds one or more new Excel
worksheets, creating a view of your project in Excel. Separate
worksheets are created for project tasks and resources.
Project 431
When a project used with earlier versions of @RISK for Project is
Importing imported into @RISK for Excel, the @RISK elements in that project are
Projects Used converted to their equivalent form in @RISK for Excel. Distributions
with Earlier from the @RISK: Functions column in the project are changed to
Versions of distribution functions in cell formulas in Excel. Global variables,
@RISK for correlations, probabilistic branching and other @RISK specific features
Project
are similarly converted. You may see additional worksheets in Excel
for other @RISK elements in the imported project, such as sheets for
probabilistic calendars, global variables and correlations.
You may save the Excel workbook with an imported project at any
Saving the
time. When the saved project workbook is reopened, @RISK will
Project
Workbook automatically open the associated project in Microsoft Project, set up
the links between Excel and Microsoft Project and update Excel with
any changes that may have been made to the project in the interim.
Thus, you only have to import a project to Excel once.
Project 433
Building a Risk Model
Once a project is displayed in Excel, the standard @RISK modeling
tools available for any spreadsheet in Excel may be used to set up a
risk model for the project. For example, you can assign a probability
distribution to a cell representing a task or resource field by using
@RISKs Define Distribution window:
Defining
Probability
Distributions
You could also type the distribution function directly in the formula
for the cell of a task or resource field.
In either case, the cell formula for the task or resource field will
include an @RISK distribution function, such as the formula shown
here.
=RiskPert(53.1,59,80,RiskStatic(ProjectFieldVal))
Similarly, a field whose value you wish to track as an output from an
@RISK simulation (like the Finish Date or Total Cost of the project)
can be selected using the @RISK Add Output command.
Project 435
Project-Specific Modeling Options
Most risk modeling for projects in Excel uses standard @RISK
modeling tools. However, there are a set of additional @RISK tools
available specifically for use with project schedules. These include:
Risk Categories
Parameter Entry Table
Probabilistic Branching
Probabilistic Calendars
ProjectFieldVal
RiskProject functions
Risk Categories Risk Categories allow distributions to be quickly assigned to a field
for groups of tasks or resources in a project. You can quickly apply a
min-max range for all estimates for a field in a set of tasks in your
project and then run a simulation of project outcomes under those
assumptions.
Project 437
Probabilistic branching allows a project to branch from one task to
Probabilistic
Branching any number of other tasks during a simulation. Each of the task
groups that could be branched to has a probability value. For
example, upon completion of a Startup task, there may be a 70%
chance that the Market Research tasks will be followed and a 30%
chance that the standard rollout tasks will be followed.
ProjectFieldVal The Excel name ProjectFieldVal has a special meaning to @RISK for
Excel when project schedules are open. When used in an Excel
formula, this name returns the value of a field directly from Microsoft
Project to the related cell in Excel. This is useful to allow @RISK
distributions (when a simulation is not running) to return the same
value for a field as is shown in Microsoft Project. Otherwise, you
might see the mean of a distribution in Excel, which may or not be the
same as the value in Project. For example, consider the situation
where the following @RISK distribution is entered in the cell
associated with the Duration field of a task:
=RiskPert(53.1,59,80,RiskStatic(ProjectFieldVal))
The value shown in Excel when a simulation is not running (the
static value) will be the value entered in the matching Duration
field in Microsoft Project.
ProjectFieldVal can be also used to allow a % variation around the
deterministic estimate entered in the schedule in Microsoft Project.
Thus, even if the value in Microsoft Project is later updated or
changed, the same distribution can be used to describe the
uncertainty.
Project 439
RiskProject @RISK for Excel includes new functions that begin with
functions RiskProject that can be included in formulas in Excel. These
functions make changes to a project schedule during a simulation.
They are especially useful when formulas calculated in Excel, such as
those in a Risk Register, need to be linked to the logic of a schedule in
Microsoft Project.
RiskProject functions include:
RiskProjectAddDelay(PrecedingTask,DelayLength,DelayCost).
This function adds a new task to a project after PrecedingTask
completes. This task has the specified length and cost. You
could use this if you wish to add an additional task to the
project being simulated in iterations when a risk event occurs.
RiskProjectAddCost(CostToAdd,TimeToAdd). This function
adds a new cost to a project at the date given by TimeToAdd.
You could use this if you wish to add an additional cost to the
project being simulated in iterations when a risk event occurs.
RiskProjectRemoveTask(TaskToRemove). This function
removes a task from a project being simulated in a given
iteration. You could use this if you wish to not execute certain
tasks in the project being simulated when a risk event occurs.
RiskProjectResourceUse(Task,Resource,UsageValue). This
function changes the units of a material resource (or work for
a work resource) that is assigned to a task each iteration.
Costs calculated in Project will reflect the changed usage each
iteration of a simulation.
Project 441
By default, @RISK uses a Smart Sensitivity Analysis, by pre-
Sensitivity
Analysis screening inputs based on their precedence in the project schedule to
outputs. Inputs located in tasks that have no link (via your models
precedence/ successor relationships) to the task of an output are
removed from the sensitivity analysis, thus avoiding spurious results.
In the Sensitivity Analysis window these unrelated inputs are shown
with the entry n/a.
There are a couple of limitations to the use of Smart Sensitivity
Analysis. If you use probabilistic branching Smart Sensitivity
Analysis is disabled. With probabilistic branching it is necessary to
disable Smart Sensitivity Analysis as successor/ predecessor
relationships change during the run so @RISK cant accurately
determine precedent tasks before simulation. Smart Sensitivity
Analysis is also disabled if you have formula references across tasks
within a project for example, when an argument for a distribution in
one task references the finish date of another task.
In addition, the report gives the Critical Index for each task, or the
percentage of time during the simulation that the task fell on the
critical path of the project. The critical index gives managers the
ability to rate the importance of tasks.
Project 443
The information displayed in the Probabilistic Gantt Chart is
customizable using the Probabilistic Gantt Chart settings dialog. You
can select the probability values to be displayed in the chart and
optional include sensitivity information too.
Project 445
Once you have identified the data to collect, a simulation can be run.
For each iteration, the value of the selected field(s) in each time period
of the project is collected. When the simulation is done, the following
report describes the probabilities for the values of the collected
timescaled data:
Graphs are generated that describe the trends for statistics on the
collected timescaled data:
When importing an .MPP file into Excel, @RISK first opens the
selected project in Microsoft Project and then reads task, resource and
field values from the project. It then builds one or more new Excel
worksheets, creating a view of your project in Excel. Separate
worksheets are created for project tasks and resources.
The fields imported reflect those present in the active Gantt Chart and
Resource table in Microsoft Project. This can be changed in the
Import Settings dialog available prior to import. You can show
additional fields in Excel by following the instructions displayed
when the Project Link menu Insert Field command is selected.
Project 447
After you select an .MPP file to import, you have the option of
Viewing Import
Settings reviewing and changing the settings to be used during the import.
Projects used with @RISK for Project Version 4 and earlier are
Convert .MPP
supported with @RISK for Excels Project capabilities. When a project
files from
@RISK for used with earlier versions of @RISK for Project is imported into
Project Version @RISK for Excel, the @RISK elements in that project are converted to
4 their equivalent form in @RISK for Excel. Distributions from the
@RISK: Functions column in the project are changed to distribution
functions in Excel. Global variables, correlations, probabilistic
branching and other @RISK specific features are similarly converted.
Project 449
Risk Categories Command
Displays the Risk Categories dialog where risk can be
applied to a given field for a set of tasks or resources in a
project
The Model Tools menu Risk Categories command displays the Risk
Categories dialog box. This allows distributions to be quickly
assigned to a field for groups of tasks in a project. You can quickly
apply a min-max range for all estimates for a field in a set of tasks in
your project and then run a simulation of project outcomes under
those assumptions.
Project 451
- Minimum the minimum value for the range to be applied
- Maximum the maximum value for the range to be applied
Apply to. The Apply to options allows the selection of the field
and the tasks or resources to which the entered risk estimates will
be applied to the selected field. Selected tasks or resources are
added to the selected category.
- Field - selects the field to which the entered range of possible
values will be applied.
- Add displays the selector so tasks or resources can be
selected directly from your project.
- Delete deletes one or more selected tasks or resources from
the list.
- Add Marked allows you to select a cell associated with a
field that has a value that you want to use to identify the tasks
or resources for a category. For example, a text field in an
imported project could contain the label Construction for
each task in a Construction category. Using Add Marked,
you select a single cell in the text field with the label
Construction, and then @RISK places all tasks with the
same label in the category.
An * next to a task or resource name in the list indicates that the
Current
current distribution for the selected field in that task or resource
Distribution
Does Not Match does not match the definition of the category. This can happen if
the Definition of you define a category and apply a common variation to all task or
the Category resources in the category and then, at a later time, edit a distribution
for a member of the category. The next time the Risk Categories
dialog is displayed @RISK will indicate (with an asterisk) that the
edited distribution does not match the category definition. If you
click OK from the Risk Categories dialog you will apply the defined
+/- change to all members of the category, overwriting the edited
distribution.
Clicking the OK button writes the Vary functions generated from the
OK Button
selections in the Risk Categories dialog directly into your project in
Excel. Once applied, a simulation can be run which will use the
entered risks.
Using a Creating a Parameter Entry Table results in new columns being added
Parameter Entry to your project in Excel. Possible values for the selected field can be
Table entered in these columns.
Project 455
Probabilistic Branching Command
Displays the Probabilistic Branching dialog which lists
probabilistic branching information for the active project
The Model Tools menu Probabilistic Branching Command displays
the Probabilistic Branching dialog box. This window lists
probabilistic branches for the active project.
Note: All tasks for which probabilistic branches are entered should
have a default successor task in Project. Probabilistic branches can
change this successor task and are applied only during simulation or
single step Monte Carlo recalculations. The default successor task is
used in standard, deterministic, Project schedule calculations.
Project 457
Probabilistic Calendars Command
Displays the Probabilistic Calendars dialog which lists
probabilistic calendar information
The Model menu Probabilistic Calendars Command allows you to
enter non-working probabilities in calendars to be used in a
simulation. This accounts for events that may affect the outcome of
your project, such as weather conditions during certain seasons. By
default, @RISK uses the calendars created in Project during a
simulation. However, you can model potential circumstances that
affect calendars by associating probabilistic percentages with specific
dates and date ranges. You can apply these percentages to individual
workdays and ranges of workdays. You can also include any
nonworkdays in the range as worktime.
Project 459
Options available for entering Probabilistic Calendars include:
Disable Risk for this Calendar Turns off the use of non-
working probabilities for the selected calendar but leaves the
entered probabilities intact. This allows the testing of the
impacts of entered non-working probabilities on simulation
results.
Clicking the Apply to All Calendars button takes the date ranges
entered in the current calendar and copies them to all calendars
defined for the selected project.
Clicking the Delete Range button deletes the date range in the
selected row. However, although a range is deleted from the dialog it
is not deleted from your project until the OK button is pressed to
dismiss the Probabilistic Calendars dialog.
Calendar Calculations for probabilistic calendars use distributions on a new
Calculations in worksheet in Excel that is added to the workbook for your project.
Excel This sheet, named Probabilistic Calendars, contains all necessary
distribution functions for calendar calculations.
Project 461
Probabilistic Gantt Command
Displays the options for the Probabilistic Gantt chart
available after a simulation has been run on a project
schedule
The Charts and Reports menu Probabilistic Gantt command displays
the Probabilistic Gantt Chart dialog for 1) controlling how
Probabilistic Gantt charts are displayed and 2) generating the
Probabilistic Gantt Chart.
A Probabilistic Gantt Chart shows, by default, the earliest, 10th
percentile (P10) and expected start date, and expected, 90th percentile
(P90) and latest finish dates for project tasks. In addition, the report
gives the Critical Index for each task, or the percentage of time during
the simulation that the task fell on the critical path of the project. The
critical index gives managers the ability to rate the importance of
tasks.
Each iteration of a simulation, @RISK collects the start and finish
dates of each task, plus whether or not the task fell on the critical
path. Using this data it calculates the statistics to display in the
Probabilistic Gantt Chart.
Project 463
The information displayed in the General tab specifies the
General Tab
Probabilistic information shown in the Probabilistic Gantt Chart. The Display
Gantt Chart Start Dates options specify the simulated start dates to be displayed.
Available options include:
Perc%. Selects to display, for each task, the start date associated
with the entered percentile value (for example, the 10 Perc% date
is the date for which there is only a 10% chance of an earlier start
date occurring).
Mid. Selects to display, for each task, the mean or median start
date (as calculated from the distribution of possible start dates).
The Display Finish Dates options specify simulated finish dates to be
displayed. Available options include:
Perc%. Selects to display, for each task, the finish date associated
with the entered percentile value (for example, the 90 Perc% date
is the date for which there is only a 10% chance of a later finish
date occurring).
Mid. Selects to display, for each task, the mean or median finish
date (as calculated from the distribution of possible finish dates).
The Criticality options specify simulated critical index information to
be displayed. Available options include:
Display Critical Index. Selects to label, above the bar for each
task in the Probabilistic Gantt chart, the simulated critical index,
or the % of time that a task falls on the critical path.
Highlight Critical Tasks with Critical Index >. Selects to
highlight tasks in the Risk Gantt Chart that have a critical index
above the entered percentage. Bars for these tasks will be shown
in yellow.
The Report Location option allows you to select whether to place the
Probabilistic Gantt Chart in a worksheet in Excel or in a new table in
Microsoft Project.
The Name entry selects the simulation output for which sensitivities
will be calculated. All user-selected outputs (identified with
RiskOutput functions) are listed.
The Sensitivity Results for Tracked Output options specify type of
sensitivity analysis results to be displayed:
Show on Tasks With Input Risks. Selects to have sensitivity
analysis results reported for tasks that have input distributions
assigned to one or more fields for the task. Columns with
sensitivity information are added to the data table for the
Probabilistic Gantt chart. If this is not selected, sensitivity
analysis information is not generated or displayed.
Project 465
Type. Selects the type of sensitivity analysis data to display for
each task with an input distribution. Available options include
Correlation, Regression or Cruciality values. Correlation and
Regression are sensitivity analysis methods built into @RISK. For
more information on these see the @RISK window Sensitivities
Command in the @RISK for Excel Users manual.
Cruciality is simply a calculated coefficient that combines the
critical index and correlation sensitivity coefficient. By
multiplying these two values, this index weights the reported
sensitivity for a task by the relative percentage of the time the task
is on the critical path.
Project 467
Graphs are generated that describe the trends for statistics on the
collected timescaled data:
Timescaled Data The Timescaled Data Report Dialog shows the options for data to be
Report Dialog included in a timescaled data report.
Project 469
With the Box-Whisker graph, individual box plots are created for
each time period in the project. A box shows the range between the
selected Low Perc% and High Perc% values. The whisker runs
between the minimum and maximum values for each time period.
Project 471
Schedule Audit Command
Audits a project schedule to check its readiness for risk
analysis
The Schedule Audit command checks a project schedule to identify
misspecified or incomplete entries that can affect the results of a risk
analysis.
Many errors or omissions in a project schedule can impact the results
of a simulation. For example, if a predecessor-successor link between
two tasks is missing, changes in task durations during simulation may
not propagate through a schedule. Constraints can also affect
simulation results. For example, if a task has a Start No Earlier Than
constraint, simulated schedule changes may have no impact on the
task, as it cannot start earlier than the entered date.
It is important to review and correct problems identified by a
schedule audit prior to a risk analysis. Some identified issues may not
require change, as they may be needed to accurately schedule the
project. Other issues, however, may simply be errors that were made
when the schedule was created. These should be corrected.
Project 473
7) Start to Finish Links
Description: A start to finish dependency is associated with the listed
task. Thus, the successor occurs prior to the predecessor. Check if
task dependency logic is correct.
8) Task Out of Sequence
Description: The listed task starts earlier than its predecessor, even
though it has a Finish to Start dependency with that task. Check if
task dependency logic is correct.
Schedule Audit The Schedule Audit Options dialog allows you to configure the
Options information reported in a Schedule Audit. You can select the type of
errors that are checked and reported.
You can select to check for any of the issues described in the previous
section. You may also fine tune the checking of lags using the
Positive Lags with Length > and Negative Lags with Length >
options to only identifying lags over a specified length in days. You
also can skip the checking of tasks with small durations using the
Filter Out Tasks with Duration < = option.
The Hide Issues Marked as OK option keeps issues that have been
checked as OK (using the checkbox in the first column of the Schedule
Audit report) from appearing in a report.
The Navigate button displays the Microsoft Project window and
navigates among the tasks with the issues displayed in the Schedule
Audit report. This makes it easier to make adjustments to the
problem tasks in Microsoft Project in order to correct the identified
issues.
474 Project Commands
Project Settings Command
Specifies settings for recalculating and collecting data in
Microsoft Project
The Project Settings command specifies settings for recalculating
Microsoft Project in a standard Excel recalculation and in an @RISK
simulation. In addition, this command identifies the data that will be
collected in Microsoft Project when a simulation is run. All Project
Settings are stored with your Excel workbook when it is saved.
Project 477
The Data to Collect button selects, by open project, the timescaled
Data to Collect -
Timescaled Data data to collect during a simulation.
Project 479
Insert Field Command
Details the steps for inserting a new field in a project
displayed in Excel
The Insert Field command outlines the steps to be followed to show
additional project fields in columns in the worksheet with the Excel
view of a project.
New fields from Project may be inserted into the displayed Tasks or
Resources worksheet in Excel. Optionally, fields shown in Excel may
be hidden from view.
Using this report, you can review any changes @RISK will make.
Check the option for the formula you wish to use to update Excel.
Project 481
482 Project Commands
@RISK for Project Functions
@RISK for Excel includes a set of new names and functions
specifically for working with project schedules. These are used to
return the current value in a Microsoft Project field to Excel and to
make changes to a project schedule during a simulation.
ProjectFieldVal The Excel name ProjectFieldVal has a special meaning to @RISK for
Excel when project schedules are open. When used in an Excel
formula, this name returns the value of a field directly from Microsoft
Project to the related cell in Excel. This is useful to allow @RISK
distributions (when a simulation is not running) to return the same
value for a field as is shown in Microsoft Project. Otherwise, you
might see the mean of a distribution in Excel, which may or not be the
same as the value in Project. For example, consider the situation
where the following @RISK distribution is entered in the cell
associated with the Duration field of a task:
=RiskPert(53.1,59,80,RiskStatic(ProjectFieldVal))
The value shown in Excel when a simulation is not running (the
static value) will be the value entered in the matching Duration
field in Microsoft Project.
ProjectFieldVal can be also used to allow a % variation around the
deterministic estimate entered in the schedule in Microsoft Project.
Thus, even if the value in Microsoft Project is later updated or
changed, the same distribution can be used to describe the
uncertainty.
RiskProject Functions
@RISK for Excel includes new functions that begin with
RiskProject that can be included in formulas in Excel. These
functions make changes to a project schedule during a simulation.
They are especially useful when formulas calculated in Excel, such as
those in a Risk Register, need to be linked to the logic of a schedule in
Microsoft Project. As with standard Excel functions, arguments to
RiskProject functions can include cell references and formulas.
RiskProject functions are active only during a simulation and not
during single Excel recalculations when the sampling type is set to
Monte Carlo.
Project 483
RiskProject functions may include cell references to tasks in the Tasks
sheet for a project. For example, the PrecedingTask argument to the
function RiskProjectAddDelay is such a reference. This reference
argument just needs to be a single cell in the row where the task is
located (such as the cell containing the task name).
RiskProject functions include:
RiskProjectAddDelay(PrecedingTask,DelayLength,DelayCost).
This function adds a new task to a project after PrecedingTask
completes. This task has the specified length and cost. You
could use this if you wish to add an additional task to the
project being simulated in iterations when a risk event occurs.
RiskProjectAddCost(CostToAdd,TimeToAdd). This function
adds a new cost to a project at the date given by TimeToAdd.
You could use this if you wish to add an additional cost to the
project being simulated in iterations when a risk event occurs.
RiskProjectRemoveTask(TaskToRemove). This function
removes a task from a project being simulated in a given
iteration. You could use this if you wish to not execute certain
tasks in the project being simulated when a risk event occurs.
RiskProjectResourceUse(Task,Resource,UsageValue). This
function changes the units of a material resource (or work for
a work resource) that is assigned to a task each iteration.
Costs calculated in Project will reflect the changed usage each
iteration of a simulation.
For more information on using the RiskProject functions, see the
SimpleRiskRegister.xls (or .xlsx) and
RiskRegisterWithAdvancedModeling.xls (or .xlsx) example files.
Introduction
@RISK Professional and Industrial versions include the @RISK
Library. The @RISK Library is a separate database application for
sharing @RISKs input probability distributions and comparing
results from different simulations. It uses SQL Server to store @RISK
data.
Different users in an organization can access a shared @RISK Library
in order to access:
Common input probability distributions, which have been
pre-defined for use in an organizations risk models
Simulation results from different users
An archive of simulations run on different versions of a
model
The @RISK Library is accessed by:
Clicking the Library icon on the @RISK toolbar and choosing
the Show @RISK Library command displays the @RISK
Library window. This allows current distributions along with
stored simulation results to be reviewed.The Command Add
Results to Library adds a current simulation result to the
Library
Clicking the Add Distribution to Library icon in the Define
Distribution window to add a probability distribution to the
Library. Once a distribution is added, it is available to others
who use the Library.
Mutliple libraries can be accessed from different SQL servers. You
may, for example, wish to keep a local library where you store
simulations and distributions for personal use. A different library
could be used to share distributions and results among @RISK users
in a workgroup or division. A corporate library could hold common
distributions for company-wide assumptions such as future interest
rate, prices or the like.
Library 485
The @RISK Library includes two types of stored information for
@RISK models Distributions and Results. Each of these are shown
in tabs in the main @RISK Library window.
486 Introduction
Distributions in the @RISK Library
The @RISK Library allows the sharing of probability distributions
among different @RISK users. This is done to insure that all @RISK
users in an organization use the same, and most current, definition for
common risk inputs that are used in different models. By using the
same definitions for key inputs, an organization can insure that all
models are run using the same common assumptions. This allows
results to be compared from model to model.
@RISK automatically updates all library distributions present in a
model each time a simulation is run. This is done with the
RiskLibrary property function that is present in any input
distribution function that is added from the @RISK Library. The
RiskLibrary property function includes a special identifier that allows
@RISK to fetch the most recent definition of the distribution from the
library, changing the function if necessary. For example, if the
Corporate Planning Department has updated the distribution for next
years Oil Price, your model will automatically use this distribution
when you resimulate.
Adding Two different methods can be used for adding probability
Distributions to distributions to the @RISK Library:
the Library
Adding from the Define Distribution Window. Any
distribution displayed in the Define Distribution window can be
added to the @RISK Library. The Add Input to Library icon adds
the displayed distribution to the @RISK Library.
Entering a Distribution Directly in the @RISK Library.
Clicking the Add button in the Distributions tab in the @RISK
Library allows you to define a new distribution and make it
available to users who access your library.
The @RISK Library allows you to enter additional information about a
distribution you add. Properties of a Library distribution include:
Name. The Name of the distribution
Description. A custom description you can add.
Function. The functional definition of the distribution. This
can be edited at any time by those who have write access to
the database.
Revisions. Tracks the revisions made to any distribution
while it is stored in the library
Library 487
Cell References Distribution functions that include Excel cell references can be
in Library added to the @RISK Library; however, this should be done with
Distributions caution. Typically this would be done only when the library
distribution was going to be used locally in the same workbook where
it was originally defined. Inserting a library distribution with cell
references into a different model may not properly resolve the
argument values as the model structure may be different and the
specified cell references do not contain the values you expect.
Seeding Library Often you will want to add a RiskSeed property function for seeding
Distributions its random number stream. This insures that each model in which the
distribution is used will get the same sequence of sampled values for
the library distribution. This insures that a valid comparison of
results from different models which use the library distribution can be
made.
Library 489
The Distribution Tab columns can be customized to select which
Columns
Displayed in the statistics and information you want to display on the input
Distributions distributions in the library. The Columns icon at the bottom of the
Tab window displays the Columns For Table dialog.
Using a Library Library distributions are added to a model in Excel from either the
Distribution in Define Distributions window, @RISKs Insert Function menu or the
Your Model @RISK Library itself.
The Distribution Palette has a tab titled @RISK Library which lists all
distributions available in the library. Clicking on one of these
distributions selects it and adds it to the displayed cell formula.
You may also sample from an output stored in the @RISK Library in a
new simulation in Excel. The @RISK Library can place a
RiskResample function in Excel that references the data that was
collected for the output and stored in the @RISK Library. This is
useful for combining the results of many separate models in a new
single simulation or portfolio optimization.
Library 493
Simulation results are stored in the @RISK Library by selecting the
How is a
Simulation Add Result to Library command on the Library icon on the @RISK
Result Placed in for Excel toolbar. You can select to store a new simulation in the
the @RISK library or overwrite a currently stored simulation.
Library?
Library 495
You may sample from an output stored in the @RISK Library in a new
Resampling
Simulation simulation in Excel. There are times when you may wish to use
Results Stored output distributions from many different simulations as inputs in a
in the Library in new simulation in Excel. For example, you may wish to create a
a New portfolio optimization model that uses the output distributions from a
Simulation set of different models to select an optimal mix of projects or
investments. Each possible project or investment in the portfolio has
an individual simulation associated with it that was stored in the
@RISK Library. The portfolio optimization model then references
these individual output distributions. It samples from them each
iteration it performs while calculating the results for the portfolio as a
whole.
The output distribution from each project or investment becomes an
input that can be sampled via the RiskResample function. You can
place an output in the library into a workbook in Excel using the Add
to Model as Resampled Input command. When you do this, the data
that was collected and stored for the output becomes the data set that
is sampled from during the portfolio simulation. This data is stored
in the workbook with portfolio simulation.
How Output The RiskResample function that makes an output into an input
Data is distribution has different options for sampling its referenced data set.
Resampled in a You may sample the data in order, randomly sample with
Combined replacement or randomly sample without replacement. Usually,
Simulation however, when resampling from simulation outputs, you will use the
Order option. This preserves the ordering of iteration data from the
stored simulations during the combined simulation.
Preserving the ordering of iteration data from the stored simulations
is important when the individual simulations share common input
distributions. These common distributions often have a RiskSeed
property function that causes them to return the same sample values
in the same order each time they are used. Thus, each simulation for
an individual project or investment will use the same sampled values
for the common distributions in each iteration.
If the Order option is not used, inaccurate combinations of the output
values from individual projects or investments could be introduced
into the combined simulation. For example, take the case where you
were doing a simulation of a portfolio of individual oil and gas
projects and Random, not Order, resampling is used. A given
iteration could then resample a value from the output distribution of
one project where a high oil price was used and then randomly
496 Results in the @RISK Library
resample a value from the output distribution of a second project
where a low oil price was used. This would be a combination that
could not occur and would lead to inaccurate simulation results for
the portfolio.
Entering an To enter an output from the library as a resampled input:
Output from the
Library as a 1) Highlight the output distribution you wish to resample from in
Resampled the Results tab of the @RISK Library.
Input 2) Click the Add to Model as Resampled Input icon or right-click
and select the Add to Model as Resampled Input command.
Library 497
instructs @RISK to update the data for the output from the library
identified by TB8GKF8C at the start of the simulation. This
identifier links to a unique library on your system. If the library is not
available, @RISK will use the data for the output that was stored in
the workbook the last time the data was updated and the workbook
was saved.
5) Select Graph as Continuous Distribution if you want the
resampled data to be graphed continuously (as you would see
when looking at the output distribution and statistics in the
stored simulation) vs. a discrete distribution. This is done with a
RiskIsDiscrete(FALSE) property function entry in the
RiskResample function. The RiskResample distribution is a
discrete distribution as only values in the referenced data set can
be sampled. However, graphing continuously shows graphs in a
form that is easier to present to others. Note: Selecting Graph as
Continuous Distribution has no effect on the values resampled
or simulation results.
6) Select the cell in Excel where you wish to place the resampled
output.
Connecting to Clicking the Connect button allows you to navigate to a Server where
an Existing SQL is installed and an @RISK Library database is available. Clicking
Library on a Server name will check that server for available databases.
Library 499
Clicking the Create button allows you to navigate to a Server where
Creating a New
Library SQL is installed. Enter a name for the new library in the Library
Name field and click Create. Once created, the library will be
available for storing @RISK distributions and simulation results.
More on SQL The @RISK Library uses SQL Server Express as the platform for
Server Express storage and retrieval of RiskLibrary functions and simulation results.
It is Microsofts free database product that is based on SQL Server
2005 technology.
SQL Server Express uses the same database engine as the other
versions of SQL Server 2005, but has several limitations including a 1
CPU, 1 GB RAM, and a 4 GB database size limit.
Although SQL Server Express can be used as a server product, @RISK
also uses it as a local client data store where the @RISK Library data
access functionality does not depend on the network.
SQL Server Express can install and run on multiprocessor machines,
but only a single CPU is used at any time. The 4 GB database size
limit applies to all data files, however there are no limits to the
number of databases that can be attached to the server and @RISK
Library users can create or connect to several databases.
The Save Options button ( second from the left) selects the location to
save results.
Dont Save. With this option selected, @RISK will not save
simulation results. However, you can always re-run your
simulation to view your results again, as your model
including distribution functions and simulation settings is
always saved when you save your workbook.
Do This Automatically. This option specifies that you will
always save your data to your workbook, or not save results.
This is the same as selecting the equivalent Utilities menu
Application Settings command option.
The only options here are the Number of Simulations and the
Number of Iterations which control how many simulations, each
with the specified number of iterations, to run in the comparison.
When the OK button is clicked, Crystal Ball will be launched and
made to run that many simulations and iterations of the original
model and statistics will be collected for each forecast (output). Then
the same process will occur again, this time using @RISK and the
converted model. Finally, the two sets of statistics are compared and
tabulated in a spreadsheet.
Introduction
@RISK includes custom functions that can be included in Excel cells
and formulas. These functions are used for:
1) Defining probability distributions (@RISK distribution
functions and distribution property functions).
2) Defining simulation outputs (RiskOutput function)
3) Returning simulation results to your spreadsheet (@RISK
statistics and graphing functions)
This reference chapter describes each of these types of @RISK
functions, and gives details about both the required and optional
arguments for each function.
Distribution Functions
Probability distribution functions are used for adding uncertainty
in the form of probability distributions to the cells and equations in
your Excel worksheet. For example, you could enter
RiskUniform(10,20) to a cell in your worksheet. This specifies that the
values for the cell will be generated by a uniform distribution with a
minimum of 10 and a maximum of 20. This range of values replaces
the single fixed value required by Excel.
Distribution functions are used by @RISK, during a simulation, for
sampling sets of possible values. Each iteration of a simulation uses a
new set of values sampled from each distribution function in your
worksheet. These values are then used in recalculating your
worksheet and generating a new set of possible results.
As with Excel functions, distribution functions contain two elements,
a function name and argument values which are enclosed in
parentheses. A typical distribution function is:
RiskNormal(100,10)
528 Introduction
Select distribution functions for the cells you have identified.
In Excel, use the Insert menu Function command to enter the
selected functions into formulas.
You have over thirty types of distributions to choose from when
selecting a distribution function. Unless you know specifically how
uncertain values are distributed, it is a good idea to start with some of
the simpler distribution types uniform, triangular, or normal. As a
starting point, if possible, specify the current cell value as the mean,
or most likely, value of the distribution function. The range of the
function you are using then reflects the possible variation around the
mean or most likely value.
The simple distribution functions can be very powerful as you can
describe uncertainty with only a few values or arguments. For
example:
RiskUniform(Minimum, Maximum) uses only two values to
describe the full range of the distribution and assign probabilities
for all the values in the range.
RiskTriang(Minimum, Most Likely, Maximum) uses three easily
identifiable values to describe a complete distribution.
As your models become more complex, you probably will want to
choose from more complex distribution types in order to meet your
specific modeling needs. Use the listings in this Reference section to
guide you in selecting and comparing distribution types.
A graph of the distribution is often helpful in selecting and specifying
Defining
distribution functions. You can use the @RISK Define Distributions
Distributions
Graphically window to display distribution graphs and add distribution functions
to cell formulas. To do this, select the cell where you wish to add a
distribution function and click the Define Distribution icon, or the
@RISK add-in menu Model Define Distributions command. The on-
line file also contains graphic depictions of different functions at
selected argument values. For more information on the Define
Distribution window, see the Model commands : Define
Distributions Command in the @RISK Commands section in this
manual.
It often helps to first use the Define Distribution window to enter
your distribution functions to better understand how to assign values
to function arguments. Then, once you better understand the syntax
of distribution function arguments, you can enter the arguments
yourself directly in Excel, bypassing the Define Distribution window.
534 Introduction
In Excel, you may not list cell references or names in arrays as you
Important Note
on Excel Arrays would list constants. For example, you could not use {A1,B1,C1} to
represent the array containing the values in cells A1, B1, and C1.
Instead, you must use the cell range reference A1:C1 or enter the
values of those cells directly in the arrays as constants for example,
{10,20,30}.
Distribution functions with fixed numbers of arguments will
return an error value if an insufficient number of arguments
is entered, and will ignore extra arguments if too many are
entered.
Distribution functions will return an error value if arguments
are of the wrong type (number, array or text).
@RISK Array The @RISK time series functions are array functions as they change
Functions the cells where your time series forecast is located as a group each
iteration of a simulation. A single time series function is used for the
entire range of a time series forecast. As with other Excel array
functions, formulas for a cell in the range may not be edited
individually.
To edit a time series function directly in your spreadsheet, you need
to select the entire range of the forecast where the array function is
located, edit the formula, and press <Ctrl><Shift<Enter> to enter the
formula. Most of the time this will not be necessary as the @RISK
Time Series Fit, Batch Fit and Define tools enter the array functions
automatically for you in the range you select.
More This section briefly describes each probability distribution function
Information available and the arguments required for each. In addition, the on-
line help file describes the technical characteristics of each probability
distribution function. The appendices include formulas for density,
distribution, mean, mode, distribution parameters and graphs of the
probability distributions generated using typical argument values.
536 Introduction
The function RiskTheoMean(A10) returns the mean of RiskTriang(1,2,3).
In a different formula in A10:
=RiskNormal(10,RiskTriang(1,2,3))
The function RiskTheoMean(A10) returns the mean of
RiskNormal(10,RiskTriang(1,2,3)), since the function RiskTriang(1,2,3) is
nested inside the RiskNormal function.
Calculating @RISK statistics functions can include a RiskTruncate or a
Statistics on a RiskTruncateP property function. This will cause the statistic to be
Subset of a calculated on the min-max range specified by the truncation limits.
Distribution Note: The values returned from @RISK statistics functions only reflect
the range set using a RiskTruncate or a RiskTruncateP property
function entered in the statistics function itself. Filters set for
simulation results and shown in @RISK graphs and reports do not
impact the values returned by @RISK statistics functions.
Statistics in
Statistics functions may also reference a simulation output or input by
Report
Templates name. This allows them to be included in templates which are used to
generate pre-formatted reports in Excel on simulation results. For
example, the function =RiskMean("Profit") would return the mean of
the simulated distribution for the output cell named Profit defined in
a model.
Graphing Function
A special @RISK function RiskResultsGraph will automatically place a
graph of simulation results, wherever it is used, in a spreadsheet. For
example, =RiskResultsGraph(A10) would place a graph of the
simulated distribution for A10 directly in your spreadsheet at the
function's location at the end of a simulation. Additional optional
arguments to RiskResultsGraph allow you to select the type of graph
you want to create, its format, scaling and other options.
Supplemental Functions
Additional functions such as RiskCurrentIter, RiskCurrentSim, and
RiskStopSimulation are provided for use in the development of
macro-based applications using @RISK. These functions return the
current iteration and current simulation, respectively, of an executing
simulation, or stop a simulation.
RiskBernoulli
Description RiskBernoulli(p) specifies a discrete probability distribution, which takes
value 1 with success probability p and value 0 with failure probability q = 1
p
Examples RiskBernoulli(.1) specifies a Bernoulli distribution with a success probability
of .1. 10% of the time this distribution will return the value 1.
RiskBernoulli(C12) specifies a Bernoulli distribution with a success
probability taken from cell C12.
Guidelines p continuous parameter 0<p<1
Domain x {0,1} discrete
Density and f ( x) = 1 p for x = 0
Cumulative
Distribution f ( x) = p for x =1
Functions
f ( x) = 0 otherwise
F ( x) = 0 for x < 0
F ( x) = 1 p for 0 x < 1
F ( x) = 1 for x 1
Mean p
Variance
p(1 p)
Skewness 1 2p
[ p(1 p)]3 / 2
Kurtosis
p 3 + (1 p ) 3
p (1 p )
Mode 0 if p < .5
1 if p > .5
Bimodal (0,1) if p = .5
-0.2 -0.2
0.0 0.0
0.2 0.2
0.4 0.4
0.6 0.6
0.8 0.8
1.0 1.0
1.2 1.2
x 1 1 (1 x ) 2 1
Density and
Cumulative f (x) =
Distribution ( 1 , 2 )
Functions
B x (1 , 2 )
F( x ) = I x (1 , 2 )
B(1 , 2 )
where B is the Beta Function and Bx is the Incomplete Beta Function.
Mean 1
1 + 2
Variance 1 2
( 1 + 2 )2 ( 1 + 2 + 1)
Skewness 2 1 1 + 2 + 1
2
1 + 2 + 2 1 2
Kurtosis ( 1 + 2 + 1)(2( 1 + 2 )2 + 1 2 ( 1 + 2 6))
3
1 2 ( 1 + 2 + 2)( 1 + 2 + 3)
Mode 1 1
1>1, 2>1
1 + 2 2
0 1<1, 21 or 1=1, 2>1
1 11, 2<1 or 1>1, 2=1
0.8
0.6
0.4
0.2
0.0
-0.2
0.0
0.2
0.4
0.6
0.8
1.0
1.2
PDF - Beta(2,3)
2.0
1.8
1.6
1.4
1.2
1.0
0.8
0.6
0.4
0.2
0.0
-0.2
0.0
0.2
0.4
0.6
0.8
1.0
1.2
Density and
Cumulative f (x) =
(x min )1 1 (max x ) 2 1
(1 , 2 )(max min )1 + 2 1
Distribution
Functions
B z (1 , 2 ) x min
F( x ) = I z (1 , 2 ) z
B(1 , 2 ) with max min
Mean 1
min + (max min )
1 + 2
Variance
1 2
(max min ) 2
(1 + 2 ) (1 + 2 + 1)
2
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-1
0.8
0.6
0.4
0.2
0.0
-1
1 2
(mean min )(mid m.likely)
(mean m.likely)(max min )
max mean
2 1
mean min
B z (1 , 2 ) x min
F( x ) = I z (1 , 2 ) z
B(1 , 2 ) with max min
Mean mean
Variance
(mean min )(max mean )(mean m.likely)
2 mid + mean 3 m.likely
2 (mid mean )
Skewness
(mean m.likely)(2 mid + mean 3 m.likely)
mean + mid 2 m.likely (mean min )(max mean )
(1 + 2 + 1)(2(1 + 2 )2 + 1 2 (1 + 2 6))
Kurtosis
3
1 2 (1 + 2 + 2)(1 + 2 + 3)
Mode m.likely
0.8
0.6
0.4
0.2
0.0
-1
6
PDF - BetaSubj(0,1,2,5)
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-1
Mass and
n
Cumulative f ( x ) = p x (1 p )n x
Distribution x
Functions
x
n
F( x ) = i pi (1 p) n i
i=0
np(1 p )
Variance
Skewness (1 2p )
np(1 p )
Kurtosis 6 1
3 +
n np(1 p )
Mode
(bimodal)
p(n + 1) 1 and
p(n + 1) if
p(n + 1) is integral
Examples
PMF - Binomial(8,.4)
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-1
0.8
0.6
0.4
0.2
0.0
-1
e x 2 x ( 2 )1
Density and 1
Cumulative f (x) =
Distribution 2 2
( 2 )
Functions
x 2 ( 2)
F( x ) =
( 2 )
Mean
Variance 2
Skewness
8
Kurtosis 12
3+
Mode -2 if 2
0 if = 1
0.16
0.14
0.12
0.10
0.08
0.06
0.04
0.02
0.00
-2
10
12
14
16
CDF - ChiSq(5)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-2
10
12
14
16
Density and p pi
Cumulative f ( x ) = i +1
Distribution x i +1 x i for xi x < xi+1
Functions
x xi
F( x ) = p i + (p i +1 p i )
x i +1 x i for xi x xi+1
0.8
0.6
0.4
0.2
0.0
-1
6
PDF - Cumul(0,5,{1,2,3,4},{.2,.3,.7,.8})
0.45
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-1
Density and p p i +1
Cumulative f (x) = i
Distribution x i +1 x i for xi x < xi+1
Functions
x xi
F( x ) = 1 p i + (p i p i +1 )
x i +1 x i for xi x xi+1
0.8
0.6
0.4
0.2
0.0
-1
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-1
F( x ) = 0 for x < x1
s
F( x ) = pi
i =1 for xs x < xs+1, s < N
F( x ) = 1 for x xN
Mean N
x i pi
i =1
Variance
N
( x i ) 2 p i V
i =1
Skewness N
( x i ) 3 p i
1
32
V i =1
Kurtosis N
( x i ) 4 p i
1
2
V i =1
0.8
0.6
0.4
0.2
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
PMF - Discrete({1,2,3,4},{2,1,2,1})
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
2(1 p )(max x )
f ( x) = m.likely x max
(max m.likely ) 2
p(x min )
2
F( x ) = min x m.likely
(m.likely min) 2
Variance Complicated
Skewness Complicated
Kurtosis Complicated
Mode m.likely
Examples
PDF - DoubleTriang(0,.5,1,.4)
2.5
2.0
1.5
1.0
0.5
0.0
-0.2
0.0
0.2
0.4
0.6
0.8
1.0
1.2
0.8
0.6
0.4
0.2
0.0
-0.2
0.0
0.2
0.4
0.6
0.8
1.0
1.2
Mass and 1
Cumulative f (x) =
Distribution N for
x {x}
Functions
f (x) = 0 for
x {x}
F( x ) = 0 for x < x1
i
F( x ) =
N for xi x < xi+1
F( x ) = 1 for x xN
Mean N
xi
1
N
i =1
( x i ) 2 V
1
N
i =1
Skewness N
( x i ) 3
1
32
NV i =1
Kurtosis N
( x i ) 4
1
2
NV i =1
0.8
0.6
0.4
0.2
0.0
0
10
12
14
0.20
0.15
0.10
0.05
0.00
0
10
12
14
1 + erf (hx )
(
F( x ) 2hx = ) 2
where is called the Laplace-Gauss Integral and erf is the Error Function.
Mean 0
Variance
1
2h 2
Skewness 0
Kurtosis 3
Mode 0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-2.0
-1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
2.0
PDF - Erf(1)
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-2.0
-1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
2.0
m 1
x (m ) (x )i
F( x ) =
(m )
= 1 ex i!
i=0
Mean m
Variance
m 2
Skewness 2
m
Kurtosis 6
3+
m
Mode (m 1)
588 Reference: Distribution Functions
Examples
CDF - Erlang(2,1)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-1
7
PDF - Erlang(2,1)
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-1
F( x ) = 1 e x
Mean
Variance 2
Skewness 2
Kurtosis 9
Mode 0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
PDF - Expon(1)
1.2
1.0
0.8
0.6
0.4
0.2
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
RiskExtValue
Description RiskExtValue(alpha, beta) specifies an extreme value distribution with
location parameter alpha and shape parameter beta.
F( x ) =
1
where z
(x a )
exp( z ) b
e
Where a= alpha, b= beta
Mean a + b(1) a + .577b
Variance
2b2
6
Skewness
(3) 1.139547
12 6
3
Kurtosis 5.4
Mode a
Examples
PDF - ExtValue(0,1)
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-2
-1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-2
-1
5
RiskExtValueAlt, RiskExtValueAltD
Description RiskExtValueAlt(arg1type, arg1value, arg2type,arg2value)
specifies an extreme value distribution with two arguments of the
type arg1type and arg2type. These arguments can be either a
percentile between 0 and 1 or alpha or beta.
( )
Density and 1 z exp( z )
Cumulative f ( x) = e
Distribution b
Functions
F( x ) = 1 exp(e z ) where z
(x a )
b
Where a= alpha, b= beta
Mean a b(1) a .577b
Variance
2b2
6
Skewness
12 6
( 3) 1.139547
3
Kurtosis 5.4
Mode a
-5
-4
-3
-2
-1
2
-5
-4
-3
-2
-1
Domain x0 continuous
Density and 1 / 2 1 2
1
Cumulative
x 2
2
Distribution
Functions f (x) =
1 + 2
2
B( 1 , 2 ) 1 + 1 x
2 2 2
1 2
F( x ) = I 2 ,
1+
1x + 2 2 2
where B is the Beta Function and I is the Regularized Incomplete Beta
Function.
Mean 2
for 2 > 2
2 2
2 22 (1 + 2 2)
Variance
for 2 > 4
1 ( 2 2) ( 2 4)
2
Mode 2 (1 2)
for 1 > 2
1 ( 2 + 2)
0 for 1 2
Examples
PDF - F(4,3)
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-1
0.8
0.6
0.4
0.2
0.0
-1
x ( )
F( x ) =
( )
where is the Gamma Function and x is the Incomplete Gamma Function.
Mean
Variance
2
Skewness
2
Kurtosis 6
3+
Mode ( 1) if 1
0 if < 1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-2
10
12
PDF - Gamma(4,1)
0.25
0.20
0.15
0.10
0.05
0.00
-2
10
12
(p p i )(x x i )
F( x ) = F( x i ) + (x x i ) p i + i +1
2(x i +1 x i )
for xi x xi+1
0.8
0.6
0.4
0.2
0.0
-1
6
PDF - General(0,5,{1,2,3,4},{2,1,2,1})
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-1
f ( x ) = p(1 p )x
Mass and
Cumulative
Distribution
Functions
F( x ) = 1 (1 p) x +1
Mean 1
1
p
Variance
1 p
p2
Skewness (2 p )
1 p
for p < 1
Mode 0
Examples
CDF - Geomet(.5)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-1
0.5
0.4
0.3
0.2
0.1
0.0
-1
max min
x i min + i
N
where the {p} array has been normalized to give the histogram unit area.
Mean No Closed Form
0.8
0.6
0.4
0.2
0.0
-1
6
PDF - Histogrm(0,5,{6,5,3,4,5})
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-1
0 for M = 0
0 for M = 1
Skewness
(M 2D )(M 2n ) M 1
M2 nD(M D )(M n )
Kurtosis M 2 (M 1) M (M + 1) 6n (M n ) 3n (M n )(M + 6 )
+ 6
n (M 2)(M 3)(M n ) D(M D ) M2
for M>3, M>D>0, M>n>0
xm
(n + 1)(D + 1)
where M+2
0.8
0.6
0.4
0.2
0.0
0
6
PMF - HyperGeo(6,5,10)
0.50
0.45
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
0
Variance ( + 2 )
12 where (max-min)
Skewness
0
9 n 7 / 3
Kurtosis 2
2 where n(max-min+1)
5 n 1
0.8
0.6
0.4
0.2
0.0
-1
9
PMF - IntUniform(0,8)
0.12
0.10
0.08
0.06
0.04
0.02
0.00
-1
x x
F( x ) = 1 + e 2 + 1
x x
Mean
Variance
3
Skewness
3
1.0
0.8
0.6
0.4
0.2
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
CDF - InvGauss(1,2)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
x a
F( x ) = 1 + 2 ln
b x
Distribution f (x) = e 2
2
Functions 2 (1 + z )
(
F( x ) = 1 + 2 sinh 1 (z ) )
Where
(x )
z
and is the cumulative distribution function of a standard Normal(0,1).
Mean
sinh (r )
Variance
2
( 1)( cosh (2r ) + 1)
2
x
1 2
F( x ) e x<
2
x
1 2
F( x ) 1 e x
2
Mean
Variance 2
Skewness 0
Kurtosis 6
Mode
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-3
-2
-1
3
CDF - Laplace(0,1)
1.0
0.8
0.6
0.4
0.2
0.0
-3
-2
-1
RiskLaplaceAlt, RiskLaplaceAltD
Description RiskLaplaceAlt(arg1type, arg1value, arg2type,arg2value)
specifies a laplace distribution with two arguments of the type
arg1type and arg2type. These arguments can be either a
percentile between 0 and 1 or or .
Examples RiskLaplaceAlt (5%,1,95%,100) returns a laplace distribution with
a 5th percentile of 1 and a 95th percentile of 100.
Guidelines scale must be a positive value.
With RiskLaplaceAltD, any entered percentile values are
cumulative descending percentiles, where the percentile specifies
the chance of a value greater or equal to the entered value.
c
F( x ) = 1 erf
2( x )
0.45
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-1
8
PDF - Levy(0,1)
1.0
0.8
0.6
0.4
0.2
0.0
-1
1 x
1 + tanh
2
F( x ) =
2
where sech is the Hyperbolic Secant Function and tanh is the Hyperbolic
Tangent Function.
Mean
Variance
2 2
3
Skewness 0
Kurtosis 4.2
Mode
0.25
0.20
0.15
0.10
0.05
0.00
-5
-4
-3
-2
-1
5
CDF - Logistic(0,1)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-5
-4
-3
-2
-1
t 1
Density and
Cumulative f (x) =
Distribution
Functions (
1+ t )2
1
F( x ) =
1 x
1+ t
t with
Mean csc() + for > 1
Variance
[
2 2 csc(2) csc 2 () ] for > 2
[ ]
3
2 csc(2) csc 2 () 2
[
2 csc(2) csc 2 () ] 2
for > 4
Mode 1
1
+
+ 1 for > 1
for 1
Examples
PDF - LogLogistic(0,1,5)
1.4
1.2
1.0
0.8
0.6
0.4
0.2
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
RiskLogLogisticAlt, RiskLogLogisticAltD
Description RiskLogLogisticAlt(arg1type, arg1value, arg2type,arg2value,
arg3type,arg3value) specifies a log-logistic distribution with three
arguments of the type arg1type to arg3type. These arguments can
be either a percentile between 0 and 1 or gamma, beta or alpha.
ln x
F( x ) =
2
2
ln ln 1 +
2 + 2
with and
Variance
2
Skewness 3
+ 3
Kurtosis 2
4 3 2
+ 2 + 3 3 with 1 +
Mode
4
( 2 + 2 )3 2
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-1
6
CDF - Lognorm(1,1)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-1
Density and 2
1 ln x
Cumulative
1
Distribution
f (x) = e 2
Functions
x 2
ln x
F( x ) =
Mean
2
+
e 2
e 2 ( 1)
Variance 2
with e
( + 2)
Skewness 2
1 with e
@RISK Functions 643
Kurtosis 2
4 + 23 + 3 2 3 with e
Mode 2
e
Examples
CDF - Lognorm2(0,1)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-2
10
12
PDF - Lognorm2(0,1)
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-2
10
12
x
s + i 1
F( x ) = p s
i
(1 p) i
i =0
Mean s (1 p )
p
Variance
s (1 p )
p2
Kurtosis
6 p2
3+ +
s s(1 p ) for s > 0, p < 1
Mode (bimodal) z and z + 1 integer z > 0
(unimodal) 0 z<0
s (1 p ) 1
z
where
p
Examples
PDF - NegBin(3,.6)
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-1
x 1 x
F( x ) = erf + 1
2 2
where is called the Laplace-Gauss Integral and erf is the Error Function.
Mean
2
Variance
Skewness 0
Kurtosis 3
Mode
Examples
PDF - Normal(0,1)
0.45
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-3
-2
-1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-3
-2
-1
a
Density and
Cumulative f (x) =
Distribution
Functions x +1
a
F( x ) = 1
x
where a = alpha
Mean a
1 for > 1
Variance
a 2
( 1)2 ( 2) for > 2
Skewness
+1 2
2 for > 3
3
Kurtosis
(
3( 2) 3 2 + + 2 )
( 3)( 4) for > 4
Examples
PDF - Pareto(2,1)
2.0
1.8
1.6
1.4
1.2
1.0
0.8
0.6
0.4
0.2
0.0
0
10
11
CDF - Pareto(2,1)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
0
10
11
Variance
b 2q
(q 1)2 (q 2) for q > 2
Skewness
q + 1 q 2
2
q 3 q for q > 3
Kurtosis
(
3(q 2) 3q 2 + q + 2 )
q(q 3)(q 4) for q > 4
1.0
0.8
0.6
0.4
0.2
0.0
-2
10
12
CDF - Pareto2(3,3)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-2
10
12
e x
Density and
1
Cumulative f (x) =
Distribution ( ) (x ) +1
Functions
Mean
1 for > 1
Variance
2
( 1)2 ( 2) for > 2
Skewness
4 2
for > 3
3
Kurtosis 3( + 5)( 2)
( 3)( 4) for > 4
Mode
+1
2.0
1.5
1.0
0.5
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
CDF - Pearson5(3,1)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
Density and
Cumulative f (x) =
1
(x )11
Distribution B(1 , 2 ) x 1 + 2
Functions 1 +
Mean 1
2 1 for 2 > 1
Variance
1 (1 + 2 1)
2
3 ( 2 2) 2 ( 2 1)
Kurtosis 2
+ ( 2 + 5) for 2 > 4
( 2 3)( 2 4) 1 (1 + 2 1)
Mode (1 1)
2 +1 for 1 > 1
0 otherwise
Examples
PDF - Pearson6(3,3,1)
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-1
9
RiskPert
Description RiskPert(minimum, most likely, maximum) specifies a PERT distribution (as
special form of the beta distribution) with a minimum and maximum value as
specified. The shape parameter is calculated from the defined most likely value.
The PERT distribution (meaning Program Evaluation and Review Technique) is
rather like a Triangular distribution, in that it has the same set of three
parameters. Technically it is a special case of a scaled Beta (or BetaGeneral)
distribution. In this sense it can be used as a pragmatic and readily
understandable distribution. It can generally be considered as superior to the
Triangular distribution when the parameters result in a skewed distribution, as
the smooth shape of the curve places less emphasis in the direction of skew. As
for the Triangular distribution, the PERT distribution is bounded on both sides,
and hence may not be adequate for some modelling purposes where it is desired
to capture tail or extreme events.
Examples RiskPert(0,2,10) specifies a beta distribution with a minimum of 0, a maximum of
10, and a most likely value of 2.
RiskPert (A1,A2,A3) specifies a PERT distribution with a minimum value taken
from cell A1, a maximum value taken from cell A3, and a most likely value taken
from cell A2.
Guidelines minimum must be less than maximum.
most likely must be greater than minimum and less than maximum.
B z (1 , 2 ) x min
F( x ) = I z (1 , 2 ) z
B(1 , 2 ) with max min
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
0.8
0.6
0.4
0.2
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
RiskPertAlt, RiskPertAltD
Description RiskPertAlt(arg1type, arg1value, arg2type,arg2value, arg3type,arg3value)
specifies a PERT distribution with three arguments of the type arg1type to
arg3type. These arguments can be either a percentile between 0 and 1 or
min, m. likely or max.
Variance
Skewness 1
Kurtosis 1
3+
Examples
CDF - Poisson(3)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-1
9
PMF - Poisson(3)
0.25
0.20
0.15
0.10
0.05
0.00
-1
Density and 2
1 x
x 2 b
Cumulative
Distribution
Functions
f (x) = e
2
b
2
1 x
F( x ) = 1 e 2 b
Where b = beta
Mean
b
2
Variance
b2 2
2
2( 3)
Skewness
0.6311
(4 )3 2
Kurtosis
32 3 2
3.2451
(4 )2
Mode b
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
CDF - Rayleigh(1)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
Density and
+ 1 +1
Cumulative
Distribution 1 2 2
Functions f (x) =
2
+ x
2
1 1 x2
F( x ) = 1 + I s , s
2 2 2 with + x2
*even though the mean is not defined for = 1, the distribution is still
symmetrical about 0.
Variance
2 for > 2
Skewness 0 for > 3*
*even though the skewness is not defined for 3, the distribution is still
symmetric about 0.
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-5
-4
-3
-2
-1
5
PDF - Student(3)
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-5
-4
-3
-2
-1
2(max x )
f (x ) =
(max m.likely)(max min) m.likely x max
F( x ) =
(x min )2
(m.likely min )(max min ) min x m.likely
F( x ) = 1
(max x )2
(max m.likely)(max min ) m.likely x max
Mean min + m.likely + max
3
Variance
min 2 + m.likely 2 + max 2 (max )(m.likely) (m.likely)(min ) (max )(min )
18
Skewness
2 2 f f2 9( ) f
2( m.likely min)
1
( )
where
5 32 max min
f2 +3
Kurtosis 2.4
Mode m.likely
0.40
0.35
0.30
0.25
0.20
0.15
0.10
0.05
0.00
-1
6
CDF - Triang(0,3,5)
1.0
0.8
0.6
0.4
0.2
0.0
-1
RiskTrigen
Description RiskTrigen(bottom value,most likely value,top value, bottom perc., top perc.)
specifies a triangular distribution with three points one at the most likely
value and two at the specified bottom and top percentiles. The bottom
percentile and top percentile are values between 0 and 100. Each percentile
value gives the percentage of the total area under the triangle that falls to the
left of the entered point. Use of the RiskTrigen function avoids the problem of
the minimum and maximum values not actually being possible occurrences in
the standard RiskTriang function. This is because in the RiskTriang function
these are the points where the distribution intersects the X-axis, or points of
zero probability. RiskTrigen is a short cut for a special form of RiskTriangAlt.
For example:
RiskTrigen(0, 1, 2, 10, 90)
Is the same as
RiskTriangAlt(10%, 0, m. likely, 1, 90%, 2)
x min
F( x ) =
max min
Mean max+ min
2
Variance
(max min )2
12
Skewness 0
682 Reference: Distribution Functions
Kurtosis 1.8
Mode Not uniquely defined
Examples
PDF - Uniform(0,1)
1.2
1.0
0.8
0.6
0.4
0.2
0.0
-0.2
0.0
0.2
0.4
0.6
0.8
1.0
1.2
CDF - Uniform(0,1)
1.0
0.8
0.6
0.4
0.2
0.0
-0.2
0.0
0.2
0.4
0.6
0.8
1.0
1.2
x 1 (x )
Density and
Cumulative f (x) = e
Distribution
Functions
F( x ) = 1 e (x )
Mean
1
1 +
Skewness
3 2 1 1
1 + 31 + 1 + + 2 3 1 +
32
2 2 1
1 + 1 +
0 for 1
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
CDF - Weibull(2,1)
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
RiskCategory
Description RiskCategory(category name) names the category to be used
when displaying an input distribution. This name defines the
grouping in which an input will appear in the @RISK Model
Window Inputs list and in any reports which include simulation
results for the input.
RiskIsDiscrete
Description RiskIsDiscrete(TRUE) specifies that the output for which it is
entered should be treated as a discrete distribution, when
displaying graphs of simulation results and calculating statistics. If
RiskIsDiscrete is not entered, @RISK will attempt to detect when
an output represents a distribution of discrete values
RiskLibrary
Description RiskLibrary(position,ID) specifies that the distribution, for which it
is entered, is linked to a distribution in an @RISK Library with the
entered position and ID. Each time a simulation is run the
distribution function will update with the current definition of the
distribution in an @RISK Library with the entered ID.
RiskName
Description RiskName(input name) names the input distribution in which the
function is used as an argument. This name will appear in both
the @RISK Model Window Outputs and Inputs list, and in any
reports and graphs which include simulation results for the input.
RiskShift
Description RiskShift(shift amount) shifts the domain of the distribution in
which it is used by the entered shift amount. This function is
automatically entered when a fit result includes a shift factor.
RiskStatic
Description RiskStatic(static value) defines the static value 1) returned by a
distribution function during a standard Excel recalculation and 2)
that replaces the @RISK function after @RISK functions are
swapped out.
RiskOutput
Description The function RiskOutput is used to identify output cells you have
selected in your spreadsheet. This function takes up to three
arguments as shown here:
=RiskOutput("output cell name", "output range name",
element# in range)
These arguments are optional, as a simple =RiskOutput() is
sufficient for entering a single element output range where @RISK
creates the name of the output for you. RiskOutput used with a
single argument such as:
=RiskOutput ("output cell name")
specifies for a single element output range where the name is
entered by you.
When a multiple element output range is identified, the form:
=RiskOutput ("output cell name", "output range name",
position# in range)
is used. However, the output cell name entry can be omitted if you
wish to have @RISK automatically generate a name for each
output cell in the range.
RiskOutput functions are automatically generated for you when
you select outputs using the @RISK Add Output icon. However,
like any other @RISK function, RiskOutput may be typed directly
in the cell which you wish to reference as a simulation output.
A RiskOutput function is entered by adding it to the cell formula,
which is already present in the cell that is to be a simulation output.
For example, a cell containing the formula:
=NPV(.1,G1G10)
would become
=RiskOutput()+NPV(.1,G1G10)
when the cell is selected as an output.
RiskCorrel
Description RiskCorrel(cellref1 or output/input name1, cellref2 or output/input
name2,correlationType,Sim#) returns the correlation coefficient
using correlationType for the data for the simulated distributions
for cellref1 or output/input name1 and cellref2 or output/input
name2 in simulation Sim#. correlationType is either Pearson or
Spearman Rank correlation.
RiskKurtosis
Description RiskKurtosis(cellref or output/input name,Sim#) returns the
kurtosis of the simulated distribution for cellref. Use the
RiskTruncate property function to optionally specify a range of the
simulated distribution over which to calculate the statistic.
RiskMax
Description RiskMax(cellref or output/input name,Sim#) returns the maximum
value of the simulated distribution for cellref. Use the RiskTruncate
property function to optionally specify a range of the simulated
distribution over which to calculate the statistic.
RiskMean
Description RiskMean(cellref or output/input name,Sim#) returns the mean
value of the simulated distribution for cellref. Use the RiskTruncate
property function to optionally specify a range of the simulated
distribution, over which to calculate the statistic.
RiskMin
Description RiskMin(cellref or output/input name,Sim#) returns the minimum
value of the simulated distribution for cellref. Use the RiskTruncate
property function to optionally specify a range of the simulated
distribution, over which to calculate the statistic.
RiskMode
Description RiskMode(cellref or output/input name,Sim#) returns the mode of
the simulated distribution for cellref. Use the RiskTruncate property
function to optionally specify a range of the simulated distribution,
over which to calculate the statistic.
RiskRange
Description RiskRange(cellref or output/input name,Sim#) returns the
minimum-maximum range of the simulated distribution for cellref.
Use the RiskTruncate property function to optionally specify a
range of the simulated distribution, over which to calculate the
statistic.
RiskSkewness
Description RiskSkewness(cellref or output/input name,Sim#) returns the
skewness of the simulated distribution for cellref. Use the
RiskTruncate property function to optionally specify a range of the
simulated distribution, over which to calculate the statistic.
RiskVariance
Description RiskVariance(cellref or output/input name,Sim#) returns the
variance of the simulated distribution for cellref. Use the
RiskTruncate property function to optionally specify a range of the
simulated distribution, over which to calculate the statistic.
RiskTheoMax
Description RiskTheoMax(cellref or distribution function) returns the maximum
value of the distribution function in the formula in cellref or the
entered distribution function.
RiskTheoMean
Description RiskTheoMean(cellref or distribution function) returns the mean
value of the last distribution function in the formula in cellref, or the
entered distribution function.
RiskTheoMode
Description RiskTheoMode(cellref or distribution function) returns the mode of
the last distribution function in the formula in cellref, or the entered
distribution function.
RiskTheoRange
Description RiskTheoRange(cellref or distribution function) returns the
minimum-maximum range of the last distribution function in the
formula in cellref, or the entered distribution function.
RiskTheoSkewness
Description RiskTheoSkewness(cellref or distribution function) returns the
skewness of the last distribution function in the formula in cellref,
or the entered distribution function.
RiskTheoVariance
Description RiskTheoVariance(cellref or distribution function) returns the
variance of the last distribution function in the formula in cellref, or
the entered distribution function.
RiskFitDescription
Description RiskFitDescription(fit source,distribution style) returns text
@RISK Functions 725
description of best fitting distribution from the fit performed by
RiskFitDistribution function in cell given by fit source. This is
the function and arguments for the best fitting distribution for
the fit.
Examples RiskFitDescription(B9) returns the description of the best
fitting distribution for the fit performed by the RiskFitDistribution
function in cell B9.
Guidelines The formula in fit source must have a RiskFitDistribution
function
Distribution style can be TRUE or omitted for @RISK
distribution function format, such as RiskNormal(10.1,3.22) or
FALSE for a more readable format such as LogLogistic:
gamma=-1.384 beta=104.1 alpha=2.0912
RiskFitParameter
Description RiskFitParameter(fit source,parameter#) returns a parameter
of best fitting distribution from fit performed by
RiskFitDistribution function in cell given by fit source
Examples RiskFitParameter(B9,1) returns the first parameter or
argument for the best fitting distribution for the fit performed by
the RiskFitDistribution function in cell B9.
Guidelines The formula in fit source must have a RiskFitDistribution
function
parameter# can be a value between 1 and the number of
arguments for the best fitting distribution for the fit performed by
the RiskFitDistribution function
RiskFitStatistic
Description RiskFitStatistic(fit source,statistic) returns a statistic from fit
performed by the RiskFitDistribution function in cell given by fit
source
Examples RiskFitDescription(B9,ChiSq) returns the ch-sq test
statistic for the best fit for the fit performed by the
RiskFitDistribution function in cell B9.
Guidelines The formula in fit source must have a RiskFitDistribution
function
Statistic can beAIC, BIC,"ChiSq",KS, or AD or
RMSError
RiskProjectRemoveTask
Description RiskProjectRemoveTask (tasksToRemove) removes task(s)
from a project being simulated in a given iteration. This is used
if you wish to not execute certain tasks in the project being
simulated when a risk event occurs.
Examples RiskProjectRemoveTask (Tasks!B10) removes the task
located in row 10 of the Tasks worksheet.
Guidelines tasksToRemove must be a reference to cell(s) in the Tasks
worksheet for a project. The row where the cell(s) is located
determines the task to be removed.
At the start of each iteration any tasks removed in the prior
iteration by RiskProjectRemoveTask are added back as the
project is reset to its original tasks.
RiskProject functions are active only during a simulation and
not during single Excel recalculations when the sampling type
is Monte Carlo.
Guidelines
a1 < 1 is a necessary condition for stationarity.
Technical Details
Define
Nt = a sample from a Normal(0,1) distribution
t = Nt
Then
(Yt ) = a1 (Yt 1 ) + t
The mean and variance are
E (Yt ) =
and
Var (Yt ) = 2 / (1 a12 )
Examples RiskAR2(100, 40, 0.6, 0.2, 490, 495) generates an AR2 process with mean
100 , variance 402 / (1 0.62 0.22 ) = 51.62 , autoregressive
coefficients 0.6 and 0.2, and values 490 and 495 at times 0 and -1.
Guidelines a1 + a2 < 1 , a2 a1 < 1 , and 1 < a2 < 1 are necessary conditions for
stationarity.
Technical
Details Define
Nt = a sample from a Normal(0,1) distribution
t = Nt
Then
(Yt ) = a1 (Yt 1 ) + a2 (Yt 2 ) + t
The mean and variance are
E (Yt ) =
and
Var (Yt ) = 2 / (1 a12 a22 )
Examples RiskMA1(500, 40, 0.5, 10) generates an MA1 process with mean
500, variance 40 (1 + 0.5 ) = 44.7 , moving average
2 2 2
Technical
Details Define
Nt = a sample from a Normal(0,1) distribution
t = Nt
Then
Yt = + b1 t 1 + t
The mean and variance are
E (Yt ) =
and
Var (Yt ) = 2 (1 + b12 )
Examples RiskMA2(500, 40, 0.4, -0.2, 10, -5) generates an MA2 process with
mean 500, variance 40 (1 + 0.4 + ( 0.2) ) = 43.8 , moving
2 2 2 2
average coefficients 0.4 and -0.2, and initial error terms 10 and -5.
Technical
Details Define
Nt = a sample from a Normal(0,1) distribution
t = Nt
Then
Yt = + b1 t 1 + b2 t 2 + t
The mean and variance are
E (Yt ) =
and
Var (Yt ) = 2 (1 + b12 + b22 )
Guidelines
a1 < 1 is a necessary condition for stationarity.
Technical
Details Define
N t = a sample from a Normal(0,1) distribution
t = Nt
Then
(Yt ) = a1 (Yt 1 ) + b1 t 1 + t
The mean and variance are
E (Yt ) =
and
Var (Yt ) = 2 (1 + b12 + 2a1b1 ) / (1 a12 )
t, then the term inside the square brackets in the equation for Yt +T ,
the log return of the security, is normally distributed with mean
( 2 / 2)T and variance 2T .
1 e 2T
Yt +T = + e T (Yt ) + N t +T
2
The discrete equivalent of this is
1 e 2
Yt = + e (Yt 1 ) + N t
2
The conditional mean and variance of Yt +T given Yt ,are
J .
Examples RiskGBMJD(0.01, 0.05, 0.1, 0.015, 0.025) generates a jump
diffusion GBM process with drift 1%, volatility 5%, jump rate 0.1,
jump mean 1.5%, and jump standard deviation 2.5%.
Examples RiskBMMRJD(0.01, 0.05, 0.2, 0.1, 0.015, 0.025, 0.015) generates a Brownian
motion process with mean reversion and jump diffusion with drift 1%, volatility
5%, speed of reversion 0.2, jump rate 0.1, jump size mean 1.5%, jump size
standard deviation 2.5%, and value 1.5% at time 0.
Guidelines a1 > 0
Technical
Details Define
Nt = a sample from a Normal(0,1) distribution
Then
Yt = + t N t
t is modeled as
where
= + b1 (Yt 1 ) 2
t
2
t
2
, but this variance, conditional on the previous value of the
process, is a weighted combination of the volatility parameter and
the previous squared deviation from the mean.
deviation 0 .
This is a generalization of the original ARCH model, where the model for
the conditional variance at time t is a weighted combination of three terms:
the volatility parameter , the previous squared deviation from the mean,
and the previous variance. This process has been more successful than the
ARCH1 process for fitting financial data.
= + b1 (Yt 1 ) 2 + a1 t21
t
2
standard deviation 0 .
This version of GARCH allows negative values (of the logs) in the
variance equation, and there are now no restrictions on the
parameters a1 and b1 .
Technical
Details Define
Nt = a sample from a Normal(0,1) distribution
Then
Yt = + t N t
where t is modeled as
with
g ( Nt ) = Nt + ( Nt E ( Nt ) )
Note that E ( N t ) = 2 / .
standard deviation 0 .
RiskCpm
Description RiskCpm(cellref or output name, Sim#, RiskSixSigma(LSL,USL,
Target,LongTerm Shift,Number of Standard Deviations)) returns
the Taguchi capability index for cellref or output name in Sim #,
optionally using the USL, LSL, and the Target in the RiskSixSigma
property function. This function is essentially the same as the Cpk
but incorporates the target value which in some cases may or may
not be within the specification limits.
Examples RiskCpm(A10) returns the Taguchi capability index for cell A10 .
RiskCpm(A10, ,RiskSixSigma(100, 120, 110, 0, 6)) returns the
Taguchi capability index for cell A10, using an USL of 120, LSL of
100, and a Target of 110.
Guidelines A RiskSixSigma property function needs to be entered for cellref
or output name, or a RiskSixSigma property function needs to be
included
RiskCpkUpper
Description RiskCpkUpper(cellref or output name, Sim#,
RiskSixSigma(LSL,USL, Target,LongTerm Shift,Number of
Standard Deviations)) calculates the one-sided capability index
based on the Upper Specification limit for cellref or output name in
Sim# optionally using the USL in the included RiskSixSigma
property function.
Examples RiskCpkUpper(A10) returns the one-sided capability index based
on the Upper Specification limit for the output cell A10. A
RiskSixSigma property function needs to be entered in the
RiskOutput function in Cell A10.
RiskCpkUpper(A10, ,RiskSixSigma(100,120,110,1.5,6)) returns
the Process Capability Index for the output cell A10, using an LSL
of 100.
Guidelines A RiskSixSigma property function needs to be entered for cellref
or output name, or a RiskSixSigma property function needs to be
included
RiskK
Description RiskK(cellref or output name, Sim#, RiskSixSigma(LSL,USL,
Target,LongTerm Shift,Number of Standard Deviations)) calculates
a measure of process center for cellref or output name in Sim#
optionally using the LSL and USL in the included RiskSixSigma
property function.
Examples RiskK(A10) returns a measure of process center for the output cell
A10. A RiskSixSigma property function needs to be entered in the
RiskOutput function in Cell A10.
RiskK(A10, ,RiskSixSigma(100,120,110,1.5,6)) returns a
measure of process center for the output cell A10, using an LSL of
100 and USL of 120.
Guidelines A RiskSixSigma property function needs to be entered for cellref
or output name, or a RiskSixSigma property function needs to be
included
RiskPNC
Description RiskPNC(cellref or output name, Sim#, RiskSixSigma(LSL,USL,
Target, Long Term Shift, Number of Standard Deviations))
calculates the total probability of defect outside the lower and
upper specification limits for cellref or output name in Sim#
optionally using the LSL, USL and Long Term Shift in the included
RiskSixSigma property function.
Examples RiskPNC(A10) returns the probability of defect outside the lower
and upper specification limits for the output cell A10. A
RiskSixSigma property function needs to be entered in the
RiskOutput function in Cell A10.
RiskPNC(A10, ,RiskSixSigma(100,120,110,1.5,6)) returns the
probability of defect outside the lower and upper specification limits
for the output cell A10, using an LSL of 100, USL of 120 and
LongTerm shift of 1.5.
Guidelines A RiskSixSigma property function needs to be entered for cellref
or output name, or a RiskSixSigma property function needs to be
included
RiskPNCUpper
Description RiskPNCUpper(cellref or output name, Sim#,
RiskSixSigma(LSL,USL, Target,LongTerm Shift,Number of
Standard Deviations)) calculates the probability of defect outside
the upper specification limits for cellref or output name in Sim#
optionally using the LSL, USL and LongTerm Shift in the included
RiskSixSigma property function.
Examples RiskPNCUpper(A10) returns the probability of defect outside the
upper specification limits for the output cell A10. A RiskSixSigma
property function needs to be entered in the RiskOutput function in
Cell A10.
RiskPNCUpper(A10, ,RiskSixSigma(100,120,110,1.5,6)) returns
the probability of defect outside the upper specification limits for
the output cell A10, using an LSL of 100, USL of 120 and
LongTerm shift of 1.5.
Guidelines A RiskSixSigma property function needs to be entered for cellref
or output name, or a RiskSixSigma property function needs to be
included
RiskPPMUpper
Description RiskPPMUpper(cellref or output name, Sim#,
RiskSixSigma(LSL,USL, Target,LongTerm Shift,Number of
Standard Deviations)) calculates the number of defects above the
upper specification limit for cellref or output name in Sim#
optionally using the USL and LongTerm Shift in the included
RiskSixSigma property function.
Examples RiskPPMUpper(A10) returns the number of defects above the
upper specification limit for the output cell A10. A RiskSixSigma
property function needs to be entered in the RiskOutput function in
Cell A10.
RiskPPMUpper(A10, ,RiskSixSigma(100,120,110,1.5,6)) returns
the number of defects above the upper specification limit for the
output cell A10, using an USL of 120 and LongTerm shift of 1.5.
Guidelines A RiskSixSigma property function needs to be entered for cellref
or output name, or a RiskSixSigma property function needs to be
included
RiskYV
Description RiskYV(cellref or output name, Sim#, RiskSixSigma(LSL,USL,
Target,LongTerm Shift,Number of Standard Deviations)) calculates
the yield or the percentage of percentage of the process that is free
of defects for cellref or output name in Sim# optionally using the
LSL, USL and LongTerm Shift in the included RiskSixSigma
property function.
Examples RiskYV(A10) returns the yield or the percentage of the process
that is free of defects for the output cell A10. A RiskSixSigma
property function needs to be entered in the RiskOutput function in
Cell A10.
RiskYV(A10, ,RiskSixSigma(100,120,110,1.5,6)) returns the yield
or the percentage of the process that is free of defects for the
output cell A10, using an LSL of 100, USL of 120 and LongTerm
shift of 1.5.
Guidelines A RiskSixSigma property function needs to be entered for cellref
or output name, or a RiskSixSigma property function needs to be
included
RiskZUpper
Description RiskZUpper(cellref or output name, Sim#,
RiskSixSigma(LSL,USL, Target,LongTerm Shift,Number of
Standard Deviations)) calculates how many standard deviations
the Upper Specification Limit is from the mean for cellref or output
name in Sim# optionally using the USL in the included
RiskSixSigma property function.
Examples RiskZUpper(A10) returns how many standard deviations the
Upper Specification Limit is from the mean for the output cell A10.
A RiskSixSigma property function needs to be entered in the
RiskOutput function in Cell A10.
RiskZUpper(A10, ,RiskSixSigma(100,120,110,1.5,6)) returns
how many standard deviations the Upper Specification Limit is
from the mean for the output cell A10, using a USL of 120.
Guidelines A RiskSixSigma property function needs to be entered for cellref
or output name, or a RiskSixSigma property function needs to be
included
762
Reference: Supplemental Functions
The following functions return information on the status of a running
simulation or correlations used in a simulation.
RiskCorrectCorrmat
Description RiskCorrectCorrmat(correlationMatrixRange,adjustmentWeights
MatrixRange) returns the corrected correlation matrix for the matrix
located in correlationMatrixRange using the adjustment weight
matrix located in adjustmentWeightsMatrixRange. An invalid
matrix specifies inconsistent simultaneous relationships between
three or more inputs and must be corrected prior to simulation.
The returned matrix is a valid correlation matrix, that is, all
diagonal entries are 1, the off-diagonal entries are in the range -1
to 1, inclusive, and the matrix is positive-definite (the smallest
eigenvalue is > 0, and the correlations are consistent). If the
adjustmentWeightsMatrixRange was specified, the correlations
have been optimized so they are as close as possible to the
originally-specified correlations, taking into account the weights .
Examples RiskCorrectCorrmat(A1:C3,E1:G3) returns the corrected
correlation matrix for the correlation matrix in the range A1:C3, and
the adjustment weight matrix in E1:G3
Guidelines adjustmentWeightsMatrixRange is an optional argument
This is an array formula which returns an array with the corrected
correlation matrix. To enter it
1) Highlight a range with the same number of rows and columns as
the original correlation matrix
2) Enter the function
=RiskCorrectCorrmat(CorrelationMatrixRange,AdjustmentWeights
MatrixRange)
3) Press <Ctrl><Shift><Enter> at the same time to enter your
formula as an array formula.
Examples None.
Guidelines None.
RiskCurrentSim
Description RiskCurrentSim() returns the current simulation number. No
arguments are required.
Examples None.
Guidelines None.
RiskSimulationInfo
Description RiskSimulationInfo(info to return) returns information such as
date/time, runtime, iterations or simulations for a simulation that
was run.
Examples RiskSimulationInfo(1) returns the date and time that the
simulation whose results are active in @RISK was run.
Guidelines info to return can be 1= date/time, 2= runtime, 3= number of
simulations run, 4= number of iterations run. Date/time info is
returned as a value that will display as a date when the cell where
the RiskSimulationInfo function is located is formatted as a date.
RiskStopRun
Description RiskStopRun(cellRef or formula) stops a simulation when the
value of cellRef returns TRUE, or the entered formula evaluates to
TRUE. Use this function in conjunction with the function
RiskConvergenceLevel to stop a simulation when simulation
results for cellRef have converged.
RiskResultsGraph
Description RiskResultsGraph(cellRef or output/input name,
locationCellRange,graphType,xlFormat,leftDelimiter,
rightDelimiter,xMin,xMax,xScale,title,sim#) adds a graph of
simulation results to a worksheet. The graphs generated are the
same as generated in the @RISK-Results Summary Window.
Many arguments to this function are optional. If optional arguments
are not entered, RiskResultsGraph creates a graph using the
current default settings in the @RISK Results Summary Window
for any omitted argument.
Examples RiskResultsGraph(A10) generates a graph of the simulation
results for cell A10 as a Excel format graph at the location of the
function, using the default graph type (histogram, cumulative
ascending or cumulative descending).
RiskResultsGraph(A10,C10:M30,1,TRUE,1,99) generates a
graph of the simulation results for cell A10 in the range C10:M30
as a histogram in Excel format, and sets the left and right
delimiters at the 1% and 99% values, respectively.
Guidelines cellRef is any valid Excel cell reference with one or more cells.
Either a cellRef or an output/input name argument needs to be
included in a RiskResultsGraph function. When cellRef is entered,
the results to be graphed depend on the following:
If there is a RiskOutput function in cellref, the simulation results
for this output will be graphed.
If there is no RiskOutput function in cellRef, but there is a
distribution function, RiskResultsGraph will graph the collected
samples for this input.
If there is no RiskOutput, and no distribution function in cellRef, a
RiskOutput function is automatically added and this output is
graphed by RiskResultsGraph.
If there are multiple cells in cellRef, an overlay graph is created for
the simulation results for each cell in cellRef. Each overlay has the
same graphType.
locationCellRange is any valid Excel cell range. The created graph
Overview
@RISK allows you to fit probability distributions to your data
(Professional and Industrial versions only). Fitting is done when you
have a set of collected data that you want to use as the basis for an
input distribution in your spreadsheet. For example, you may have
collected historical data on a product price and you might want to
create a distribution of possible future prices that is based on this
data.
To fit distributions to data using @RISK, there are five steps that you
should consider:
Define Input Data
Specify Distributions to Fit
Run the Fit
Interpret the Results
Use the Results of a Fit
Each of these steps is discussed in this chapter.
Sample Data
Sample (or observation) data is a set of values drawn randomly from
a large population. Distributions are fit to sample data to estimate the
properties of that population.
Sample data is either continuous or discrete. Continuous sample data
Continuous
can take on any value over a continuous range, while discrete data is
vs. Discrete
Samples limited to integer values. Discrete data can be entered in two formats.
In the standard format, you enter each data point individually. In
the counted format, the data is entered in pairs, where the first
value is the sampled value and the second is the number of samples
drawn with that value.
Data requirements for sample data include:
Data
Requirements You must have at least five data values.
Discrete data values must be integral.
All sample values should fall in the range -1E+37 <= x <=
+1E+37, or else should be dates.
If you specify a fixed bound, you are telling @RISK that the limit of
Fixed Bound
the distribution must be the value you specify. For example, if you
have a data set of the times between arrivals of customers in a queue,
you might want to fit distributions which have a fixed lower bound of
zero, since it is impossible to have a negative time between events.
If you specify an unknown bound, you are telling @RISK that the
Bounded But
limit of the distribution has a finite bound (that is, it does not extend
Unknown
to plus or minus infinity). Unlike a fixed bound, however, you do not
know what the actual value of the limit is. You want @RISK to choose
the value for you as it performs its fit.
If you specify an open bound, you are telling @RISK that the limit of
Open
the distribution must extend to minus infinity (for a lower bound) or
plus infinity (for an upper bound).
Fixed Parameters
It is possible to set certain distribution parameters to fixed values,
instead of having the fitting algorithm determine them. For example,
imagine you know you want to fit a normal distribution to a set of
data, but you only want the standard deviation of that distribution to
be determined by the software, while its mean has a particular fixed
value.
It is important to note that the fixed bounds (see Domain Limits
above) are, in a sense, also a type of fixed parameter. In that case,
however, the fixed limits apply universally to all distribution types.
To maximize the log of the likelihood, simply set its derivative with
respect to b to zero:
dl n 1 n
d
=
+ 2
X
i =1
i
1 n
RMSErr =
n i =1
(f(x i , ) - y i ) 2
The value of that minimizes this value is called the least squares fit.
In a sense, this value minimizes the distance between the theoretical
curve and the data. The formula above is easily generalized to more
than one parameter.
This method is used to calculate the best distribution for both density
and cumulative curve data.
Parametric Bootstrap
Some calculations (parameter confidence intervals, p-value, and
critical value calculations) require the use of a parametric bootstrap.
Effectively, this takes each fitted distribution and generates a large
number of new sample data sets from it, each with the same size as
the original data set. It then refits those new data sets and tabulates
information about each of the resampled fits.
See the discussions below for a description of parameter confidence
intervals, p-values, and critical values to understand in what
circumstances you would want this information.
By default, the parametric bootstrap option in turned off in @RISK.
For large data sets this can take a fair amount of time, so if you do not
need the information that the parametric bootstrap provides, we
recommend you leave this feature turned off.
Graphs
@RISK provides four types of graphs to help you visually assess the
quality of your fits.
A comparison graph superimposes the input data and fitted
Comparison
distribution on the same graph, allowing you to visually compare
Graphs
them, either as density or cumulative curves. This graph allows you
to determine if the fitted distribution matches the input data in
specific areas. For example, it may be important to have a good
match around the mean or in the tails.
=
2
K
(N i Ei )2
i =1 Ei
where
K = the number of bins
The final fit statistic that can be used with continuous sample data is
Anderson-
the Anderson-Darling Statistic, which is defined as:
Darling Statistic
(A-D) +
[ ]
A = n Fn ( x ) F$ ( x ) ( x ) f$ ( x )dx
2 2
n
where
n = total number of data points
1
2 =
F ( x ) 1 F$ ( x )
$
794
Appendix B: Optimization
Introduction .....................................................................................797
Optimization Methods
Traditional Excel-based optimization problems analyzed using Solver
or Evolver (optimization add-ins to Excel) are comprised of:
An output or target cell that you wish to minimize or maximize
A set of input or adjustable cells whose values you control
A set of constraints that need to be met, often specified using
expressions such as COSTS<100 or A11>=0.
During an optimization in Solver or Evolver, the adjustable cells are
changed across allowable ranges you specify. For each possible set of
adjustable cell values the model is recalculated and a new value for
the target cell is generated. When the optimization is complete, an
optimal solution (or combination of adjustable cell values) is found.
This solution is the combination of adjustable cell values which yields
the best (i.e., minimum or maximum) value for the target cell while
satisfying the constraints youve entered.
Some optimization problems are much harder than others to solve.
For tough problems, such as an Excel model for finding the shortest
route between 1000 cities, it is not feasible to examine every possible
solution. Such an approach would require years of calculations on the
fastest computers.
To solve such problems, it is necessary to search through a subset of
all possible solutions. By examining these solutions, we can get an
idea of how to find better solutions. This is accomplished with an
algorithm. An algorithm is simply a step-by-step description of how to
approach a problem. All computer programs, for example, are built
by combining numerous algorithms.
From the diagram above we can clearly see that we want the dot to go
up the high hill to the right. However, we only know that because we
have already seen the entire landscape. As the algorithm runs, it sees
the landscape immediately around it, but not the entire landscape; it
sees the trees but not the forest.
In most real-world problems, the landscape is not so smooth, and
would require years to calculate, so we only calculate the current
scenario and the immediately surrounding scenarios. Imagine that
the dot is a blindfolded man standing amidst smooth, rolling hills. If
Hill climbing finds the local, but not Noisy data: Hill climbing
global maximum. not effective, even with
multiple tries.
History
The first genetic algorithms were developed in the early 1970s by John
Holland at the University of Michigan. Holland was impressed by
the ease in which biological systems could perform tasks which
eluded even the most powerful super-computers; animals can
flawlessly recognize objects, understand and translate sounds, and
generally navigate through a dynamic environment almost
instantaneously.
For decades, scientists have promised to replicate these capabilities in
machines, but we are beginning to recognize just how difficult this
task is. Most scientists agree that any complex biological system that
exhibits these qualities has evolved to get that way.
Evolution, so the theory goes, has produced systems with amazing
Evolution
Theory capabilities through relatively simple, self-replicating building blocks
that follow a few simple rules:
1) Evolution takes place at the level of the chromosome. The
organism doesnt evolve, but only serves as the vessel in which the
genes are carried and passed along. It is the chromosomes which are
dynamically changing with each re-arrangement of genes.
2) Nature tends to make more copies of chromosomes which produce
a more fit organism. If an organism survives long enough, and is
healthy, its genes are more likely to be passed along to a new
generation of organisms through reproduction. This principle is often
referred to as survival of the fittest. Remember that fittest is a
relative term; an organism only needs to be fit in comparison to others
in the current population to be successful.
3) Diversity must be maintained in the population. Seemingly
random mutations occur frequently in nature that ensure variation in
the organisms. These genetic mutations often result in a useful, or
even vital feature for a species survival. With a wider spectrum of
possible combinations, a population is also less susceptible to a
809
common weakness that could destroy them all (virus, etc.) or other
problems associated with inbreeding.
Once we break down evolution into these fundamental building
blocks, it becomes easier to apply these techniques to the
computational world, and truly begin to move towards more fluid,
more naturally behaving machines.
Holland began applying these properties of evolution to simple
strings of numbers that represented chromosomes. He first encoded
his problem into binary strings (rows of 1s and 0s) to represent
the chromosomes, and then had the computer generate many of these
bit strings to form a whole population of them. A fitness function
was programmed that could evaluate and rank each bit string, and
those strings which were deemed most fit would exchange data
with others through a crossover routine to create offspring bit
strings. Holland even subjected his digital chromosomes to a
mutation operator, which injected randomness into the resulting
offspring chromosomes to retain diversity in the population. This
fitness function replaced the role of death in the biological world;
determining which strings were good enough to continue breeding
and which would no longer be kept in memory.
811
A Biological Example
Let us look at a simple example of evolution in the biological world
(on a small scale). By evolution here we mean any change in the
distribution or frequency of genes in a population. Of course, the
interesting thing about evolution is that it tends to lead to populations
that are constantly adapting to their environments.
Imagine that we are looking at a population of mice. These mice
exhibit two sizes, small and large, and they exhibit two colors, light or
dark. Our population consists of the following eight mice:
One day, cats move into the neighborhood and start eating mice. It
turns out that darker mice and smaller mice are harder for the cats to
find. Thus, different mice have different odds of avoiding the cats
long enough to reproduce. This affects the nature of the next
generation of mice. Assuming the old mice die soon after
reproducing, the next generation of mice looks like this:
Notice that large mice, light mice, and especially large, light mice, are
having trouble surviving long enough to reproduce. This continues in
the next generation.
A Digital Example
Imagine a problem with two variables, X and Y, that produce a result
Z. If we calculated and plotted the resulting Z for every possible X
and Y values, we would see a solution landscape emerge. Since we
are trying to find the maximum Z, the peaks of the function are
good solutions, and the valleys are bad ones.
When we use a genetic algorithm to maximize our function, we start
by creating several possible solutions or scenarios at random (the
black dots), rather than just one starting point. We then calculate the
functions output for each scenario and plot each scenario as one dot.
Next we rank all of the scenarios by altitude, from best to worst. We
keep the scenarios from the top half, and throw out the others.
813
Each of the three remaining scenarios duplicates itself, bringing the
number of scenarios back up to six. Now comes the interesting part:
Each of the six scenarios is made up of two adjustable values (plotted
as an X and a Y coordinate). The scenarios pair off with each other at
random. Now each scenario exchanges the first of its two adjustable
values with the corresponding value from its partner. For example:
Before After
Scenario 1 3.4, 5.0 2.6, 5.0
Scenario 2 2.6, 3.2 3.4, 3.2
815
816 Genetic Algorithms
OptQuest
Introduction
The OptQuest Engine incorporates metaheuristics to guide its search
algorithm toward better solutions. This approach remembers which
solutions worked well and recombines them into new, better
solutions. In addition, this technique does not get trapped in local
solutions or get thrown off course by noisy (uncertain) model data.
The OptQuest Engine combines Tabu search, scatter search, integer
programming, and neural networks into a single, composite search
algorithm providing maximum efficiency in identifying new
scenarios.
Linear Constraints
OptQuest generates solutions that almost always meet all the
specified linear constraints, and time is saved by not evaluating
invalid solutions. (Occasionally OptQuest may generate a solution
that does not meet a linear constraint, due to the fact that computers
cannot handle calculations with infinite precision.)
The Product Mix with Uncertainty 1.xls example demonstrates
OptQuest linear constraint handling. All the constraints are linear,
and all the solutions generated by OptQuest will be valid. More
specifically, the SumProduct formula in the constrained cell
expresses a linear function of the adjustable cells. Other constrained
cells are also linearly dependent on the adjustable cells.
Nonlinear Constraints
OptQuest handles non-linear constraints efficiently, including
situations in which the original values of adjustable cells are invalid
(do not meet the specified constraints). The Genetic Algorithm
generally requires the original adjustable cell values to meet the
constraints. If the original solution is invalid, the Constraint Solver
tool finds a valid solution, providing a starting point for an
optimization that uses the Genetic Algorithm. OptQuest does not
require the use of the Constraint Solver. If the original solution is
invalid, OptQuest may start the optimization by generating a
sequence of invalid solutions. However, during this stage it collects
information about how much each solution falls short of meeting the
constraints, with the objective of finding valid solutions.
817
818 OptQuest
RISKOptimizer Extras
Adding Constraints
Realistic problems often have a number of constraints that must be
met while we search for optimal answers. For example, in the tutorial
for the Airline Revenue Management example, the constraint is that
the probability of the profit exceeding $15000 should be greater than
5%.
A scenario which meets all the constraints in a model is said to be a
viable or valid solution. Sometimes it is difficult to find viable
solutions for a model, much less to find the optimal viable solution.
This may be because the problem is very complex, and only has a few
viable solutions, or because the problem is over-specified (there are
too many constraints, or some constraints conflict with others), and
there are no viable solutions.
There are three basic kinds of constraints: range constraints, or min-
max ranges placed on adjustable cells, hard constraints, which must
always be met, and soft constraints which we would like to be met as
much as possible, but which we may be willing to compromise for a
big improvement in fitness.
819
Range Constraints
The simplest hard constraints are the ones that are placed on the
variables themselves. By setting a certain range on each variable, we
can limit the overall number of possible solutions RISKOptimizer will
search through, resulting in a more efficient search. Enter Min and
Max values in the Model windows Adjustable Cell Ranges section to
tell RISKOptimizer the range of values that are acceptable for each
variable.
RISKOptimizer will only try values between 0 and 5,000 for the specified cells.
821
Iteration vs. Simulation Constraints
Hard constraints in RISKOptimize may be evaluated 1) each iteration
of a simulation run for a trial solution (an iteration constraint), or
2) at the end of the simulation run for a trial solution (a
simulation constraint).
An iteration constraint is a constraint that is evaluated each
iteration of a simulation run for a given trial solution. If an
iteration results in values which violate the hard constraint, the
trial solution rejected. RISKOptimizer may stop a simulation as
soon as an iteration shows the constraint is not met; it may also
continue the simulation, since more complete about the invalid
solution can help in the search for the best solution. Typically
iteration constraints are used if the values of the constrained cells
do not change during a simulation.
A simulation constraint is specified in terms of a simulation
statistic for a spreadsheet cell; for example the Mean of A11>1000.
In this case, the constraint is evaluated at the end of a simulation.
A simulation constraint, as opposed to an iteration constraint, will
never cause a simulation to be stopped prior to completion.
Soft Constraints
Forcing a program to find only solutions that meet all constraints can
result in no viable solutions being found. Often, it is more useful to
have an approximately viable solution, where maybe a few solutions
fall short of meeting the constraints.
An alternative to the use of hard constraints that must be met is to
reconfigure the problem with soft constraints; constraints that
RISKOptimizer will tend to meet. These soft constraints are often
more realistic, and allow RISKOptimizer to try many more options.
In the case of a highly constrained problem (where there are not very
many possible solutions that would meet all your requirements),
RISKOptimizers genetic algorithm will be more likely to find the best
solution if it is allowed to get feedback on some solutions that are
close to satisfying the constraints.
When constraints are design goals, such as produce twice as many
forks as knives, it is often not so important to meet them exactly:
especially if getting a perfectly balanced production schedule
required a day-long optimization process. In this case, a good
825
More Examples For example, suppose you have created a manufacturing model
of Penalty where one of the constraints is that the amount of wood used should
Functions be equal to the amount of plastic used. This constraint is met when
AmountWood = AmountPlastic. We want to find solutions that
include the same amount of both materials, so we create a penalty
function to discourage solutions that stray from our goal. The
formula =ABS(AmountWood-AmountPlastic) computes the absolute
(non-negative) difference between the amount of wood and the
amount of plastic being used. By using the ABS() function, we arrive
at the same penalty value if AmountWood is 20 greater than
AmountPlastic, or if AmountPlastic is 20 less than AmountWood.
Now when we optimize the model, our goal is to minimize the mean
of the simulation results for this absolute difference.
Suppose instead we impose the following constraint: The amount of
wood must be twice the amount of plastic. The penalty function
would then be:
=ABS(AmountWood-AmountPlastic*2)
A different possible constraint is that the amount of wood should be
no less than twice the amount of plastic. While the previous example
produced a penalty if there was too much wood, in this case we only
care if there is not enough wood; if AmountWood is ten times
AmountPlastic, we want no penalty to be applied. The appropriate
penalty function would then be:
=IF(AmountWood<AmountPlastic*2,
ABS(AmountPlastic*2-AmountWood),0)
If AmountWood is at least twice as great as AmountPlastic, the
penalty function returns 0. Otherwise, it gives a measure of how
much less than twice AmountPlastic the AmountWood value is.
Using Penalty After you have created penalty functions to describe the soft
Functions constraints in your model, you can combine them with your normal
target cell formula to obtain a constrained target cell formula. In the
example illustrated below, if cell C8 computes the total cost of a
project, and cells E3:E6 contain five penalty functions, then you can
create a formula in cell C10 such as =SUM(C8, E3:E6).
827
If the flexibility was more important than the strength, we could
change the formula in the target cell to read =(S3+(F3*2)). This way,
scenarios which increased the flexibility by a certain amount would
look better (produce a higher fitness score) than scenarios which
increased the strength by the same amount.
If you wanted to maximize the Strength of a substance (in cell S5) but
also minimize its Weight (in cell W5), you would create a new cell
with the following formula: =(S5^2)-(W5^2). This formula would
produce a higher number when the structure was both strong-and-
light, a lower number when the structure was weak-and-heavy, and
equally average numbers for weak-but-light and strong-but-heavy
scenarios. You would therefore use this new cell as your target, and
maximize its mean to satisfy both goals.
829
How RISKOptimizer's Genetic Algorithm
Optimization is Implemented
In this section we describe more specifically how RISKOptimizers
Genetic Algorithm optimization is implemented.
NOTE: You do not need to know this material in order to use
RISKOptimizer.
The majority of RISKOptimizers genetic algorithm technology such
as the recipe and order solving methods are based on academic work
in the genetic algorithm field over the last ten years. However, most
of the descendant solving methods included with RISKOptimizer, and
the multiple groups of adjustable cells, backtracking, strategy, and
probability features are unique to RISKOptimizer.
RISKOptimizer uses a steady-state approach. This means that only
one organism is replaced at a time, rather than an entire generation
being replaced. This steady state technique has been shown to work
as well or better than the generational replacement method. To find
out the equivalent number of generations RISKOptimizer has run,
take the number of individual trials it has explored and divide that by
the size of the population.
Selection When a new organism is to be created, two parents are chosen from
the current population. Organisms that have high fitness scores are
more likely to be chosen as parents.
In RISKOptimizer, parents are chosen with a rank-based mechanism.
Instead of some genetic algorithm systems, where a parent's chance to
be selected for reproduction is directly proportional to its fitness, a
ranking approach offers a smoother selection probability curve. This
prevents good organisms from completely dominating the evolution
from an early point.
Crossover Since each solving method adjusts the variables in different ways,
RISKOptimizer employs a different crossover routine optimized for
that type of problem.
The basic recipe solving method performs crossover using a uniform
crossover routine. This means that instead of chopping the list of
variables in a given scenario at some point and dealing with each of
the two blocks (called single-point or double-point crossover),
two groups are formed by randomly selecting items to be in one
group or another. Traditional x-point crossovers may bias the search
with the irrelevant position of the variables, whereas the uniform
830
crossover method is considered better at preserving schema, and can
generate any schema from the two parents.
*
Davis, Lawrence (1991). Handbook of Genetic Algorithms. New
York: Van Nostrand Reinhold.
831
Hard constraints are implemented with Palisades proprietary
Constraints
backtracking technology. If a new offspring violates some
externally imposed constraints, RISKOptimizer backtracks towards
one of the parents of the child, changing the child until it falls within
the valid solution space.
Q: Even though Im filling in the dialogs the same way, and letting
RISKOptimizer run the same amount of time, why does
RISKOptimizer sometimes find different solutions?
A: As is the case with natural selection in the biological world, the
RISKOptimizer genetic algorithm will not always follow the same
path when searching for solutions (unless you use a fixed random
number generator seed). Ironically it is this unpredictability
that allows RISKOptimizer to solve more types of problems, and
often find better solutions than traditional techniques.
RISKOptimizers genetic algorithm engine is not just executing a
series of pre-programmed commands, or plugging values
through a mathematical formula, but it is efficiently
experimenting with many random hypothetical scenarios
simultaneously, and then refining the search through many
survival-of-the-fittest operators which also contain random
elements. A similar reason can be given in the case of OptQuest,
the other optimization algorithm in RISKOptimizer. OptQuest
833
experiments with different possible solutions, keeping track of the
results of the experiments performed so far. The randomness
involved of the process keeps it from returning a locally optimal
solution (if there is a better globally optimal solution).
It is possible to specify settings that will make two RISKOptimizer
optimizations return identical results. To accomplish this, Fixed
needs to be selected for Initial Seed in the Sampling tab of the
@RISK - Simulation Settings dialog. In addition, the Trials or
Progress stopping condition needs to be selected in the Runtime tab
of the RISKOptimizer - Optimization Settings dialog.
Welcome
@RISK has long been used to analyze risk and uncertainty in any
industry. With applications in finance, oil and gas, insurance,
manufacturing, healthcare, pharmaceuticals, science and other fields,
@RISK is as flexible as Excel itself. Every day tens of thousands of
professionals use @RISK to estimate costs, analyze NPV and IRR,
study real options, determine pricing, explore for oil and resources,
and much more.
A key application of @RISK is Six Sigma and quality analysis.
Whether its in DMAIC, Design for Six Sigma (DFSS), Lean projects,
Design of Experiments (DOE), or other areas, uncertainty and variable
lies at the core of any Six Sigma analysis. @RISK uses Monte Carlo
simulation to identify, measure, and root out the causes of variability
in your production and service processes. A full suite of capability
metrics gives you the calculations you need to step through any Six
Sigma method quickly and accurately. Charts and tables clearly show
Six Sigma statistics, making it easy and effective to illustrate this
powerful technique to management. The Industrial edition of @RISK
adds RISKOptimizer to your Six Sigma analyses for optimization of
project selection, resource allocation, and more.
Industries ranging from engine manufacturing to precious metals to
airlines and consumer goods are using @RISK every day to improve
their processes, enhance the quality of their products and services,
and save millions. This guide will walk you through the @RISK Six
Sigma functions, statistics, charts and reports to show you how
@RISK can be put to work at any stage of a Six Sigma project.
Example case studies round out the guide, giving you pre-built
models you can adapt to your own analyses.
836 Welcome
Overview of @RISK and Six Sigma
Methodologies
In todays competitive business environment, quality is more
important than ever. Enter @RISK, the perfect companion for any Six
Sigma or quality professional. This powerful solution allows you to
quickly analyze the effect of variation within processes and designs.
In addition to Six Sigma and quality analysis, @RISK can be used to
analyze any situation in which there is uncertainty. Applications
include analysis of NPV, IRR, and real options, cost estimation,
portfolio analysis, oil and gas exploration, insurance reserves, pricing,
and much more. To learn more about @RISK in other applications,
and the use of @RISK in general, refer to the @RISK Users Guide
included with your software.
-6 -5 -4 -3 -2 -1 +1 +2 +3 +4 +5 +6
Note: All graphs and reports in @RISK use the LSL, USL, Target,
Long Term Shift and the Number of Standard Deviations values from
RiskSixSigma property functions that existed at the start of a
simulation. If you change the specification limits for an output (and
its associated RiskSixSigma property function), you need to re-run
the simulation to view changed graphs and reports.
Customizing the The Results Summary window columns can be customized to select
Displayed which statistics you want to display on your results. The Columns
Statistics icon, at the bottom of the window, displays the Columns for Table
dialog.
These markers can be removed if desired using the Markers tab of the
Graph Options dialog. Additional markers may also be added. The
Graph Options dialog is displayed by right-clicking on the graph or
by clicking the Graph Options icon (the second icon from the left on
the bottom of the graph window).
What is Sampling?
Sampling is the process by which values are randomly drawn from
input probability distributions. Probability distributions are
represented in @RISK by probability distribution functions, and
sampling is performed by the @RISK program. Sampling in a
simulation is done, repetitively, with one sample drawn every
iteration from each input probability distribution. With enough
iterations, the sampled values for a probability distribution become
distributed in a manner which approximates the known input
probability distribution. The statistics of the sampled distribution
(mean, standard deviation and higher moments) approximate the true
statistics input for the distribution. The graph of the sampled
distribution will even look like a graph of the true input distribution.
Statisticians and practitioners have developed several techniques for
drawing random samples. The important factor to examine when
evaluating sampling techniques is the number of iterations required
to accurately recreate an input distribution through sampling.
Accurate results for output distributions depend on a complete
sampling of input distributions. If one sampling method requires
more iterations, and longer simulation runtimes than another to
approximate input distributions, it is the less efficient method.
Cumulative Distribution
It is often helpful, when reviewing different sampling methods, to
first understand the concept of a cumulative distribution. Any
probability distribution may be expressed in cumulative form. A
cumulative curve is typically scaled from 0 to 1 on the Y-axis, with Y-
axis values representing the cumulative probability up to the
corresponding X-axis value.
Modeling Features
As an add-in to Microsoft Excel, TopRank links directly to your
Why TopRank?
spreadsheet to add What-if analysis capabilities. The TopRank system
provides all the necessary tools for conducting a What-if analysis on
any spreadsheet model. And TopRank works in a style you are
familiar with Excel style menus and functions.
What-if analysis and Data Tables are functions that can be performed
directly in your spreadsheet, but only in a manual, unstructured
format. Simply changing a cell value in your spreadsheet and
calculating a new result is a basic What-if analysis. A Data Table,
which gives a result for each combination of two values, can also be
built in your spreadsheet.
TopRank, however, performs these tasks automatically and analyzes
their results for you. It instantly performs What-ifs on all possible
values in your spreadsheet which could affect your result, instead of
requiring you to individually change values and recalculate. It then
tells you what spreadsheet value is most significant in determining
your result.
TopRank also runs data table combinations automatically, without
Multi-Way
requiring you to set up tables in your spreadsheet. Combine more
What-if Analysis
than two variables in its Multi-Way What-if analysis you can
generate combinations of any number of variables and rank your
combinations by their affect on your results. You can perform these
sophisticated and automated analyses quickly, as TopRank keeps
track of all the values and combinations it tries, and their results,
separate from your spreadsheet. By taking an automated approach,
TopRank gives you What-if and Multi-Way What-if results, almost
instantly. Even the least experienced modeler can get powerful
analysis results.
The results of drilling are divided into three discrete outcomes (Dry,
Wet, and Soaking). But, in reality, the amount of oil found should be
described with a continuous distribution. Suppose the amount of
money made from drilling follows a lognormal distribution with a
mean of $22900 and a standard deviation of $50000, or the @RISK
distribution =RiskLognorm(22900,50000).
Glossary of Terms
Averse See risk averse
Continuous A probability distribution where any value between the minimum
Distribution and maximum is possible (has finite probability).
See discrete distribution
Cumulative A cumulative distribution, or a cumulative distribution function, is
Distribution the set of points, each of which equals the integral of a probability
distribution, starting at the minimum value and ending at the
associated value of the random variable.
See cumulative frequency distribution, probability distribution
Cumulative A cumulative frequency distribution is the term for the output and
Frequency the input cumulative distributions of @RISK. A cumulative
Distribution distribution is constructed by cumulating the frequency
(progressively adding bar heights) across the range of a frequency
distribution. A cumulative distribution can be an upwardly sloping
curve, where the distribution describes the probability of a value less
than, or equal to, any variable value. Alternatively, the cumulative
curve may be a downwardly sloping curve, where the distribution
describes the probability of a value greater than, or equal to, any
variable value.
See cumulative distribution
Dependent A dependent variable is one that depends in some way on the values
Variable of other variables in the model under consideration. In one form, the
value of an uncertain dependent variable can be calculated from an
equation as a function of other uncertain model variables.
Alternatively, the dependent variable may be drawn from a
distribution based on the random number which is correlated with a
random number used to draw a sample of an independent variable.
See independent variable
Deterministic The term deterministic indicates that there is no uncertainty
associated with a given value or variable.
See stochastic, risk
Frequency Frequency distribution is the proper term for the output probability
Distribution distributions and the input histogram distributions (HISTOGRM) of
@RISK. A frequency distribution is constructed from data, by
arranging values into classes and representing the frequency of
occurrence in any class by the height of the bar. The frequency of
occurrence corresponds to probability.
Higher Moments Higher moments are statistics of a probability distribution. The term
generally refers to the skewness and kurtosis, the third and fourth
moments respectively. The first and second moments are the mean
and the standard deviation, respectively.
See skewness, kurtosis, mean, standard deviation
Independent An independent variable is one that does not depend, in any way, on
Variable the values of any other variable in the model under consideration.
The value of an uncertain independent variable is determined by
drawing a sample from the appropriate probability distribution. This
sample is drawn without regard to any other random sample drawn
for any other variable in the model.
See dependent variable
Iteration An iteration is one recalculation of the user's model during a
simulation. A simulation consists of many recalculations or iterations.
During each iteration, all uncertain variables are sampled once,
according to their probability distributions, and the model is
recalculated using these sampled values.
Also known as a simulation trial
Kurtosis Kurtosis is a measure of the shape of a distribution. Kurtosis
indicates how flat, or peaked, the distribution is. The higher the
kurtosis value, the more peaked the distribution.
See skewness
Variable A variable is a basic model component that can take on more than one
value. If the value that actually will occur is not known with
certainty, the variable is considered uncertain. A variable, certain or
uncertain, may be either dependent or independent.
See dependent variable, independent variable
Variance The variance is a measure of how widely dispersed the values are in a
distribution, and thus is an indication of the risk of the distribution.
It is calculated as the average of the squared deviations about the
mean. The variance gives disproportionate weight to outliers,
values that are far away from the mean. The variance is the square of
the standard deviation.
Readings by Category
The @RISK Users Guide has given you a start on understanding the
concepts of Risk Analysis and simulation. If you're interested in
finding out more about the Risk Analysis technique, and the theory
behind it, here are some books and articles which examine various
areas in the Risk Analysis field.
Distribution Functions
To learn more about the distribution functions used by @RISK's
BestFit distribution fitting software, refer to the following book:
* Evans, Merran, Nicholas Hastings and Brian Peacock. Statistical
Distributions, 2nd ed: John Wiley & Sons, Inc, New York, NY, 1993.
@RISK Library
Distributions ........................................................................................... 487
Results in Library ................................................................................... 493
Seeding Distributions ............................................................................. 488
SQL Server ............................................................................................. 499
Updating Distributions ........................................................................... 491
@RISK Library .......................................................................................... 485
Index 893
Chi-Squared
Statistic ........................................................................................... 150, 788
Circular References .................................................................................... 186
Collect Distribution Samples ...................................................................... 197
combinatorial problems .............................................................................. 808
Compatibility ................................................................................................ 11
Constraint Solver command........................................................................ 383
constraints............................................................................................. 81927
implementation ....................................................................................... 832
Convergence Monitor ................................................................................... 61
Correlation .................................................................................................... 51
Adding .................................................................................................... 134
Adjustment Weights ............................................................................... 131
Checking Matrix Consistency................................................................. 130
Coefficients............................................................................................. 122
Instances, Multiple.......................................................................... 125, 694
Rank Order ..................................................................................... 135, 697
Correlations ................................................................................................ 121
Critical Indices............................................................................................ 476
Critical Values ............................................................................................ 790
crossover rate ...................................................................................... 390, 814
how it is implemented............................................................................. 830
what it does ............................................................................................. 376
Cumulative Descending Percentiles . See Percentiles, Cumulative Descending
Filters
Input Data ....................................................................................... 140, 773
Result...................................................................................................... 217
fitness function ........................................................................................... 352
Fitting ............................................................................................. 5354, 890
Algorithms.............................................................................................. 779
Continuous Distributions ........................................................................ 775
Cumulative Data ..................................................................................... 773
Density Data ........................................................................................... 772
Discrete Distributions ............................................................................. 775
Domain Limits................................................................................ 142, 776
Estimated Parameters ..................................................................... 141, 775
Goodness-of-Fit Tests............................................................................. 787
Input Data ........................................................138, 141, 145, 146, 156, 771
Predefined Distributions ................................................................. 143, 775
Sample Data............................................................................................ 771
Selecting Distributions to Fit .................................................................. 775
Icons
@RISK ..................................................................................................... 81
Desktop....................................................................................................... 7
Import .MPP File Command....................................................................... 447
Input Data Options Command .................................... 138, 141, 145, 146, 156
Inputs
Adding ...................................................................................................... 47
Collecting Distribution Samples ..................................................... 197, 692
Listing....................................................................................................... 56
Locking................................................................................................... 702
Naming ........................................................................... 102, 110, 171, 702
Properties ........................................................................................ 102, 110
Insert Field Command ................................................................................ 480
Insert Function Command .......................................................................... 115
Insert Row/Column Command ................................................................... 127
Installation Instructions............................................................................... 67
Instance Commands.................................................................................... 125
Instances, Multiple................................................... See Correlation, Instances
Iteration................................................................................................. 41, 185
iteration constraint ..................................................................................... 367
Macros
VBA Control of @RISK .......................................................... 199, 71162
Maximum Likelihood Estimators (MLEs).................................................. 779
Menus
Model Menu (@RISK Add-in)................................................................. 91
Results Menu (@RISK Add-in) ............................................................. 205
Simulate Menu (@RISK Add-in) ........................................................... 183
minutes ....................................................................................................... 373
Model dialog....................................................................................... 335, 351
Model Window ..................................................................................... 56, 169
Modeling
Product Features ............................................................................... 42527
modeling uncertainty ................................................................................ 312
Monte-Carlo Sampling ............................................................... 193, 859, 890
Multiple CPUs ............................................................................................ 187
multiple goal problems ............................................................................... 827
mutation rate............................................................................................... 390
how it is implemented............................................................................. 831
what it does............................................................................................. 377
Index 897
Listing....................................................................................................... 56
Naming ........................................................................................... 108, 171
Uninstalling @RISK....................................................................................... 6
Update Project Filters Command................................................................ 480
Index 905
906 Readings by Category