SlideShare a Scribd company logo
TU08
Monte Carlo simulation in MS Excel
The Monte Carlo method is based on the generation of multiple trials to determine the expected value of a
random variable. The basis of the method is provided by the following relationship:
%8.99
31
Pr ≈






<−∑ NN N
σ
µξ
There are a number of commercial packages that run Monte Carlo simulation, however a basic spreadsheet
program can be used to run a simulation. In this case the generation of multiple trials is implemented by
propagating a basic formula as many times as the number of iterations required by the model.
Lets assume that a project has six activities. Each activity has a total cost in a specified range. In some cases the
value is fixed (Activity B), but generally it can assume any value within an interval. Each of these variables can
have a unique distribution, but as we will see in a moment, we can safely assume a uniform distribution without
compromising the result.
One important assumption that we make is that each of these variables is independent of the others. This means
that the cost of any activity is not influenced by the cost of any other activity.
Activity Minimum Maximum
A 10,000 20,000
B 15,000 15,000
C 7,500 12,000
D 4,800 6,200
E 20,000 25,000
F 5,000 7,000
Total 62,300 85,200
The total cost of the project is a random variable with a value between the minimum and the maximum. This
variable will be normally distributed since it is the sum of a number of random variables. This is also the reason
why the individual distribution of each variable is not important.
The general scheme of the Monte Carlo method is as follows:
Generate random values for each of the activity costs
Add each series of random values to arrive at a total project cost.
The expected project cost is the average of these values.
There are a number of parameters that can be calculated to assess the goodness of the solution. We will discuss
some of these parameters later on.
The first step is to generate random values for each of the activity costs. Assuming a uniform distribution, we can
use the RAND() function to generate random numbers in the interval (0,1) and multiply these by the range of
each variable. The range is the difference between the maximum value and the minimum value.
The random cost for Activity A will look like this:
=RAND()*(20,000-10,000)+10,000
This formula generates a random value between 10,000 and 20,000
If we create one of these formulas for each of the activities, the total project cost will be the sum of all these
functions. We can propagate the row of formulas for each iteration of the model.
The following table is a sample of the model showing the first seven iterations. Row 4 is the basic model, which
is propagated as required.
Monte Carlo simulation in MS Excel
TU08 2
A B C D E F G H
1 Activity A B C D E F Total
2 Minimum 10,000 15,000 7,500 4,800 20,000 5,000 62,300
3 Maximum 20,000 15,000 12,000 6,200 25,000 7,000 85,200
4 14,167 15,000 7,773 5,682 20,788 5,837 69,247
5 15,556 15,000 10,452 4,943 20,957 6,239 73,148
6 19,970 15,000 8,717 6,136 24,853 6,474 81,149
7 16,811 15,000 11,405 5,252 21,764 6,235 76,467
8 14,783 15,000 10,030 4,870 21,070 6,145 71,898
9 18,002 15,000 8,435 4,808 20,890 5,211 72,346
10 17,628 15,000 9,808 5,112 22,612 5,138 75,297
Determining the number of iterations
The Monte Carlo method provides an estimate of the expected value of a random variable and also predicts the
estimation error, which is proportional to the number of iterations.
The total error is given by:
N
σ
ε
3
= where b is the standard deviation of the random variable, and N is the
number of iterations. We can estimate an upper bound of b by calculating the standard deviation between the
maximum, the minimum and average values of the random variable:
σ = STDEVP(H2:H3,AVERAGE(H2:H3)) = 9,349
Note that we used the function STDEVP, which calculates the standard deviation of the entire population, in this
case only 2 values.
Lets determine the number of iterations required for an error of less than 2%. A gross estimation of the random
variable is the average of the maximum value and the minimum value. An absolute error of 2% is this average
divided by 50:
ε = AVERAGE(H2:H3)/50 = 1,475
Therefore the number of iterations to obtain a result with an error of less than 2% is:
362
475,1
349,93
2
=




 ×
