You are on page 1of 5

4/20/2015 Business Analysis ­ Excel with Business

Many business situations involve a number of changing variables, so models made in Excel need to be examined for
all expected combinations of these variables.

With more than one or two variables it is very difficult to manually step through all possible values and
combinations of values. Instead, we can use a number of simulations whereby the variables are changed
automatically.

This module introduces some methods for setting up these simulations using random number inputs that
fall within controlled ranges and change on command and automatically.

Managing random numbers

Excel provides two types of random number:

 Random integers (whole numbers) and random real numbers (fractional numbers).

To generate a random integer, use  =RANDOM(bottom, top).


Excel will generate a whole number somewhere between bottom and top.

To generate a random real number, use  =RAND().


Excel will generate a fractional number somewhere between 0 and 1.

Every time your worksheet is recalculated, all the random numbers on the worksheet will be regenerated. If
set to automatic, recalculation happens every time you change a cell or formula. You can also use F9 as a
shortcut to recalculate the workbook and generate a new set of random numbers, although if the workbook
is large you can only recalculate the current worksheet with Shift F9.

Both the RANDOM and RAND functions return an even distribution ­ i.e. you are just as likely to get
each number in the distribution.

For example, if you use RANDBETWEEN(1,10), and you press F9 1,000 times, you can expect to see an
approximately even number (100) of each integer from 1 – 10.

Of course this won’t happen exactly due to the statistical process used in generating the random numbers,
but over the long term – say millions of iterations ­ the distribution will be reasonably close to even.

Distributions

In nature and in business, many processes and variables don’t follow an even distribution, since you are
more likely to get some values of a variable than others.

A very common distribution is the Normal Distribution.

 DASHBOARD
 SUPPORT
ὐ ❓  
Balaji

The Normal Distribution describes the curve of variations in nature (and man­made objects) in many

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/fmBN6VCgHF 1/5
4/20/2015 Business Analysis ­ Excel with Business
COURSE different areas, including:
Testing and Simulating Models
Physiological measures of the population ­ such as shoe sizes ­ are normally distributed

Biological measures such as blood pressure and cholesterol measures are normally distributed in
adults

SHOW SYLLABUS Annual financial market returns are approximately normally distributed (although there is much


debate about this!)
MODULES

✓✓✓✓✓✓✓

 Download .xlsx file

Module Key

Modules included
The attached resource shows the theory behind the Normal Distribution, and the derivation of the formula
Modules excluded
for generating normally distributed random numbers.
✓ Modules completed

Current module
To generate a real number in a normal distribution with a given mean and standard deviation [SD], use:

=NORMINV(RAND(),mean,SD)

There are several other types of distribution used in business analysis, including the Triangular
distribution (often used in interest­rate simulations) and the Poisson distribution (used for arrival­
time statistics in call centres and customer­service situations).

Testing with random numbers

Using random numbers is an excellent way to visually test spreadsheets for formula performance and
formatting. (We saw this in the previous module on Conditional Formatting: Module 4 ­ Focus on Results.)

There are times when you might want to test a formula with a non­standard distribution of random
numbers.

For example, if we had a business process where:

20% of results are A

30% of results are B

50% of results are C

We could use the CHOOSE function for testing, as follows:

=CHOOSE(RANDBETWEEN(1,10),"A","A","B","B","B","C","C","C","C","C")

The RANDBETWEEN part designates a number between 1 and 10, and the CHOOSE function chooses a
resulting letter out of the list based on that number.

We could also use VLOOKUP with a random key to extract one member from a table of potential samples.

Random numbers and simulation

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/fmBN6VCgHF 2/5
4/20/2015 Business Analysis ­ Excel with Business

A Monte Carlo method is a technique that involves using random numbers and probability to solve
problems. The term ‘Monte Carlo’ was coined in reference to games of chance, a popular attraction in
Monte Carlo, Monaco.

Monte Carlo simulation is a method for evaluating a model using sets of random
numbers as inputs. This method is often used when the model involves uncertain input parameters.

Static models (i.e. models where you get the same results no matter how many times you recalculate
them) are called deterministic.

Monte Carlo simulation, instead of giving a deterministic single result, gives a range of possible results,
and the overall solution can be identified using the mean of the results, the standard deviation of the
results or the most likely result etc.

In the deterministic model below, with known Materials Cost and Demand Quantity, we can determine the
Profit exactly.  We can then use simulation to see the effect on Profit as the input parameters vary
randomly.

The term ‘stochastic’ is used to describe a system ‘involving or subject to probabilistic


behaviour,’ and is often used with regard to models driven by random numbers.

Our 'Production Cost Model' example shows how the simple plan can be changed from a deterministic
model to a stochastic model.

We replace the fixed amounts for Materials Cost and Demand Quantity with random inputs that change
every time the worksheet is refreshed (by pressing F9 or by automatic recalculation).

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/fmBN6VCgHF 3/5
4/20/2015 Business Analysis ­ Excel with Business

Using the RANDBETWEEN function makes this a stochastic model, and a new figure for Profit is
computed every time the worksheet is refreshed.

So now, in this model:

Materials Cost randomises across all values between 5 and 9

Demand Quantity randomises across all values between 80 and 180

Movements in Materials Cost are independent of movements in Demand Quantity

This model can be varied by applying a Normal Distribution to the inputs instead of an even distribution if
you believe that Materials Cost and Demand Quantity are not evenly distributed in the marketplace.#

Method in Action

03:55

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/fmBN6VCgHF 4/5
4/20/2015 Business Analysis ­ Excel with Business

Practice Task

Using random numbers and a random distribution to estimate results from a model. See Questions 1 ­ 4

 Download .xlsx file

Synoptic Task

Setting up a non­standard distribution for sampling. See Question 5.

 Download .xlsx file

PLEASE SELECT

I've completed this module I'll come back to it later I want to filter it out

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/fmBN6VCgHF 5/5

You might also like