MISn46 Modeling Uncertainty 1 F07

download MISn46 Modeling Uncertainty 1 F07

of 42

Transcript of MISn46 Modeling Uncertainty 1 F07

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    1/42

    Modeling Uncertainty

    Fun with decisions and uncertainty

    Sensitivity analysis Preview Monte-Carlo simulation

    Brief review of probability distributions and

    statistics using Excel

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    2/42

    Warning! Decision and risk

    analysis is a radical concept

    People, in general, are not comfortable withprobabilistic reasoning

    Most people commonly use point estimates for

    uncertain quantities and then may carry out a limited1 or 2 variable sensitivity analysis

    Everyone will say, too much thinking and planningrequired, dont have time in the real world

    but somehow, people have time to revisit the messes theymake with seat of the pants decision making

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    3/42

    Importance and Difficulty of

    Uncertainty Modeling

    The world is uncertain

    Replacing random quantities with averages or singleguesstimates can be dangerous The Flaw of Averages

    Allows prediction ofdistribution of results Not just one predicted number or outcome

    Sensitivity analysis of outputs to inputs

    Which inputs really affect the outputs? Fun with Uncertainty

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    4/42

    4

    Sensitivity Analysis

    Sensitivity analysis (SA) a big part of modelingand analysis

    SA = What matters in this decision?

    which variables might I want to explicit model asuncertain and which ones might I just as well fix to mybest guess of their value?

    On which variables should we focus our attention oneither changing their value or predicting their value?

    No optimal SA procedure exists SA can help identify Type III errors - solving the

    wrong problem

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    5/42

    5

    Some SA Techniques

    Scenarios base, pessimistic, optimistic How did we do with scenario planning?

    1-way and 2-way data tables and associated

    graphs as in the Break Even spreadsheet

    Tornado diagrams a one variable at a time technique

    Top RankExcel add-in for simple What if?

    Risk Analysis or Spreadsheet Simulation direct modeling of uncertainty through probability

    distributions

    @Risk , CrystalBall sophisticated Excel add-ins

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    6/42

    6

    Tornado Diagrams

    Graphical sensitivity analysis technique

    Create base, low and high value scenarios foreach input variable

    Set all variables at base value Wiggle each variable to its low and high values,

    one at a time.

    A one-way sensitivity analysis technique

    Calculate total profit for each scenario Create tornado diagram - Excel

    From Making Hard Decisions by Clemen

    GreatThreads-Tornado.xls

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    7/42

    7

    Using Top Rank (see p714-721 in PMS)

    Quit Excel (Top Rank acting flaky)

    Start | Programs | Palisade Decision Tools | Top Rank 1.5

    it will launch Excel and start

    Open up your file

    GreatThreadsTornado.xls

    Select output cell and click Add output cells on TopRank toolbar

    Click Step through input cells on TopRank toolbar and specifywhich inputs are to be varied and by how much

    Click Run what-if analysis on toolbar

    When results come up, click the tornado graph toolbar buttonand select tornado

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    8/42

    8

    Sensitivity Analysis with TopRank

    Big bars means

    high impact

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    9/42

    9

    Preview of Monte-Carlo Simulation

    Simple Excel Simulation example

    Revenue for 3 products with fixed prices and

    random demands

    What is simulation When do you use simulation

    Real applications of simulation

    Prob distributions the building blocks ofsimulation

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    10/42

    Monte-Carlo Simulation

    A modeling approach that allows explicit incorporation ofuncertainty in spreadsheet models

    Got its start during the Manhattan project in WWII for modelingnuclear devices

    One or more random elements modeled with probabilitydistributions Sample from the input distributions many, many times

    Keep track of the values of the outputs for each sampling of the inputs

    Analyze the outputs

    Often called Risk Analysis Uncertainty is about values of unknown variables

    Risk is about consequences of uncertainty

    @RISK - Palisade Software

    Spreadsheets provide good environment for simulation

    Goes beyond expected values and point estimates

    Doing simulation involves more than just building models withsoftware must be probability/stats literate to do proper input and output analysis

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    11/42

    11

    Our First Simple Simulation Model

    3ProductSimulation-template.xls

    What is expected revenue? Deterministic: prices of products A,B,C

    Stochastic: demand for products A,B,C

    What is the variability in revenue?

    Thr r t Sim l ti l

    if rm m i tri ti

    r t ri i

    A $ 0 20 0

    B $1 0 0 0C $ 00 0 10

    Tot l

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    12/42

    12

    A few simulation applications

    T Rowe Price 529 Simulator

    NFL play calling

    http://www.sciencedaily.com/releases/2006/04/060420232621.htm

    http://www.pigskinrevolution.com/index.html

    @Risk case studies

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    13/42

    Building a Spreadsheet Based Simulation Model

    (1)Builddeterministic

    model

    Inputs OutputsFormulas

    (2) Chooseinputs to model

    as random

    Inputs

    Stochastic or Uncertain or Random Inputs

    Deterministic Inputs

    (3) Model uncertain inputs with probability distributions

    Discrete Probability Distribution of Demand

    0.00

    0.05

    0.10

    0.15

    0.20

    0.25

    0.30

    0.35

    100 150 200 250 300

    Demand

    Probability

    Uniform Normal PoissonExponential Empirical

    Many more

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    14/42

    Building a Spreadsheet Based Simulation Model

    (4) Recalculate

    spreadsheet many times 2 options

    (4.2) Use spreadsheet simulation add-in

    such as @Risk or Crystal Ball (Ex 11.2)

    (4.1) Manually, through formulas and

    either many rows or VBA(Ex 11.1)

    Running the model

    @Risk

    www.palisade.com Crystal Ball

    www.decisioneering.com

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    15/42

    Probability: The Language of Uncertainty

    Distributions: Building Blocks ofSimulation

    Random variables Discrete probability distributions

    Expected value of a discrete randomvariable

    Continuous probability distributions

    Using Excels probability and statisticsfunctions

    Using the RiskView add-inYou learned about most of the above and more in your

    Statistics course. Ill just do a quick refresher as needed on

    some concepts well need for this course.

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    16/42

    Random variables (RV) and

    probability distributions RV is a variable whose value depends on the outcome of an

    uncertain event(s)

    Low bid by competing firms, project completion date

    Demand for some product or service next year

    Number of patients requiring open heart surgery next month at

    Hospital H Cost of Drug X in December, 2004

    Probability of various outcomes determined by probabilitydistribution associated with the RV

    Probability distributions are the shapes of RVs

    As modelers, we select appropriate distributions Probability distributions

    mathematical functions

    Assign numeric probabilities to uncertain events modeled bythe distribution

    See Distributions, Simulation and Excel Functions handout that Prof. Doanecreated and that Ive posted on Web.

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    17/42

    17

    Using Distributions for

    Simulation

    We will model uncertain inputs with probabilitydistributions Need to be able to generate random numbers from various

    probability distributions We may fit probability distributions to raw data to

    serve as a convenient model of the data

    Simulation model outputs will be distributions Need to know how to compute various measures from

    distributions

    Simulating different scenarios - Need to know how tocompare features of distributions with each other

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    18/42

    Two Types of Distributions

    Discrete Distributions

    Integer, countable X

    EX: # of warranty claims in a day

    P(X) is the probability at each point

    P(X)may be summed over X values

    Continuous Distributions

    X defined over an interval

    EX: Length of stay for open heart surgery patients

    Points have no area

    Calculus gives area under curve

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    19/42

    P.D.F. vs. C.D.F

    Probability Density Function X axis shows values of X

    Y axis shows probability

    7 P(X) = 1 if discrete

    f(x) = 1 if continuous

    Histogram is pdf for data

    Cumulative Distribution Function

    X axis shows values of X

    Y axis shows cumulative probability

    0 e F(X)e 1 and is non-decreasing

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    20/42

    Discrete RVs and Probability Distributions

    Countable # of outcome values

    Each possible outcome has an

    associated probability

    Di

    r

    t

    r

    ilit

    Di

    tri

    ti

    fDem

    0.00

    0.0

    0.10

    0.1

    0.20

    0.2

    0.

    0

    0.

    5

    100 150 200 250 300

    Dem

    r

    ilit

    Expected Demand Total Probability

    A few discrete distributions

    Empirical

    Binomial BINOMDIST()

    Poisson POISSON()

    1

    [ ] [ ]n

    i i

    i

    E X x P X x!

    ! !Expected Value of Discrete RV

    DistributionReview.xls

    x rob[ x] rob[ < x]

    De and robabilit

    u ulative

    robabilit

    . .

    . .

    . .8

    . .9

    . .

    7 . .

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    21/42

    21

    Cumulative Distribution Function (CDF)

    for a Discrete Random Variable

    e

    exx

    i

    i

    xpxxF )()Pr()(

    1)(0 ee xF

    The probability a random variable X

    takes on a value less than or equal to x.

    Properties of the CDF

    F(x) is nondecreasing in x

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    22/42

    Distribution Review

    Download DistributionReview.xls Lets answer questions on sheet Discrete

    Well do Continuous sheet momentarily

    Excel has many probability and statisticalrelated functions

    Remember, probability distributions are a

    type ofmodel for some uncertain quantity

    Think of histograms as empirical probability

    distribution functions

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    23/42

    Continuous RVs and Probability

    Distributions

    Infinite # of outcome values

    Has a probability distribution

    (density) function (pdf), f(x),

    We calculate probabilities over

    intervals using the cumulative

    distribution function (cdf), F(x),which is P X =b

    Area under the f(x) curve

    from infinity to b

    [ ] ( )b

    P X b f x dxg

    e

    [ ] ( )E X xfx dxg

    g!

    Uniform f(x) Exponential f(x) Normal f(x)

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    24/42

    Excel Add-In, Part of Palisade Decision Tools Suite

    Live distribution viewing, Huge number of distributions Online Help has background info on distributions

    Start | Palisade Decision Tools | RiskView 4.5

    Can also launch from within Excel from the Palisade DecisionTools toolbar (which is visible if any of the Palisade tools are

    running, e.g. @Risk)

    RiskView

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    25/42

    A few useful distributionsDistribution Illu stration Characteristics

    Normal The familiar bell-shaped curve.

    Symmetric, with a peak in the

    middle and gradually tapering tails.

    Pro: Familiar, well-known.

    Con: Extreme outcomes possible.

    Truncated normal Same as normal but with limits to

    prevent extreme cases from arising.

    Pro: No wild outcomes.

    Con: More complicated.

    Triangular Has a central peak and clearly-

    defined end points (lowest, most

    likely, highest). Can be skewed.

    Pro: Easy to understand.

    Con: No extremes can occur.

    General R e v e n u e fr! " # $ $ e t % & le

    0 .00

    0 . ' 0

    0 .(

    0

    0 .)

    0

    0 .4 0

    5 0 1 0 0 2 0 0 5 0 0 1 0 0 0

    R e v e n u e

    P

    r

    0

    1

    2

    1

    ilit

    3

    Define any k categories and make

    sure the probabilities sum to 1.

    Pro: Easy to understand.

    Con: Need to create categories.

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    26/42

    The Normal Distribution

    Two parameters: Mean, standard deviation

    Symmetric

    Standard normal distribution has mean=0, std dev=1

    Normally distributed data with any mean andstandard deviation can be converted to a N(0,1) bystandardizing

    X~N(Q,W) Z~N(0,1)X

    ZQ

    W

    !

    Excel has a number of functions related to the normal distribution:

    NORMDIST(), NORMINV()

    NORMSDIST(), NORMSINV()

    Lets review handout Excel Functions for Working with Normal

    Distributions and do the Continuous tab in DistributionReview.xls

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    27/42

    Descriptive Statistics in Excel

    Data Analysis Tool-Pak AVERAGE(), STDEV(),MEDIAN()

    FREQUENCY()

    PERCENTILE()

    RANK(),

    PERCENTRANK()

    MIN(), MAX()

    StatReview.xls

    2 ways to create histograms Data Analysis Tool-Pak

    Default bins

    User specified bins

    FREQUENCY() array function

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    28/42

    The very special Uniform

    Random Variable (r.v.)

    If X~Uniform(0,1) Then E X =1/2

    (expected value)

    X is equally likely to take any

    value between 0 and 1

    Probability X =x] = xExcels RAND() function

    r.v. has a distribution of type Uniform with a min=0 and max=1

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    29/42

    Uniform Random Numbers for

    Simulation

    Building blocks of simulation

    Modeling randomness

    Basis for generating random variables

    Normal, exponential, Poisson, triangular, etc.

    Need reliable stream of Uniform(0,1) RVs

    Excels RAND() function

    How do computers generate randomnumbers?

    All examples in RandNum_Isken.xls. Letsopen it.

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    30/42

    Uniform Distribution Function

    How could youuse a U(0,1) number to

    create a random number between a and

    b? Lets do it in RandNum_Isken.xls

    Question

    Implication of shape ofdistribution?

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    31/42

    Using U(0,1)s to generate

    other random variables

    3

    5

    6

    Demand distrib tion

    Cumul ti r ob Demand

    0.00 100

    0.30 150

    0.50 200

    0. 0 250

    0. 5 300

    1

    1

    1

    A B C

    Simulation

    Replication Random # Demand

    1 0.1 100

    Find U(0,1) random

    number in cumulative

    distribution of random

    variable you want togenerate.

    Return value of random

    variable.

    Walton example

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    32/42

    Using U(0,1)s to

    generate Normal

    random variables

    Random # =122.57

    NORMINV(.1747,160,40)=122.57

    NORMDIST(122.57,160,40,TRUE)=.1747

    CDF for N(160,40)

    Simulation

    Replication Random # Demand

    1 0.1747 122.57

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    33/42

    33

    Generating Random Numbers

    Excels Data Analysis Tool-Pak

    Excel RAND() along with transformations

    Not possible for all distributions

    @Risk functions

    @Risk has myriad of functions for generating random

    numbers from a wide variety of distributions

    The file ProbabilityDistributions.xls (Downloads

    section of course web) illustrates generating various

    random variables

    www.random.org

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    34/42

    Some of the broadly applicable

    insights...

    Explicit incorporation and quantification of risks and uncertainties isoften important

    Be wary of clairvoyant analysts!

    Several methods for trying to incorporate uncertainty in analysis

    Quantification of risk is difficult and subject to common humandecision biases

    Humans have hard time with uncertainty

    Its important to guard against decision biases

    Awareness is half the battle

    Its OK to say I DONT KNOW

    Not all information is worth the cost or equally valid Obtaining data for some of these modeling approaches can be

    difficult

    probability estimation can be tough

    historical data may or may not exist

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    35/42

    35

    What is Simulation?What is Simulation?

    AA simulationsimulation is a computer model thatis a computer model thatattempts to imitate the behavior of a realattempts to imitate the behavior of a realsystem or activity.system or activity.

    Simulations helps to quantify relationshipsSimulations helps to quantify relationships

    among variables that are to complex toamong variables that are to complex toanalyze mathematically.analyze mathematically.

    If the simulations predictions differ fromIf the simulations predictions differ fromwhat really happens, refine the model in awhat really happens, refine the model in a

    systematic way until its predictions are insystematic way until its predictions are inclose enough agreement with reality.close enough agreement with reality.

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    36/42

    36

    What is Simulation?What is Simulation?

    In general, consider simulation whenIn general, consider simulation when

    -- The system is complexThe system is complex-- Uncertainty exists in the variablesUncertainty exists in the variables

    -- Real experiments are impossible or costlyReal experiments are impossible or costly

    --T

    he processes are repetitiveT

    he processes are repetitive-- Stakeholders cant agree on policyStakeholders cant agree on policy

    When Do We Simulate?When Do We Simulate?

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    37/42

    37

    What is Simulation?What is Simulation?

    Conversely, we are less inclined to simulateConversely, we are less inclined to simulate

    whenwhen

    -- The system is simpleThe system is simple

    -- Variables are stable or nonstochasticVariables are stable or nonstochastic

    -- Real experiments are cheap andReal experiments are cheap and

    nondisruptivenondisruptive

    -- The event will only happen onceThe event will only happen once

    -- Stakeholders agree on policyStakeholders agree on policy

    When Do We Simulate?When Do We Simulate?

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    38/42

    38

    What is Simulation?What is Simulation?

    In aIn a deterministicdeterministicmodel, variables cantmodel, variables cant

    vary.vary.

    Simulation lets key variablesSimulation lets key variables changechange inin

    random but specified ways.random but specified ways.

    Simulation helps us understand theSimulation helps us understand the rangerange ofof

    possible outcomes and their probabilities.possible outcomes and their probabilities.

    Simulation allowsSimulation allows sensitivity analysissensitivity analysis..

    Advantages of SimulationAdvantages of Simulation

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    39/42

    39

    Simulation is useful because itSimulation is useful because it

    -- Is less disruptive than real experimentsIs less disruptive than real experiments

    -- Forces us to state our assumptions clearlyForces us to state our assumptions clearly

    -- Helps us visualize the implications of ourHelps us visualize the implications of ourassumptionsassumptions

    -- Reveals system interdependenciesReveals system interdependencies

    -- Quantifies risk by showing probabilities ofQuantifies risk by showing probabilities ofeventsevents

    -- Helps us see a range of possible outcomesHelps us see a range of possible outcomes

    -- Promotes constructive dialogue amongPromotes constructive dialogue among

    stakeholdersstakeholders

    Advantages of SimulationAdvantages of Simulation

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    40/42

    40

    RiskAssessmentRiskAssessment

    Risk assessmentRisk assessmentmeans thinking about ameans thinking about a

    range of outcomesrange of outcomes and theirand theirprobabilitiesprobabilities..

    Variation is inevitable.Variation is inevitable.

    Knowing the 95% range of possible valuesKnowing the 95% range of possible valuesfor the decision variable as well as the mostfor the decision variable as well as the most

    likely valuelikely value QQ, is the point of risk, is the point of risk

    assessment.assessment.

    Risk assessment is useful when the modelRisk assessment is useful when the model

    is complex.is complex.

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    41/42

    41

    What is Simulation?What is Simulation?

    Components of a Simulation ModelComponents of a Simulation Model

  • 8/8/2019 MISn46 Modeling Uncertainty 1 F07

    42/42

    42

    What is Simulation?What is Simulation?

    Components of a Simulation ModelComponents of a Simulation Model