 1  Outline  stages and topics in simulation  generation of random variates.

Slides:



Advertisements
Similar presentations
Table of Contents Chapter 12 (Computer Simulation: Basic Concepts)
Advertisements

Random Variables ECE460 Spring, 2012.
Week 11 Review: Statistical Model A statistical model for some data is a set of distributions, one of which corresponds to the true unknown distribution.
Outline input analysis input analyzer of ARENA parameter estimation
Statistics review of basic probability and statistics.
 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.
 1  Outline  terminating and non-terminating systems  analysis of terminating systems  generation of random numbers  simulation by Excel  a terminating.
 1  Outline  generation of random variates  convolution  composition  acceptance/rejection  generation of uniform(0, 1) random variates  linear.
Chapter 8 Random-Variate Generation
 1  Outline  Model  problem statement  detailed ARENA model  model technique  Output Analysis.
Review of Basic Probability and Statistics
Descriptive statistics Experiment  Data  Sample Statistics Sample mean Sample variance Normalize sample variance by N-1 Standard deviation goes as square-root.
Random-Variate Generation. Need for Random-Variates We, usually, model uncertainty and unpredictability with statistical distributions Thereby, in order.
Simulation Modeling and Analysis
Discrete Event Simulation How to generate RV according to a specified distribution? geometric Poisson etc. Example of a DEVS: repair problem.
Simulation.
Descriptive statistics Experiment  Data  Sample Statistics Experiment  Data  Sample Statistics Sample mean Sample mean Sample variance Sample variance.
Variance Reduction Techniques
1 Validation and Verification of Simulation Models.
4. Review of Basic Probability and Statistics
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 6-1 Chapter 6 The Normal Distribution and Other Continuous Distributions.
Statistical Inference Lab Three. Bernoulli to Normal Through Binomial One flip Fair coin Heads Tails Random Variable: k, # of heads p=0.5 1-p=0.5 For.
A) Transformation method (for continuous distributions) U(0,1) : uniform distribution f(x) : arbitrary distribution f(x) dx = U(0,1)(u) du When inverse.
IE 594 : Research Methodology – Discrete Event Simulation David S. Kim Spring 2009.
ETM 607 – Random Number and Random Variates
Binary Variables (1) Coin flipping: heads=1, tails=0 Bernoulli Distribution.
Simulation Output Analysis
 1  Outline  input analysis  goodness of fit  randomness  independence of factors  homogeneity of data  Model
Verification & Validation
Lecture 17 Nov 7, 2012 Discrete event simulation discrete time systems system changes with time, in discrete steps uncertainty (modeled by probability)
Monte Carlo Simulation CWR 6536 Stochastic Subsurface Hydrology.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
0 K. Salah 2. Review of Probability and Statistics Refs: Law & Kelton, Chapter 4.
Ch5. Probability Densities II Dr. Deshi Ye
Lecture 19 Nov10, 2010 Discrete event simulation (Ross) discrete and continuous distributions computationally generating random variable following various.
LECTURE 25 SIMULATION AND MODELING Md. Tanvir Al Amin, Lecturer, Dept. of CSE, BUET CSE 411.
Simulation is the process of studying the behavior of a real system by using a model that replicates the behavior of the system under different scenarios.
Chap. 5 Building Valid, Credible, and Appropriately Detailed Simulation Models.
Lecture 4: Statistics Review II Date: 9/5/02  Hypothesis tests: power  Estimation: likelihood, moment estimation, least square  Statistical properties.
Chapter 10 Verification and Validation of Simulation Models
1 OUTPUT ANALYSIS FOR SIMULATIONS. 2 Introduction Analysis of One System Terminating vs. Steady-State Simulations Analysis of Terminating Simulations.
Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we.
Computer simulation Sep. 9, QUIZ 2 Determine whether the following experiments have discrete or continuous out comes A fair die is tossed and the.
Review of Probability. Important Topics 1 Random Variables and Probability Distributions 2 Expected Values, Mean, and Variance 3 Two Random Variables.
Sampling and estimation Petter Mostad
Statistics What is the probability that 7 heads will be observed in 10 tosses of a fair coin? This is a ________ problem. Have probabilities on a fundamental.
1 1 Slide Simulation Professor Ahmadi. 2 2 Slide Simulation Chapter Outline n Computer Simulation n Simulation Modeling n Random Variables and Pseudo-Random.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
CSE 474 Simulation Modeling | MUSHFIQUR ROUF CSE474:
STA347 - week 91 Random Vectors and Matrices A random vector is a vector whose elements are random variables. The collective behavior of a p x 1 random.
Csci 418/618 Simulation Models Dr. Ken Nygard, IACC 262B
 Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,