=N
The Model is ran by propagating line 4 a total of 362 times. The expected value of the random variable is the
average of the Total column:
Expected project cost = AVERAGE(H4:H547) = 73,428
Given that the variable is normally distributed, the median should be very close to the mean
MEDIAN(H4:H547) = 73,304. A difference of only 0.2%
The standard deviation is calculated over the entire population:
STDEVP(H4:H547)=3,604
We can now review the true error of the estimate
3.568
362
604,333
=
×
==
N
σ
ε
This is an error of only 0.8%.
Other useful information is the Kurtosis and the Skewness of the distribution. The Kurtosis is a relative measure
of the shape compared with the shape of a normal distribution. The normal distribution has a Kurtosis of 0.
=KURT(H4:H547) = -0.296
=RAND()*(A$3-A$2)+A$2
=SUM(B4:G4)
Monte Carlo simulation in MS Excel
TU08 3
This indicates that the distribution is somewhat flatter than a normal distribution.
Skewness is a measure of asymmetry. The normal distribution has a skewness of 0.
=SKEW(H4:H547) = 0.061
This indicates that the tail of the distribution extends towards the right.
The results can be easily plotted to produce the following chart:
Frequency/Cumulative Chart
0
10
20
30
40
50
60
63,44565,73568,02570,31572,60574,89577,18579,47581,76584,055
Cost $
Frequency
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability© Rob Jeges
www.projectware.com.au
Microsoft Project (MS Project) is a trademark of the Microsoft
Corporation.

More Related Content

What's hot

Regression Analysis and model comparison on the Boston Housing Data
Regression Analysis and model comparison on the Boston Housing DataRegression Analysis and model comparison on the Boston Housing Data
Regression Analysis and model comparison on the Boston Housing Data
Shivaram Prakash
 
The use of Monte Carlo simulation in quantitative risk assessment of IT projects
The use of Monte Carlo simulation in quantitative risk assessment of IT projectsThe use of Monte Carlo simulation in quantitative risk assessment of IT projects
The use of Monte Carlo simulation in quantitative risk assessment of IT projects
Eswar Publications
 
15 anomaly detection
15 anomaly detection15 anomaly detection
15 anomaly detection
TanmayVijay1
 
Monte Carlo Simulation Methods
Monte Carlo Simulation MethodsMonte Carlo Simulation Methods
Monte Carlo Simulation Methods
ioneec
 
Extrapolation
ExtrapolationExtrapolation
Extrapolation
Alkesh Goyal
 
Probability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdfProbability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdf
Vedant Srivastava
 
Application of interpolation in CSE
Application of interpolation in CSEApplication of interpolation in CSE
Application of interpolation in CSE
Md. Tanvir Hossain
 
Inequalties Of Combined Functions2[1]
Inequalties Of Combined Functions2[1]Inequalties Of Combined Functions2[1]
Inequalties Of Combined Functions2[1]
guestf0cee6
 
17 large scale machine learning
17 large scale machine learning17 large scale machine learning
17 large scale machine learning
TanmayVijay1
 
Monte Carlo Simulations
Monte Carlo SimulationsMonte Carlo Simulations
Monte Carlo Simulations
gfbreaux
 
Inequalties Of Combined Functions2[1]
Inequalties Of Combined Functions2[1]Inequalties Of Combined Functions2[1]
Inequalties Of Combined Functions2[1]
guestf0cee6
 
Regression analysis in excel
Regression analysis in excelRegression analysis in excel
Regression analysis in excel
Awais Salman
 
6 logistic regression classification algo
6 logistic regression   classification algo6 logistic regression   classification algo
6 logistic regression classification algo
TanmayVijay1
 
Data Analysis Assignment Help
Data Analysis Assignment HelpData Analysis Assignment Help
Data Analysis Assignment Help
Matlab Assignment Experts
 
13 unsupervised learning clustering
13 unsupervised learning   clustering13 unsupervised learning   clustering
13 unsupervised learning clustering
TanmayVijay1
 
Some Engg. Applications of Matrices and Partial Derivatives
Some Engg. Applications of Matrices and Partial DerivativesSome Engg. Applications of Matrices and Partial Derivatives
Some Engg. Applications of Matrices and Partial Derivatives
SanjaySingh011996
 
12 support vector machines
12 support vector machines12 support vector machines
12 support vector machines
TanmayVijay1
 
7 regularization
7 regularization7 regularization
7 regularization
TanmayVijay1
 
Building 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D ImagesBuilding 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D Images
Shanglin Yang
 
Regression Study: Boston Housing
Regression Study: Boston HousingRegression Study: Boston Housing
Regression Study: Boston Housing
Ravish Kalra
 

What's hot (20)

Regression Analysis and model comparison on the Boston Housing Data
Regression Analysis and model comparison on the Boston Housing DataRegression Analysis and model comparison on the Boston Housing Data
Regression Analysis and model comparison on the Boston Housing Data
 
The use of Monte Carlo simulation in quantitative risk assessment of IT projects
The use of Monte Carlo simulation in quantitative risk assessment of IT projectsThe use of Monte Carlo simulation in quantitative risk assessment of IT projects
The use of Monte Carlo simulation in quantitative risk assessment of IT projects
 
