+ All Categories
Home > Documents > Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte...

Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte...

Date post: 09-Aug-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
47
v1.x © 2002-2013 ICEAA. All rights reserved. Monte Carlo Simulation ICEAA Canada Peter J. Braxton, Technomics, Inc. Unit III - Module 10 1 You need a license to Monte Carlo!
Transcript
Page 1: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Monte Carlo Simulation

ICEAA Canada

Peter J. Braxton, Technomics, Inc.

Unit III - Module 10 1

You need a license to Monte Carlo!

Page 2: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Outline• Monte Carlo in the Context of Risk Analysis

• Monte Carlo History

• Monte Carlo Components• Monte Carlo Execution

• Monte Carlo Application• Monte Carlo Product Comparison

• Alternatives to Monte Carlo

Unit III - Module 10 2

Page 3: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Purpose of Monte Carlo• Monte Carlo Simulation is the approach that let’s us

execute our program over and over in an infinitude of “alternate universes”

Unit III - Module 10 3

Cost is an unrepeatable experiment!

Page 4: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Monte Carlo History• Famous Examples

– Buffon Needle Experiment

– Manhattan Project

• Other Kinds of Simulation– Discrete Event Simulation

– Modeling and Simulation (M&S)

– Wargaming

Unit III - Module 10 4

Page 5: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Monte Carlo Components• Cost Model

• Input Distributions

• Uncertainty Around Cost Estimates• Discrete Risks (and Opportunities!)

• Correlation Matrix

Unit III - Module 10 5

All risk is relative

Page 6: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Program Risk Distributions

1. Input distributions– Characterize uncertainty of inputs to the cost estimating process,

such as cost-driver parameters (weight, power, SLOC, etc.)

– Commonly include Normal, Lognormal, and Triangular

2. Intermediate output distributions– Characterize uncertainty about estimates for individual cost elements

• Prediction interval (PI) associated with a cost-estimating relationship (CER)– Commonly include t or log t

• Risk ranges provided by a subject matter expert (SME)– Commonly include Triangular

3. Final output distributions– Characterize the uncertainty of an overall cost estimate– Commonly include Normal and Lognormal

Unit III - Module 10 6NEW!

Normality of Work Breakdown Structures, M. Dameron, J. Summerville, R. Coleman, N.St. Louis, Joint ISPA/SCEA Conference, June 2001.

Taking the Next Step: Turning OLS CER-Based Estimates into Risk Distributions. C.M. Kanick, E.R. Druker, R.L. Coleman, M.M. Cain, P.J. Braxton, SCEA 2008.

Page 7: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Portfolio Risk Distributions

4. Cross-program risk distributions– Characterize range of cost growth factors (CGFs) associated with

historical programs

– Commonly include Lognormal, Triangular, or other skew-right distributions (including heavy-tailed distributions)

• A classic problem in risk analysis is how to make inferences about #3 from #4

Unit III - Module 10 7NEW!

Page 8: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Monte Carlo Execution• Variate Generation

– Inverse CDF Technique

• Sampling– Monte Carlo– Latin Hypercube

• Convergence– Shrinking the Confidence Interval (CI)– Prediction Interval (PI) will always have irreducible variation

Unit III - Module 10 8

Page 9: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 9

The Inverse CDF Technique• Monte Carlo Simulation requires a means to generate probability

distributions– All events in a simulation must be assigned a value from some sort of

probability distribution– The Inverse CDF Technique is the easiest and most common

• The CDF of a distribution maps a value (x) to the probability that the random variables takes on a value less an or equal to x– Therefore, the inverse of the CDF maps a probability (between 0 and 1) to

a value from the distribution– By generating a random uniform(0,1) random number, we can produce a

value from any distribution with an invertible CDF

• Every simulation must contain some sort of Uniform (0,1) random number generator– In Excel this function is “=RAND()”, although in terms of “randomness” it is

not sufficient– There is an entire area of computer science dedicated to the production of

the “most random” numbers (of particular interest to cryptographers)

NEW!

Page 10: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 10

Inverse CDF Normal Example• The RAND() function

returns a value of 0.0639

• This is plugged into the inverse CDF

• The value -45.677 is returned– 1.523 standard deviations

below the mean

• This is at the appropriate percentile of the distribution

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

-90 -60 -30 0 30 60 90

0

0.002