Gil McVean, Department of Statistics Thursday February 12 th 2009 Monte Carlo simulation.
Simulation. Types of simulation Discrete-event simulation – Used for modeling of a system as it evolves over time by a representation in which the state.
Computacion Inteligente Least-Square Methods for System Identification.
Building Valid, Credible & Appropriately Detailed Simulation Models
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Selecting Input Probability Distributions. 2 Introduction Part of modeling—what input probability distributions to use as input to simulation for: –Interarrival.
Evaluating Hypotheses. Outline Empirically evaluating the accuracy of hypotheses is fundamental to machine learning – How well does this estimate accuracy.
Generating Random Variates
Variance reduction techniques Mat Simulation
Modeling and Simulation CS 313
Computer Simulation Henry C. Co Technology and Operations Management,
Modeling and Simulation CS 313
ADVANTAGES OF SIMULATION
Chapter 10 Verification and Validation of Simulation Models
Discrete event simulation discrete time systems
Discrete Event Simulation - 7
MECH 3550 : Simulation & Visualization
Generating Random Variates
Presentation transcript:

 1  Outline  stages and topics in simulation  generation of random variates

 2  Stages of Simulation Model Experimentation and OptimizationImplementation of Simulation Result Problem Formulation Data Collection and Analysis Model Development Model Verification and Validation # of servers in a counter

 3  Topics in Simulation  knowledge in distributions and statistics  random variate generation  input analysis  output analysis  verification and validation  optimization  variance reduction

 4  Model Formulation model conceptual model analytical or computer model

 5  Problem Formulation  conceptual and analytical models: identify & define variables X, objective functions f, & constraints  through observing the system  never forcing for a standard model This is an M/M/1 queue This is a GI/G/1 queue   … … … 

 6  Data Collection and Analysis – Actual Tasks  How to conduct data collection?  How much time, effort, and money to deploy to get data?  What kind of sampling techniques should be used?  How to ensure that the objects under observation behave normally?  How to deal with outliners in the data?  Is the set of data enough (representative)?  What distribution do the collected data values of X i appear to follow?  What are the parameter values of the distribution of data of X i ?  How good is the fit of data to selected distributions and parameter values?  Do the random quantities X i and X j appear to be independent?  Do the data values of a variable X i appear to follow some pattern?

 7  Input Analysis  statistical tests to analyze data collected and to build model  standard distributions and statistical tests  estimation of parameters  enough data collected?  independent random variables?  any pattern of data?  distribution of random variables?  factors of an entity being independent from each other?  data from sources of the same statistical property?

 8  Random Variate Generation  the generation of samples from a given distribution  different methods, eventually tracing back to the generation of random variates from uniform(0, 1)  various tests  correct distribution?  best parameter values?  independent of random variables?  ….

 9  Output Analysis  to draw meaningful inferences by statistical methods  What is a good point estimate?  What is an interval estimate?  How large is the variance of the point estimate?  How many simulation runs is needed to get a pre- specified confidence interval?  Does the variance estimating method correct? ……

 10  Output Analysis – Terminating System  output analysis: statistical tests for the results  n replications   =  1  n   = (  1, ,  n ), where  i is outcome of the ith replication  sampled values: X 1 (  1 ), …, X n (  n )  estimate by  estimate  by= g(X 1 (  1 ), …, X n (  n ))

 11   unbiased estimator of  ?  variance of estimator  efficient estimator of  ?  confidence on the range estimator  # of simulation runs (replications) required? Output Analysis – Terminating System  statistical tests associated with

 12  Output Analysis – Non-Terminating System  similar questions in the terminating system  possibly with dependent random variables

 13  Validation and Verification conceptual model system analytical or computer model solution validation: are we solving the right model, i.e., can our model really solve the problem? verification: are we solving the model right, i.e, have we made any mistake in these tasks? model

 14  Verification and Validation  Verification: Is the simulation model right?  Does the simulation match with the conceptual model?  debugging simulation programs  Validation: Is it a right model to simulate?  Is the simulation model  or even the conceptual model  a meaningful and accurate representation of the real system?  checking the consistency of the model with reality and its value as a model to simulate

 15  Model Experimentation and Optimization  X: characterized by a parameter , denoted as X(  )   : can be a vector  examples:  carousel system:  = given order or item picking policy  8-hour workshop:  = (  1, ,  k ) being the production rates of k workers  GI/G/1 service station:  = (arrival rate of customers, service rate of the server)  look for the best 

 16  Model Experimentation and Optimization  the determination of  opt  questions to answer  What are the best values for the parameters?  How to search for such best values?  What is the most convenient way to get such values?

 17  Variance Reduction Methods  How to get an unbiased estimator with smaller variances?  different g’s to estimate   some g’s has less variance than others  e.g., one versus two replications  speeding up simulation by choosing specific g’s  estimate by  estimate  by= g(X 1 (  1 ), …, X n (  n ))

 18  The Generation of Random Variates  generators met before  Excel rand(), Random Number Generator  Assignments: die and random movement, exponential, discrete distribution, random location, Binomial distributiondie and random movement exponentialdiscrete distributionrandom locationBinomial distribution

 19  Methods to Generate Random Variates  inverse transform  convolution  composition  acceptance / rejection

 20  Generation of Random Variates  random variable: a mapping from the sample space to the set of real number  random variate: an outcome (i.e., sample point) of a random variable  key: uniform (0, 1) random variates {u n }  getting random variates from any distributions, including those from multi-variate distributions of any arbitrary joint distributions

 21  Inverse Transform  to simulate the flips of a fair coin  head if 0 < u < 0.5, tail if 0.5 < u < 1  to simulate X = 1 w.p. 0.5, X = 0 w.p. 0.5  x = 1 if 0 < u < 0.5, x = 0 if 0.5 < u < 1  general form: looking for a function h such that h(U) (or h(U 1, …, U k )) ~ X  x = h(u) (or x = h(u 1, …, u k ))

 22  Inverse Transform  what is function h for the case:  to simulate X = 1 w.p. 0.5, X = 0 w.p. 0.5  x = 0 if 0 < u < 0.5, x = 1 if 0.5 < u < 1  the form of function h:  h(u) = 0 if 0 < u < 0.5  h(u) = 1 if 0.5 < u < 1  h being the inverse function of F, the distribution function of X

 23  Distribution Function F and its Inverse Function 0 F(x)F(x) x h(u)h(u) u 1 1

 24  Inverse Transform  same idea of h = F -1 to any discrete random variables  same idea to any continuous random variables (as long as F -1 is known)  clever ways to check the inverse transform Algorithm for Exponential

 25  Convolution  X = b 1 Y b n Y n  generate variates of Y 1 to Y n  weighted sum Y variates as the expression Example for Binomial Example for Triangular Example for Erlang (k,  )

 26  Composition equivalent form in distribution F(x) = p 1 F 1 (x ) p 1 F k (x ) use a zero-one uniform variate to determine the “type” and then generate the corresponding Y variate

 27  Acceptance / Rejection  generate a variate from the uniform distribution on a disc of unit radius  1 o generate a variate of (X, Y) such that X, Y X, Y ~ i.i.d. uniform [-1, 1]  2 o accept (x, y) to be the desirable variate if x 2 + y 2  1; else go to 1 o  result: uniform in {(x, y)| x 2 + y 2  1}

 28  Acceptance / Rejection – Discrete Distribution  X ~ {p i }; Y ~ {q i } such that p i /q i  c for all i  1 o Generate y from Y ~ {q i }.  2 o Generate u from U.  3 o If cq y u < p y, set x = y and stop; else go to 1 o. similar procedure applicable to continuous distribution with {p i }, {q i } replaced by the corresponding density functions primarily for continuous distributions whose F -1 is hard to find