Date post: | 05-Dec-2014 |
Category: |
Documents |
Upload: | anthony-shingleton |
View: | 244 times |
Download: | 0 times |
1
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Lunchtime Webinar Series:
Monte Carlo Simulation
2
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
• What is Monte Carlo Simulation?
• An example of Monte Carlo Simulation
• A Case Study
Agenda
3
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Definition
Monte Carlo Simulations are computational routines to simulate physical or mathematical performance using repeated random sampling.
What does it mean???
Let us look at simple example…
4
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Example
We are going to build a tower of 5 square blocks.
We need to produce blocks of the following sizes: 5x5 cm, 4x4 cm, 3x3 cm, 2x2 cm and 1x1 cm.
We need to make the tower like this:
We produce blocks and we verify that on average dimensions are as required.
What is the size of the tower?
Answer: 15 cm, but……
On average!
A
B
C
D
E
5
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Example
We observe variation in dimensions of blocks we produce.
We study the nature of variation and we find out that the actual dimensions follow normal distribution with standard deviation of 0.1 cm for each block.
How likely is it that the size of the tower will be between 14.8 cm and 15.2 cm?
This problem can be solved using analytical skills but the simpler way to answer is to apply Monte Carlo.
6
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Example
We are going to randomly generate a number for the size of block A from normal distribution with average of 5 and standard deviation of 0.1.
We do same for blocks B to E.
We add the randomly generated numbers and calculate size of tower.
Then we randomly select the next set of sizes for blocks A-E and calculate size of tower.
And we do it over and over again thousands of times.
7
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Example
In Minitab we can do it like this:
8
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Example
The result will look like this:
9
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Example
Now we can calculate the probability of having a tower size between 14.8 cm and 15.2 cm. We can do it like this:
10
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
The result will look like this:
Example
11
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Example - Summary
Although on average size our tower is 15 cm there is a 37.76% probability that it will be outside of the specification (14.8 cm – 15.2 cm)
If you did this exercise on your own computer, the results could be slightly different (due to random sampling), although if we keep increasing sample size results on different computers will become closer and closer (due to Law of Large Numbers)
An understanding of the nature of variation of each process step is the key to applying Monte Carlo.
Now let’s practice…..
12
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Case Study
The process consists of 5 consecutive process steps.
We collected data on the time it takes to complete each process step in minutes (Cycle Time). You can find the results in the Excel data file that was distributed to you before Webinar.
Question 1: What is the average processing time?
Question 2: How likely is it that we will complete the process in under 180 minutes? (this is the requirement from customer)
13
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Case Study – Question 1 We need to calculate the average in each data set and add it together.
One of the way to do it (in Minitab) is the following:
14
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Question 1 - Solution
The answer for Question 1 is the following:
Average time of the process is: 30.144 (Average of Process Step 1) + 31.100 (Average of Process Step 2) + 30.476 (Average of Process Step 3) + 30.268 (Average of Process Step 4) + 30.102 (Average of Process Step 5) =
152.09 minutes
This was actually an easy question, we can answer it even with just Excel.
15
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Case Study – Question 2
The second question is much more difficult to answer.
In order to answer this question we need to understand the nature of variation in each process step.
16
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Case Study – Question 2
We see that data from Process Step 1, Process Step 3 and Process Step 4 are normally distributed, so for each of the process steps we can generate random data from normal distribution with respective averages and standard deviations.
Unfortunately Process Step 2 and Process Step 5 are NOT normally distributed, so we can NOT generate random data from normal distribution.
What we have to do, is to understand from which distribution, both data sets are coming from.
17
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Case Study – Question 2
We can do it in the following way:
18
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Case Study – Question 2
After we randomly generate data into all 5 columns and make a simple formula in sixth column, the result may look like this:
19
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Question 2 - Solution
If we perform capability analysis for the normal data on our sixth column with an Upper Specification Limit of 180 minutes, the result will be the following:
20
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Monte Carlo Simulation - Summary
Monte Carlo is used to simulate performance using repeated random sampling.
We need to understand function y = f(x1, x2…).
We need to understand the nature of variation in each x and what are the underlying distributions the data is coming from.
We usually sample thousands of data points for each x using appropriate distributions in order to produce thousands of data points for y.
21
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Learn More
Classroom courses in Europe • 25-29 June, Amsterdam: Full 5 Day DFSS Training Course
• 11-15 February, Warsaw: Full 5 Day Toolmaster Training Course
• 10-14 September, Brussels: First week of full 3 weeks GB to BB Upgrade Training Course
• 28 January – February 1, Warsaw: First week of full 5 weeks BB course
More information: http://www.bmgi.com/training
22
© BMGI. Except as may be expressly authorized by a written license agreement signed by BMGI, no portion may be altered, rewritten, edited, modified or used to create any derivative works.
Questions & Answers