0.004

0.006

0.008

0.01

0.012

0.014

-90 -60 -30 0 30 60 90

NEW!

Page 11: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Monte Carlo Application• Cost Risk Analysis

• Schedule Risk Analysis

• Integrated Cost and Schedule Risk Analysis

Unit III - Module 10 11

Page 12: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

What Is Cost Risk Analysis?• Suite of techniques to accurately portray a Cost

Estimate as a range of potential outcomes instead of a point estimate

• Cost Risk Model Architecture

Unit III - Module 10 12

Cost Estimating Body of Knowledge (CEBoK) v1.2, International Cost Estimating and Analysis Association (ICEAA), 2013, Module 9 Cost and Schedule Risk Analysis.

Page 13: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

What Is Schedule Risk Analysis?• Suite of techniques to accurately portray a Cost

Estimate as a range of potential outcomes instead of a point estimate

• Schedule Variance (SV) from Earned Value Management (EVM)– More of an Accomplishment Variance

• Critical Path – Deterministic vs. Probabilistic• As with Cost, Risk is a level harder than Estimating (at

least!)– Get your Schedule healthy first!

Unit III - Module 10 13

Schedule Assessment Guide, Government Accountability Office (GAO).

Page 14: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Integrated Cost and ScheduleRisk Analysis

• Also Known As:– Joint Confidence Level (JCL)

– Cost Informed by Schedule Analysis (CISA)

• Assess the probability of simultaneously coming in:– Under Budget (Cost Risk Analysis)– On Time (Schedule Risk Analysis)

• S-Curve is now three-dimension surface (mind blown!)– Typically visualized with frontier curves on Cost/Schedule scatterplot

• Goal is analysis based on an integrated, consistent set of data• Best suited for:

– Complex development projects with key dates

– Think “Launch”• Physical – satellite/payload

• Virtual – IT system rollout (e.g., ACA)

Unit III - Module 10 14

Joint Confidence Level (JCL) Policy, National Aeronautics and Space Administration (NASA). Joint Cost and Schedule Risk Analysis, ICEAA 2014, Denver, Eric Druker, David Hulett.

Page 15: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Monte Carlo Simulation Tools• Monte Carlo Simulation Overview

• Manual Monte – The Magic of F4

• Mini Monte – How I Overcame My Fear of VBA• Excel Add-Ins – Gazing Into Crystal Ball

• Purpose-Built Tools – IMS-Driven Approach Redux

Unit III - Module 10 15

Page 16: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Monte Carlo Toy Problem• Minimal Cost and Schedule Risk components

Unit III - Module 10 16

Cost variate uniform deterministicWBS# WBSelement WBScost($M) value center stderr mean CV prob conseq low ML high PtEst($M)1 System 48.293$ 40.542$1.1 Hardware 17.331$ 3.137646 0.974121 8.797$ 2.720$ 8.936$1.2 Software 6.138$ 6.138$ 0.009004 10.000$ 20.0% 10.000$1.3 Integration 5.326$ 22.7% 0.769452 20.0% 20.0% 3.787$1.4 Test 2.000$ 1.000$ 0.074919 1.000$ 10.0% 1.000$ 1.000$1.5 SE/PM 17.497$ 0.400$ 16.819$

Technical PtEst(wt)HWweight 10.76 0.162387 0.194010 10.0 11.0 13.0 11.00Schedule endmonth PtEst(endmo)

1 System 43.7 42.01.1 Hardware 29.9 29.9 0.530259 30.0 20.0% 30.01.2 Software 25.6 30.01.3 Integration 37.7 7.9 0.294602 6.0 8.0 12.0 38.01.4 Test 43.7 2.0 4.0 10.0% 2.0 42.01.5 SE/PM 43.7 20.0% 42.0

tdistribution lognormal Bernoulli Triangulardistribution

Page 17: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Monte Carlo Products• @Risk (Palisade)

• Crystal Ball (Oracle Decisioneering)

• ARGO (BAH)• ACE Risk (Tecolote)

Unit III - Module 10 17

Page 18: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Alternatives to Monte Carlo• Methods of Moments

• Scenario-Based Method

Unit III - Module 10 18

Page 19: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Probability Distributions for Risk Analysis

Cost Estimating Advanced (CEA) 07

ICEAA Annual Conference

Peter J. Braxton, Technomics, Inc.