15 anomaly detection
15 anomaly detection15 anomaly detection
15 anomaly detection
 
Monte Carlo Simulation Methods
Monte Carlo Simulation MethodsMonte Carlo Simulation Methods
Monte Carlo Simulation Methods
 
Extrapolation
ExtrapolationExtrapolation
Extrapolation
 
Probability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdfProbability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdf
 
Application of interpolation in CSE
Application of interpolation in CSEApplication of interpolation in CSE
Application of interpolation in CSE
 
Inequalties Of Combined Functions2[1]
Inequalties Of Combined Functions2[1]Inequalties Of Combined Functions2[1]
Inequalties Of Combined Functions2[1]
 
17 large scale machine learning
17 large scale machine learning17 large scale machine learning
17 large scale machine learning
 
Monte Carlo Simulations
Monte Carlo SimulationsMonte Carlo Simulations
Monte Carlo Simulations
 
Inequalties Of Combined Functions2[1]
Inequalties Of Combined Functions2[1]Inequalties Of Combined Functions2[1]
Inequalties Of Combined Functions2[1]
 
Regression analysis in excel
Regression analysis in excelRegression analysis in excel
Regression analysis in excel
 
6 logistic regression classification algo
6 logistic regression   classification algo6 logistic regression   classification algo
6 logistic regression classification algo
 
Data Analysis Assignment Help
Data Analysis Assignment HelpData Analysis Assignment Help
Data Analysis Assignment Help
 
13 unsupervised learning clustering
13 unsupervised learning   clustering13 unsupervised learning   clustering
13 unsupervised learning clustering
 
Some Engg. Applications of Matrices and Partial Derivatives
Some Engg. Applications of Matrices and Partial DerivativesSome Engg. Applications of Matrices and Partial Derivatives
Some Engg. Applications of Matrices and Partial Derivatives
 
12 support vector machines
12 support vector machines12 support vector machines
12 support vector machines
 
7 regularization
7 regularization7 regularization
7 regularization
 
Building 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D ImagesBuilding 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D Images
 
Regression Study: Boston Housing
Regression Study: Boston HousingRegression Study: Boston Housing
Regression Study: Boston Housing
 

Similar to Monte carlo-simulation

report
reportreport
report
Arthur He
 
Multiple Regression.ppt
Multiple Regression.pptMultiple Regression.ppt
Multiple Regression.ppt
TanyaWadhwani4
 
Assignment #4 questions and solutions-2013
Assignment #4 questions and solutions-2013Assignment #4 questions and solutions-2013
Assignment #4 questions and solutions-2013
Darlington Etaje
 
Risk-Analysis.pdf
Risk-Analysis.pdfRisk-Analysis.pdf
Risk-Analysis.pdf
MaheshBika
 
2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria
Paulo Faria
 
Simple lin regress_inference
Simple lin regress_inferenceSimple lin regress_inference
Simple lin regress_inference
Kemal İnciroğlu
 
Statistics project2
Statistics project2Statistics project2
Statistics project2
shri1984
 
