Monte carlo webinar presentation notes

22
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

description

 

Transcript of Monte carlo webinar presentation notes

Page 1: Monte carlo webinar   presentation notes

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

Page 2: Monte carlo webinar   presentation notes

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

Page 3: Monte carlo webinar   presentation notes

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…

Page 4: Monte carlo webinar   presentation notes

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

Page 5: Monte carlo webinar   presentation notes

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.

Page 6: Monte carlo webinar   presentation notes

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.

Page 7: Monte carlo webinar   presentation notes

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:

Page 8: Monte carlo webinar   presentation notes

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:

Page 9: Monte carlo webinar   presentation notes

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:

Page 10: Monte carlo webinar   presentation notes

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

Page 11: Monte carlo webinar   presentation notes

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…..

Page 12: Monte carlo webinar   presentation notes

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)

Page 13: Monte carlo webinar   presentation notes

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:

Page 14: Monte carlo webinar   presentation notes

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.

Page 15: Monte carlo webinar   presentation notes

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.

Page 16: Monte carlo webinar   presentation notes

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.

Page 17: Monte carlo webinar   presentation notes

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:

Page 18: Monte carlo webinar   presentation notes

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:

Page 19: Monte carlo webinar   presentation notes

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:

Page 20: Monte carlo webinar   presentation notes

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.

Page 21: Monte carlo webinar   presentation notes

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

Page 22: Monte carlo webinar   presentation notes

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