Introduction To Sensitivity Analysis
Introduction To Sensitivity Analysis
by Simon Moss
Introduction
Occasionally, you may need to apply a formula to estimate some numerical outcome—such as the cost
of some intervention or the probability of success. To illustrate, suppose you need to estimate the costs
of a graduate research course next year. This cost could perhaps be derived from the formula that
appears in the following box
Cost = 5 000 000 + $12 000 x number of candidates + 98 000 x number of scholarships
You could then apply this formula to estimate the outcome. In this example
Therefore, in this instance, the formula predicts the cost of this course is about 17 million dollars.
However, various bodies, such as the board, might want to clarify the certainty or accuracy of this figure.
That is, they might want to know the degree to which this outcome might change if the parameters—
such as the number of candidates or scholarships—shifted. For example, if the number of candidates
was 250 instead of 200, to what extent would the costs change? Sensitivity analysis is designed to
answer this question and improves the credibility of your estimates.
Page 1 of 17
Illustration: Varying one parameter
Perhaps the best way to learn about sensitivity analysis is merely to apply the following steps in
Microsoft Excel yourself. So, open Microsoft Excel and complete the following activities.
First, enter data that resembles the following display. To achieve this goal, you could simply enter every
word and number. Or, to create the series from 50 to 150 more efficiently, you could use various
functions in Excel. For example, you could
Page 2 of 17
you can now enter a label in this box, such as “candidates”
similarly, shift the cursor to cell B2
in the top left box, enter another label, such as “scholarships”.
So, the formula to represent costs is now “= 5 000 000 + 12 000 x candidates + 98 000 x scholarships”.
You are now ready to enter this formula into Microsoft Excel. As the following display reveals
you could enter this formula in cell E3—one cell above and to the right of your number series
in Excel, * represents the multiplication sign
although not shown in the following display, when you enter this formula, the outcome will be
17 200 000
You are now ready to calculate how the outcome would vary if you varied the number of scholarships.
To achieve this goal, as the following display shows, highlight the cells from D3 to E14 and select the
Data option.
Page 3 of 17
Then
choose an option called ‘What-if analysis”—an option that often appears on the right
select “Data table” to generate the following box
in the cell “Column input cell”, enter “scholarships”.
If you are not using a Mac, the display will differ, but you should still be able to locate “What-if
analysis”. In essence, you are informing Microsoft Excel that you want to vary the parameter called
scholarships. The series of numbers in the column are other possible values of scholarships
This procedure should generate all the estimates that appear in Column E of the following display. To
illustrate, in this instance
Page 4 of 17
if the number of scholarships was only 50, the cost would be 12 300 000
if the number of scholarships was 60, the cost would be 13 280 000 and so forth
Sometimes, rather than present an overwhelming table, readers prefer this information appears in a
figure. To generate a figure, you could
Page 5 of 17
This procedure will generate an ordinary scatterplot, as the following example illustrates. To improve
the appearance of this scatterplot, you could, for example
select an option called “Change Chart Type”, choose X-Y scatter, but then select the first graph that
includes a line. This option will join the dots with a line
select “Add chart elements” to add labels to the X and Y axis.
The previous illustration showed how to calculate the degree to which some outcome—such as the cost
of a graduate research course—would vary in response to shifts in one parameter—such as the number of
scholarships. The next example reveals how you can vary two parameters at the same time.
Again, your first step is to enter data that resembles the following format. In this example
Page 6 of 17
2 Label parameters and enter the formula
Similar to the previous example, you can now label the parameters and enter the formula. The only
difference is the formula should be entered in Column D2 in this example—that is, in the cell above the
column of numbers and to the left of the row of numbers.
To proceed, you should highlight the column and row of numbers, as illustrated in the following display.
Then, like the previous illustration
Page 7 of 17
4 Interpret and plot the various outcomes
This procedure should generate all the estimates that appear in the following display. To illustrate, in
this instance
if the number of scholarships was only 50 and the number of candidates was 150, the cost would be
11 700 000
if the number of scholarships was 60 and the number of candidates was 160, the cost would be 12
800 000 and so forth
This table is particularly overwhelming. To convert this table into a suitable plot
Page 8 of 17
Risk analysis
The previous illustration estimated the costs a program would incur if the number of scholarships ranged
from 50 to 150 or the number of candidates ranged from 150 to 250. Initially, these estimates might
concern the organization. To illustrate
if the number of scholarships and candidates was very high, the costs of this program might exceed
$2.2 million
this cost might exceed the budget and thus cannot be paid
Fortunately, perhaps you, or other specialists in this field, might know the number of scholarships is very
unlikely to exceed 120 or the number of candidates is very unlikely to exceed 200. Therefore, you might
recognize the costs of this program are unlikely to exceed the budget. The question, then, revolves
around how you can apply this knowledge to adjust the estimated costs. A procedure that is often called
a risk analysis can be applied to achieve this goal. This section illustrates this risk analysis.
In the sensitivity analysis, you estimated the costs of this graduate research program if the number of
scholarships was 50, 60, 70, 80, 90, and so forth. But this strategy neglects the possibility that some of
these estimates, such as 90, might be more likely than other estimates, such as 50. To override this
possibility, the researcher could first generate a large set of possible estimates that conforms to a
probability distribution. To illustrate, you might assume the estimates conform to a normal distribution,
as the following graph indicates. According to this graph
Page 9 of 17
The researcher would then utilize a program in Microsoft Excel that generates a whole series of possible
estimates—in this instance, estimates of the number of scholarships next year—that conform to this
distribution. The following table displays these estimates. Consistent with the previous normal
distribution
The researcher would then calculate the costs of this graduate program if each of these estimates was
correct. To illustrate
Page 10 of 17
15233140 14896020 14956780 16397380 14837220 14935220
14052240 15034200 12049120 16715880 14996960 15455600
15692760 15050860 15566340 12604780 15792720 16265080
… … … … … …
Finally, the researcher might calculate the percentiles of these costs. For example, the analysis might
show that
the 95th percentile is 16 000 000, revealing that you can be 95% sure the costs will be less than
$16 000 000
the 50th percentile is 12 000 000, revealing that you can be 50% sure the costs will be less than
$12 000 000
To reiterate, you first need to determine a distribution that represents which estimates—that is, estimates
of the number of scholarships—are most likely. In practice, to determine this distribution, you could
simply ask relevant specialists two questions. In the following table
If the distribution is normal and thus conforms to a bell shape, you need to know only the average or
mean and the standard deviation to characterize the distribution. As the previous table reveals
Page 11 of 17
the answer to the second question can be utilised to estimate the standard deviation; simply calculate
the range and divide by 4
these answers correspond to a distribution that resembles the following graph; however, you do not
need to construct this graph.
The next step is to utilize this distribution to generate a large set of possible estimates. To achieve this
goal in Microsoft Excel, you might need to download the data analysis tools. Specifically
Page 12 of 17
This activity should generate an icon, usually appearing on the far right, called “Data analysis”. When
you click this icon, the following dialogue box appears.
If you scroll down to scan the options, you should be able to locate and highlight “Random Number
Generation” before pressing OK. This procedure should generate a set of options that resemble the
following display.
Page 13 of 17
You can utilize this dialogue box to generate a large set of numbers or estimates that conform to a
particular distribution. To achieve this goal
use the down green arrow to choose a suitable distribution, such as “Normal” in this example
enter the likely mean or average of this distribution, such as 80
enter the likely standard deviation of this distribution, such as 10
indicate the number of random variables or estimates you want to generate; for example, you could
modify the 100 to 1000.
likewise, specify the number of variables or parameters—such as 1 or 2
press OK to generate a set of numbers that might resemble the following display
In the previous display, the first column presents estimates of one parameter: the number of scholarships.
We can now apply the formula in the following box to estimate the cost of graduate research training.
This formula assumes the number of candidates is 200
Page 14 of 17
To estimate these costs
in Cell B1, you can enter a formula like “=5000000 + 12000 * 200 + 98000 * A1” but without the
quotation marks
the outcome—12 871 429—represents the estimated costs of the program if the number of
scholarships is 55.83
copy and paste this formula down Column B
this activity should generate a spreadsheet that resembles the following display
Column B in the previous displays presents many estimates of the outcome or costs. But, in this format,
these numbers are not especially informative. Instead, to communicate this information more
effectively, you could perhaps compute the percentiles. Specifically
Page 15 of 17
An extract of the output appears in the following display. The display includes some relevant and some
irrelevant information. To interpret this output
the first row of numbers indicates the 100th percentile is 18 394 791
in other words, you can be almost 100% certain the cost will be lower than $18 394 791
the sixth row of numbers indicates the 95th percentile is 17 020 078
consequently, you can be 95% certain the cost will be lower than $17 020 078
you could even construct a subset of this table that presents the 95 th, 75th, 50th, 25th, and 5th percentile
only
Page 16 of 17
Variations
You might need to consider several variations of this risk analysis too. For example, researchers might
utilize another distribution, instead of a normal distribution, to estimate the parameter. That is
In these instances, you might need to choose another distribution. The following table can help you
choose an appropriate distribution.
Alternatively, you could utilize a normal distribution, but then delete all values below or above some
limit. This distribution is called a truncated normal distribution.
Page 17 of 17