Unit III - Module 10 19

Page 20: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Befriending Your Distributions• Probability distributions are to risk analysts

what words are to poets

• Look at distributions in multiple ways:– Graphical – PDF and CDF graphs– Numerical – Excel functions

– Algebraic – formulae, parameters

• Build a “toy problem” and play with it

• Understand properties of distributions, when they “arise,” how they are related to other distributions

Unit III - Module 10 20NEW!

Page 21: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Excel 2010 Distributions• New and improved format for statistical functions in Excel

– More consistent syntax

– Excel 2007 versions maintained for backwards compatibility

• Same set of distributions– Continuous: BETA, CHISQ, EXPON, F, GAMMA, GAMMALN, LOGNORM,

NORM, T, WEIBULL

– Discrete: BINOM, HYPGEOM, NEGBINOM, POISSON

• Suffixes denote different variants– .DIST = cdf (and sometimes pdf)

– .S = standard (normal only)

– .INV = inverse cdf

– .2T = two-tail

– .RT = right tail (left tail is default)

• Examples:– =NORM.S.INV(RAND()) will generate a standard normal

– =T.INV.2T(0.05,30) will give the (positive) critical value for a t-test at alpha = 0.05, 30 degrees of freedom

Unit III - Module 10 21NEW!

Page 22: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 22

Continuous Distributions

• Normal and t

• Lognormal

• Triangular

• Uniform

• Other Continuous

Page 23: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 23

Normal Distribution Overview• Distribution • Parameters and Statistics

– Mean = µ– Variance = s2

– Skewness = 0

– 2.5th percentile = µ - 1.96s– 97.5th percentile = µ + 1.96s

• Key Facts– If X ~ N(µ, s2), then ~ N(0,1)

(“standard” normal)– Central Limit Theorem holds for n ≥ 30 – 68.3/95.5/99.7 Rule– Limiting case of t distribution– Exponential of normal is lognormal– Dist: NORMDIST(x, mean, stddev, cum)

• cum = TRUE for cdf and FALSE for pdf

– Inv cdf: NORMINV(prob, mean, stddev)

• Applications– Central Limit Theorem

• Approximation of distributions

– Regression Analysis• Assumed error term

– Distribution of cost• Default distribution

– Distribution of risk• Symmetric risks and uncertainties