Optimum Algorithm for Computing the Standardized Moments Using MATLAB 7.10(R2...
Optimum Algorithm for Computing the Standardized Moments Using MATLAB 7.10(R2...Optimum Algorithm for Computing the Standardized Moments Using MATLAB 7.10(R2...
Optimum Algorithm for Computing the Standardized Moments Using MATLAB 7.10(R2...
Waqas Tariq
 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)
Abhimanyu Dwivedi
 
Monte Carlo Simulation for project estimates v1.0
Monte Carlo Simulation for project estimates v1.0Monte Carlo Simulation for project estimates v1.0
Monte Carlo Simulation for project estimates v1.0
PMILebanonChapter
 
Design and Simulation of a Modified Architecture of Carry Save Adder
Design and Simulation of a Modified Architecture of Carry Save AdderDesign and Simulation of a Modified Architecture of Carry Save Adder
Design and Simulation of a Modified Architecture of Carry Save Adder
CSCJournals
 
Project Paper
Project PaperProject Paper
Project Paper
Brian Whetter
 
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
Karl Rudeen
 
Six sigma pedagogy
Six sigma pedagogySix sigma pedagogy
Six sigma pedagogy
MallikarjunRaoPanaba
 
Six sigma
Six sigma Six sigma
Forecasting (1)
Forecasting (1)Forecasting (1)
Forecasting (1)
Shailendra Gupta
 
CHAPTER TENObjectiveA brief introduction of the basic concept
CHAPTER TENObjectiveA brief introduction of the basic conceptCHAPTER TENObjectiveA brief introduction of the basic concept
CHAPTER TENObjectiveA brief introduction of the basic concept
TawnaDelatorrejs
 
Aplicaciones de la derivadas en contabilidad
Aplicaciones de la derivadas en contabilidadAplicaciones de la derivadas en contabilidad
Aplicaciones de la derivadas en contabilidad
viniciomuozcONTRERAS
 
Regression
RegressionRegression
Regression
ramyaranjith
 
Adding Uncertainty and Units to Quantity Types in Software Models
Adding Uncertainty and Units to Quantity Types in Software ModelsAdding Uncertainty and Units to Quantity Types in Software Models
Adding Uncertainty and Units to Quantity Types in Software Models
Tanja Mayerhofer
 

Similar to Monte carlo-simulation (20)

report
reportreport
report
 
Multiple Regression.ppt
Multiple Regression.pptMultiple Regression.ppt
Multiple Regression.ppt
 
Assignment #4 questions and solutions-2013
Assignment #4 questions and solutions-2013Assignment #4 questions and solutions-2013
Assignment #4 questions and solutions-2013
 
Risk-Analysis.pdf
Risk-Analysis.pdfRisk-Analysis.pdf
Risk-Analysis.pdf
 
2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria
 
Simple lin regress_inference
Simple lin regress_inferenceSimple lin regress_inference
Simple lin regress_inference
 
Statistics project2
Statistics project2Statistics project2
Statistics project2
 
Optimum Algorithm for Computing the Standardized Moments Using MATLAB 7.10(R2...
Optimum Algorithm for Computing the Standardized Moments Using MATLAB 7.10(R2...Optimum Algorithm for Computing the Standardized Moments Using MATLAB 7.10(R2...
Optimum Algorithm for Computing the Standardized Moments Using MATLAB 7.10(R2...
 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)
 
Monte Carlo Simulation for project estimates v1.0
Monte Carlo Simulation for project estimates v1.0Monte Carlo Simulation for project estimates v1.0
Monte Carlo Simulation for project estimates v1.0
 
Design and Simulation of a Modified Architecture of Carry Save Adder
Design and Simulation of a Modified Architecture of Carry Save AdderDesign and Simulation of a Modified Architecture of Carry Save Adder
Design and Simulation of a Modified Architecture of Carry Save Adder
 
Project Paper
Project PaperProject Paper
Project Paper
 
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
 
Six sigma pedagogy
Six sigma pedagogySix sigma pedagogy
Six sigma pedagogy
 
Six sigma
Six sigma Six sigma
Six sigma
 
Forecasting (1)
Forecasting (1)Forecasting (1)
Forecasting (1)
 
CHAPTER TENObjectiveA brief introduction of the basic concept
CHAPTER TENObjectiveA brief introduction of the basic conceptCHAPTER TENObjectiveA brief introduction of the basic concept
CHAPTER TENObjectiveA brief introduction of the basic concept
 
Aplicaciones de la derivadas en contabilidad
Aplicaciones de la derivadas en contabilidadAplicaciones de la derivadas en contabilidad
Aplicaciones de la derivadas en contabilidad
 
Regression
RegressionRegression
Regression
 
Adding Uncertainty and Units to Quantity Types in Software Models
Adding Uncertainty and Units to Quantity Types in Software ModelsAdding Uncertainty and Units to Quantity Types in Software Models
Adding Uncertainty and Units to Quantity Types in Software Models
 

Recently uploaded

哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
nooriasukmaningtyas
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
Madhumitha Jayaram
 

Recently uploaded (20)

哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
 

Monte carlo-simulation

  • 1. TU08 Monte Carlo simulation in MS Excel The Monte Carlo method is based on the generation of multiple trials to determine the expected value of a random variable. The basis of the method is provided by the following relationship: %8.99 31 Pr ≈       <−∑ NN N σ µξ There are a number of commercial packages that run Monte Carlo simulation, however a basic spreadsheet program can be used to run a simulation. In this case the generation of multiple trials is implemented by propagating a basic formula as many times as the number of iterations required by the model. Lets assume that a project has six activities. Each activity has a total cost in a specified range. In some cases the value is fixed (Activity B), but generally it can assume any value within an interval. Each of these variables can have a unique distribution, but as we will see in a moment, we can safely assume a uniform distribution without compromising the result. One important assumption that we make is that each of these variables is independent of the others. This means that the cost of any activity is not influenced by the cost of any other activity. Activity Minimum Maximum A 10,000 20,000 B 15,000 15,000 C 7,500 12,000 D 4,800 6,200 E 20,000 25,000 F 5,000 7,000 Total 62,300 85,200 The total cost of the project is a random variable with a value between the minimum and the maximum. This variable will be normally distributed since it is the sum of a number of random variables. This is also the reason why the individual distribution of each variable is not important. The general scheme of the Monte Carlo method is as follows: Generate random values for each of the activity costs Add each series of random values to arrive at a total project cost. The expected project cost is the average of these values. There are a number of parameters that can be calculated to assess the goodness of the solution. We will discuss some of these parameters later on. The first step is to generate random values for each of the activity costs. Assuming a uniform distribution, we can use the RAND() function to generate random numbers in the interval (0,1) and multiply these by the range of each variable. The range is the difference between the maximum value and the minimum value. The random cost for Activity A will look like this: =RAND()*(20,000-10,000)+10,000 This formula generates a random value between 10,000 and 20,000 If we create one of these formulas for each of the activities, the total project cost will be the sum of all these functions. We can propagate the row of formulas for each iteration of the model. The following table is a sample of the model showing the first seven iterations. Row 4 is the basic model, which is propagated as required.
  • 2. Monte Carlo simulation in MS Excel TU08 2 A B C D E F G H 1 Activity A B C D E F Total 2 Minimum 10,000 15,000 7,500 4,800 20,000 5,000 62,300 3 Maximum 20,000 15,000 12,000 6,200 25,000 7,000 85,200 4 14,167 15,000 7,773 5,682 20,788 5,837 69,247 5 15,556 15,000 10,452 4,943 20,957 6,239 73,148 6 19,970 15,000 8,717 6,136 24,853 6,474 81,149 7 16,811 15,000 11,405 5,252 21,764 6,235 76,467 8 14,783 15,000 10,030 4,870 21,070 6,145 71,898 9 18,002 15,000 8,435 4,808 20,890 5,211 72,346 10 17,628 15,000 9,808 5,112 22,612 5,138 75,297 Determining the number of iterations The Monte Carlo method provides an estimate of the expected value of a random variable and also predicts the estimation error, which is proportional to the number of iterations. The total error is given by: N σ ε 3 = where b is the standard deviation of the random variable, and N is the number of iterations. We can estimate an upper bound of b by calculating the standard deviation between the maximum, the minimum and average values of the random variable: σ = STDEVP(H2:H3,AVERAGE(H2:H3)) = 9,349 Note that we used the function STDEVP, which calculates the standard deviation of the entire population, in this case only 2 values. Lets determine the number of iterations required for an error of less than 2%. A gross estimation of the random variable is the average of the maximum value and the minimum value. An absolute error of 2% is this average divided by 50: ε = AVERAGE(H2:H3)/50 = 1,475 Therefore the number of iterations to obtain a result with an error of less than 2% is: 362 475,1 349,93 2 =      × =N The Model is ran by propagating line 4 a total of 362 times. The expected value of the random variable is the average of the Total column: Expected project cost = AVERAGE(H4:H547) = 73,428 Given that the variable is normally distributed, the median should be very close to the mean MEDIAN(H4:H547) = 73,304. A difference of only 0.2% The standard deviation is calculated over the entire population: STDEVP(H4:H547)=3,604 We can now review the true error of the estimate 3.568 362 604,333 = × == N σ ε This is an error of only 0.8%. Other useful information is the Kurtosis and the Skewness of the distribution. The Kurtosis is a relative measure of the shape compared with the shape of a normal distribution. The normal distribution has a Kurtosis of 0. =KURT(H4:H547) = -0.296 =RAND()*(A$3-A$2)+A$2 =SUM(B4:G4)
  • 3. Monte Carlo simulation in MS Excel TU08 3 This indicates that the distribution is somewhat flatter than a normal distribution. Skewness is a measure of asymmetry. The normal distribution has a skewness of 0. =SKEW(H4:H547) = 0.061 This indicates that the tail of the distribution extends towards the right. The results can be easily plotted to produce the following chart: Frequency/Cumulative Chart 0 10 20 30 40 50 60 63,44565,73568,02570,31572,60574,89577,18579,47581,76584,055 Cost $ Frequency 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Probability© Rob Jeges www.projectware.com.au Microsoft Project (MS Project) is a trademark of the Microsoft Corporation.