sµ )( -X

Normal Distribution

0.0

0.1

0.2

0.3

0.4

-4 -3 -2 -1 0 1 2 3 4

( )( )

2

2

2

21 s

µ

ps

--

=x

exp ( ) ( )( )

ò ¥--

-=F=

xt

dtexxF 2

2

2

21 s

µ

ps

),( -¥¥Îx

NEW!

Page 24: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Alternate Specification of NormalGiven Mean Std Dev CV

Mean,CV

Mean,Percentile (Xp, p)

CV,Percentile (Xp, p)

Two Percentiles

Unit III - Module 10 24

( )pZp1-F=

µ µ×CV CV

µp

p

ZX µ-

p

p

Z

X÷÷ø

öççè

æ-1

µ

CVZX

p

p

×+1 CVZCVX

p

p

×+

×

1CV

( ){ }2,11

ÎF= -

ipZ ii µ

s

12

2112

ZZXZXZ

--

12

12

ZZXX

--

NEW!

Page 25: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 25

Triangular Distribution Overview• Distribution • Parameters and Statistics

– Min = a

– Max = b

– Mode = c (a ≤ c ≤ b)

– Mean =

– Variance =

• Key Facts– Excel

• pdf and cdf calculations can be handled as they are listed in the above formulas

– A symmetrical triangle approximates a normal when

• Applications– Risk Analysis

• SME Input

( ) ( ) ( )( )[ ]( ) ( )( )[ ]î

íì

££---££---

=bxccbabxbcxaacabax

xp/2/2

( )( )

( )( )( )

( )( )ïïî

ïïí

ì

££--

--

££--

-

=bxc

cbabxb

cxaacab

ax

xF 2

2

1

sµµsµ 6,,6 +==-= bca

3cba ++

18

222 bcacabcba ---++

0.0000.0050.0100.0150.0200.0250.0300.035

0 20 40 60 80 100 120

pdf

19

NEW!

Page 26: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

The Geometry of Symmetric Triangles

• For a symmetric Triangle(L, M, H), where M-L = H-M

• Find points l and h such that l and h are the pth and 1-pth percentilesIf l-L = 1/2*(M-L), H-h = 1/2*(H-M), then p = 1/(2*22) = 1/8 = 12.5%

If l-L = 1/3*(M-L), H-h = 1/3*(H-M), then p = 1/(2*32) = 1/18 = 5.6%

pth percentile → √(p/2) base fraction → √(2p) half-base fraction

So, the 20th percentile -> 1/5 occurs at point √(1/10) = 0.3162 base fraction

L l M h H

These two “tiled pictures” show two relationships of a fraction of

the base to a fraction of the area, showing the above

equations in a graphical way.

13

1

9

12

1

4

NEW!Unit III - Module 10

“Understatement of Risk and Uncertainty by Subject Matter Experts (SMEs)”, P.J. Braxton, R.L. Coleman, SCEA/ISPA, 2011.

L l M h H

26

Page 27: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Triangles With Related Areas• We wish to know how to draw triangular distributions that are related

to one another• Constant area:

– Used in expansion of experts (correcting understated variance)

– For area to remain constant, in this case A = 1, as the base increases by a factor, the height must be multiplied by the reciprocal of that factor

• Reduction in area:– For area to be reduced by a factor, the dimensions of a similar triangle

must be reduced by the square root of that factor

– For area to be reduced by a factor, the height must be reduced by that factor if the base is to remain constant

• Used in sampling of experts

( ) ÷øö

çèæ==khbkbhA

21

21

÷ø

öçè

æ÷ø

öçè

æ===kh

kbhb

kA

kA 11

1112 21

211

( ) ÷øö

çèæ===khbhb

kA

kA 1

11112 21

211

NEW!Unit III - Module 10

“Understatement of Risk and Uncertainty by Subject Matter Experts (SMEs)”, P.J. Braxton, R.L. Coleman, SCEA/ISPA, 2011.

27

Page 28: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Correction of Understated Variance for Triangles

• For symmetric triangles– To expand from 20-80 to Min-Max,

multiply by 2.72 = 1/0.368

– √(1/10) = 0.3162 base fraction

– √(2/5) = 0.6325 half-base fraction

– To expand from plus-or-minus-one-sigma to Min-Max, multiply by 2.45 (√6)

– (√6-1)/2√6 = 0.2959 base fraction

– (√6-1)/√6 = 0.5918 half-base fraction– Compare with 68.3% within

one sigma rule of thumb forNormal distribution

20 2060

0.6320.368

0.684 0.316

17.5 17.565

0.5920.418

0.704 0.296

NEW!Unit III - Module 10

“Understatement of Risk and Uncertainty by Subject Matter Experts (SMEs)”, P.J. Braxton, R.L. Coleman, SCEA/ISPA, 2011.

28

Page 29: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Correction of Understated Variance for Triangles

• For symmetric triangles– General case

– To expand from pth-(1-p)th to Min-Max, multiply by 1/(1-√(2p))

– If 2p = α, then multiply by 1/(1-√ α)– To expand from (α1/2)th-(1-α1/2) th to

(α2/2)th-(1-α2/2) th [α1 > α2],multiply by (1-√ α 2)/(1-√ α 1)

– For example, to expand from33-67 to 20-80, multiply by(1-√ (2/5)/(1-√ (2/3)) ≈ 2.0

p p1-2p

√(2p)1-√(2p)

1-√(p/2) √(p/2)

“Understatement of Risk and Uncertainty by Subject Matter Experts (SMEs)”, P.J. Braxton, R.L. Coleman, SCEA/ISPA, 2011.

29Unit III - Module 10 NEW!

Page 30: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 30

Lognormal Distribution Overview• Distribution • Parameters and Statistics

– Median =

– Std Deviation of ln X = σ– Mean =

– Variance =

• Key Facts– If X has a lognormal distribution, then ln(X)

has a normal distribution– For small standard deviations, the normal

approximates the lognormal distribution• For CVs < 25%, this holds

– Excel• Cdf = LOGNORMDIST(x, mean, stddev)• Inv cdf = LOGINV(prob, mean, stddev)

• Applications– Risk Analysis

( ) [ ]÷÷ø

öççè

æ -= 2

2

2)/ln(exp

21

psx

xxp

22sµ+e

( )1222 -+ ssµ ee

Lognormal Distribution

0

0.01

0.02

0.03

0.04

0.05

0.06

0 5 10 15 20 25 30 35

),0[ ¥Îx

10

µe

NEW!

Page 31: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Alternate Specification of LognormalGiven Mean Std Dev CV µ σ

Mean,CV

Mean,Percentile (Xp, p)

CV,Percentile (Xp, p)

TwoPer-centiles

Unit III - Module 10 31

( )XE ( )XECV × CV

12

-se( )÷

÷ø

öççè

æ-

±

XEX

Z

Z

pp

p

ln22

( )÷÷ø

öççè

æ

+ 21ln

CVXE ( )21ln CV+

( )XE( )pZp1-F=

( )÷÷ø

öççè

æ

+ 21ln

CVXE

CV ( )21lnln

CVZX

p

p

+

-2

2sµ+e

( )XECV ×

( )XECV ×

( ){ }2,11

ÎF= -

ipZ ii

2

2sµ+e ( )XECV × 1

2

-se12

2112 lnlnZZ

XZXZ--

12

1

2ln

ZZXX

-

÷÷ø

öççè

æ

( )21ln CV+

NEW!

Page 32: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Alternate Specification of LognormalGiven Mean Std Dev CV µ σ

Mean, Median (m)

Median(m), Mode (M)

Mean, Mode (M)

Unit III - Module 10 32

( )XE ( )XECV ×

12

-se

( )÷øö

çèæmXEln2( )mln

( )XE ( )[ ]( )MXE 2ln31

2

2sµ+e ( )XECV ×

( )XECV ×

12

-se

12

-se

( )mln ÷øö

çèæMmln

( )÷øö

çèæMXEln

32

NEW!

Page 33: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Alternate Specification of LognormalGiven Mean Std Dev CV µ σ

Median (m),Percentile (Xp, p)

Mode (M),Percentile (Xp, p)

Unit III - Module 10 33

12

-se÷÷ø

öççè

æ+

±-

MX

Z

Z

pp

p

ln421

22

p

p

ZmX

÷÷ø

öççè

æln

( )pZp1-F=

( )[ ]21ln CVM +( )XECV ×2

2sµ+e

12

-se( )XECV ×2

2sµ+e ( )mln

NEW!

Page 34: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 34

t Distribution Overview• Distribution • Parameters and Statistics

– Degrees of freedom = n– Mean = 0– Variance = – Skewness = 0

• Key Facts– As n approaches infinity, the t

distribution approaches Normal– The t is distributed as – Excel

• cdf = TDIST(x, n, tails)– Tails = 1 or 2 depending on

whether you want to include the probability in the left-hand tail

• Inv cdf = TINV(prob, n)

• Applications– Confidence Intervals

• Mean of Normal variates

– Regression Analysis• Significance of individual

coefficients

– Hypothesis Testing

( )2/)1(2 )]/(1)[2/(

]2/)1[(++G

+G=

nnxnnnxp

p

2-nn

),( ¥-¥Îx

nnNt/)()1,0(

c=

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

-4 -3 -2 -1 0 1 2 3 4

NEW!

Page 35: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 35

Uniform Distribution Overview• Distribution • Parameters and Statistics

– Min = a

– Max = b

– Mode = any value [a,b]

– Mean =

– Variance =

• Key Facts– Excel

• pdf and cdf calculations can be handled as they are listed in the above formulas

• Applications– Risk Analysis

• SME Input

– Sampling from arbitrary distributions

• Example: Rejection Sampling

2ba +

( )12

2ab -

19

-0.02

0

0.02

0.04

0.06

0.08

0.1

0.12

0.00 5.00 10.00 15.00 20.00

UniformDistribution

( )ïî

ïíì

><

££-=

bxorax

bxaabxp

0

1

( )ïî

ïí

ì

>

££--

<

=

bx

bxaabax

axxF

1

0

NEW!

Page 36: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 36

Beta Distribution Overview• Distribution • Parameters and Statistics

– Min = 0

– Max = 1

– Mode =

– Mean =

– Variance =

• Key Facts– Excel

• pdf and cdf calculations can be handled as they are listed in the above formulas

• Applications– Risk Analysis– Order Statistics– Rule of Succession– Bayesian Inference– Task Duration

( ) ( )( ) ( ) ( ) 11 1 -- -

GG+G

= ba

baba xxxf ( ) ( )ba ,xIxF =

baa+

( ) ( )12 +++ babaab

19

0

0.5

1

1.5

2

0.00 0.20 0.40 0.60 0.80 1.00 1.20

BetaDistribution

1 ,1for 2

1>>

-+- baba

a

NEW!

Page 37: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 37

Gamma Distribution Overview• Distribution • Parameters and Statistics

– Min = 0

– Max = ∞

– Mode =

– Mean =

– Variance =

• Key Facts– Excel

• GAMMADIST, GAMMAINV, and GAMMALN [natural log of gamma]

– It is the conjugate prior for the precision (i.e. inverse of the variance) of a normal distribution.

• Applications– Risk Analysis

– Due to shape and scale parameters

– Modeling– Size of insurance claims

and rainfall

( ) ( )xexxp ba

a

ab --

G= 1

( ) ( ) ( )xxF baga

,1G

=

ba

2ba

19

0

0.01

0.02

0.03

0.04

0.05

0.06

0.00 20.00 40.00 60.00 80.00 100.00 120.00

GammaDistribution

1for 1³

- ab

a

NEW!

Page 38: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 38

Weibull Distribution Overview• Distribution • Parameters and Statistics

– Min = 0

– Max = ∞

– Mode =

– Mean =

– Variance =

• Key Facts– Excel

• WEIBULL function where α = k and β = λ, as shown above

– Interpolates between the exponential distribution with intensity 1/λ when k =1 and a Rayleigh Distribution of when k = 2.

• Applications– Risk Analysis– Reliability Engineering– Failure Analysis– Delivery Times– RF Dispersion

( ) ( )kxexF l-

-=1

( )k11+Gl( ) 22 21 µl -+G k

19

-0.1

0

0.1

0.2

0.3

0.4

0.5

0.00 2.00 4.00 6.00 8.00 10.00 12.00

WeibullDistribution

( )( )

ïî

ïíì

<

³÷øö

çèæ

=-

-

00

01

x

xexkxf

kxk

l

ll

ïî

ïí

ì

=

>÷øö

çèæ -

1 0

1 11

k

kkk k

l

NEW!

Page 39: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 39

Exponential Distribution Overview• Distribution • Parameters and Statistics

– Min = 0

– Max = ∞

– Mode = 0

– Mean =

– Variance =

• Key Facts– Excel

• EXPONDIST

– Exponential distribution exhibits infinite divisibility

– Memoryless

• Applications– Risk Analysis– Inter-arrival times (Poisson)– Time between events– Reliability engineering– Hazard Rate– Bathtub Curve

( )îíì

=-

.0,0,0

xxe

xfxll

( )îíì

<³-

=-

.0,0,0,1

xxe

xFxl

1-l

2-l

19

0

0.05

0.1

0.15

0.2

0.00 10.00 20.00 30.00 40.00 50.00 60.00

ExponentialDistribution

( ) ( ) 0, allfor PrPr ³>=>+> tstTsTtsT

NEW!

Page 40: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

0

0.05

0.1

0.15

0.00 20.00 40.00 60.00 80.00 100.00 120.00

ParetoDistribution

Unit III - Module 10 40

Pareto Distribution Overview• Distribution • Parameters and Statistics

– Min =

– Max = +∞

– Mode =

– Mean =

– Variance =

• Key Facts– Excel

• pdf and cdf calculations can be handled as they are listed in the above formulas

– The Pareto distribution and log-normal distribution are alternative distributions for describing the same types of quantities.

• Applications– Risk Analysis– Population sizes– File size and Internet traffic– Hard disk error rates– Distribution of Income

( )ïî

ïíì

<

>= -

m

mm

xx

xxxx

xffor 0

for 1a

a

a ( )ïî

ïíì

<

>÷øö

çèæ-=

m

mm

xx

xxxx

xFfor 0

for 1a

mm xx

xx

³+ for 1a

aa

( ) ( )2for

21 2

2

>--

aaaamx

19mx

mx

NEW!

Page 41: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 41

Discrete Distributions

• Bernoulli

• Binomial

• Other Discrete

Page 42: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 42

Bernoulli Distribution Overview• Distribution • Parameters and Statistics

– Min = 0

– Max = 1

– Mean = p

– Variance = pq

• Key Facts– Excel

• pdf and cdf calculations can be handled as they are listed in the above formulas

– The sum of n Bernoullis is Binomial (n,p)

• Applications– Risk Analysis

• Discrete Risks• X = Cf * Bernoulli• p = Pf

( )îíì

==-=

=101

xpxpq

xp( )

ïî

ïí

ì

³<£

<=

111000

xxq

xxF

NEW!

q p

0 1

Page 43: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 43

Binomial Distribution Overview• Distribution • Parameters and Statistics

– Min = 0

– Max = n

– Mean = np

– Variance = np(1-p)

• Key Facts– Excel

• BINOMDIST

– The number of “successes” in a sequence of n independent experiments

– Beta Distribution is the conjugate prior

• Applications– Risk Analysis– Models for repeated processes

or experiments– May be used for batch

processing failures

( ) ( ) knk ppkn

kp --÷÷ø

öççè

æ= 1 ( ) ( )å

=

--÷÷ø

öççè

æ=

x

i

ini ppin

xF0

1

00.020.040.060.080.1

0.120.14

0.00 10.00 20.00 30.00 40.00 50.00 60.00

BinomialDistribution

NEW!

Page 44: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 44

Negative Binomial Distribution Overview

• Distribution • Parameters and Statistics– Min = 0

– Max = ∞

– Mean =

– Variance =

• Key Facts– Excel

• NEGBINOMDIST

• Applications– Risk Analysis

• Discrete Risks

– Process Analysis

( ) ( ) kr ppkrk

kp -÷÷ø

öççè

æ -+= 1

1 ( ) ( )rkIkX p ,11Pr +-=£

0

0.02

0.04

0.06

0.08

0.1

0.00 10.00 20.00 30.00 40.00 50.00 60.00

Negativebinomial Distribution

ppr-1

( )21 ppr-

NEW!

Page 45: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 45

Poisson Distribution Overview• Distribution • Parameters and Statistics

– Min = 0

– Max = ∞

– Mean = λ

– Variance = λ

• Key Facts– Excel

• POISSON

– Ladislaus Bortkiewicz, 1898, used to investigate the number of Prussian soldiers killed by horse kick.

– Law of Small Numbers or Law of rare events

• Applications– Risk Analysis– Reliability Engineering– Customer Service– Civil Engineering– Astrology

( )!kexpk ll -

= ( ) å=

-=k

i

i

iexF

0 !ll

0

0.02

0.04

0.06

0.08

0.1

0.12

0.00 10.00 20.00 30.00 40.00 50.00 60.00

PoissonDistribution

NEW!

Page 46: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 46

Geometric Distribution Overview• Distribution • Parameters and Statistics

– Min = 1

– Max = ∞

– Mean = 1/p

– Variance =

• Key Facts– Excel

• pdf and cdf calculations can be handled as they are listed in the above formulas

– Continuous analogue is the exponential distribution

• Applications– Risk Analysis

• Discrete Risks

( ) ( ) ppxp k 11 --= ( ) ( )kpxF --= 11

0

0.05

0.1

0.15

0.2

0.00 10.00 20.00 30.00 40.00 50.00 60.00

GeometricDistribution

2

1pp-

NEW!

Page 47: Monte Carlo Simulation Annual... · v1.x © 2002-2013 ICEAA. All rights reserved. Outline • Monte Carlo in the Context of Risk Analysis • Monte Carlo History • Monte Carlo Components

v1.x

© 2002-2013 ICEAA. All rights reserved.

Unit III - Module 10 47

Discrete Uniform Distribution Overview

• Distribution • Parameters and Statistics– Min = a

– Max = b

– Mean =

– Variance =

• Key Facts– Excel

• pdf and cdf calculations can be handled as they are listed in the above formulas

– German Tank Problem

• Applications– Risk Analysis

• Discrete Risks• Quantity selections

( ) ( )ïî

ïíì ££

+-=Otherwise0

11 bkaabxp ( )

ïî

ïí

ì

>

££+-+-

<

=

bk

bkaabak

akxF

111

0

0.00

0.01

0.02

0.03

0.04

0.05

0.06

0.00 10.00 20.00 30.00 40.00 50.00 60.00

DiscreteUniformDistribution

2ba +

( )12

11 2 -+- ab

NEW!


Recommended