CSC401 Simulation Techniques Exam 2 is scheduled to be given on Monday, November 22, 2010 This exam will cover Chapters 7 – 11 and Section 12.1 of the textbook, and the computer scheduling project. It will be designed as a 1.25 hour in-class exam. You will be allowed to take up to the full 100 minutes of the period. You will be allowed to bring two pages of notes to the in-class portion of the exam. Everything you should know for the exam This type of course builds off of the previous material. I expect you to be familiar with the concepts in Chapters 1 – 6. For example the terminology and concepts involved in Chapter 5 are always important. All the following should be familiar at this point pdf cdf discrete distribution Bernoulli, binomial, geometric, Poisson continuous distribution uniform, exponential, Erlang, normal, lognormal, Weibull, triangular empirical distributions expectation, mode, variance queueing models performance measures Chapter 7 Random-Number Generation 7.1 Properties of Random Numbers What is a random number? What is a random integer? 7.2 Generation of Pseudo-Random Numbers Certain problems or errors can occur when generating pseudo-random numbers Properties of methods or routines for computer-generated random numbers. 7.3 Techniques for Generating Random Numbers Linear Congruential Method Mixed Congruential Method Multiplicative Congruential Method Combined Linear Congruential Generators Random-Number Streams 7.4 Tests for Random Numbers Frequency Test Kolmogorov-Smirnov or chi-square to compare to uniform distribution Autocorrelation Test Tests the correlation between numbers and compares the sample correlation to the expected correlation. Chapter 7 Homework problems #3, 4, 6, 7, 8, 10, 12, 14, 16 Chapter 8 Random-Variate Generation A distribution has been completely specified, and ways are sought to generate samples from this distribution to be used as input to a simulation model. It is assumed that a source of uniform random numbers is available 8.1 Inverse-Transformation Technique The inverse-transform technique is useful when the cdf F(x) is of a form simple enough so that its inverse F-1 can be computed easily. step 2: set F(X) = R on the range of X step 3: solve F(x) = R for X in terms of R step 4: generate uniform random numbers and compute the desired random variates from X = F-1 (R) Exponential distribution is done in detail. Uniform distribution example Weibull distribution example Triangular distribution example Empirical Continuous Distributions – we had an problem using this Discrete Distributions – problem Geometric Distribution 8.2 Acceptance-Rejection Technique Need to generate random variates, X, uniformly distributed between 1/4 and 1. Generate the number R and accept if R ≥ 1/4, reject if R < 1/4. Poisson Distribution acceptance-rejection Nonstationary Poisson Process using acceptance-rejection called thinning. Gamma Distribution 8.3 Special Properties Variate generation based on features of a particular family of probability functions, rather than being general-purpose techniques. Direct Transformation for the Normal an Lognormal Distributions Using Polar coordinates – multivariable calc. Convolution Method Erlang Distribution Chapter 8 homework problems: 1, 2, 5, 9, 13, 15, 16. Chapter 9 Input Modeling Input models provide the driving force for a simulation model. In the simulation of a queueing system, typical input models are the distributions of time between arrivals and of service times. In real-world simulation applications, coming up with the appropriate distributions for the input data is a major task form the standpoint of time and resource requirements. 1. 2. 3. 4. Collect data from the real system of interest. Identify a probability distribution to represent the input process Choose parameters that determine a specific instance of the distribution family. Evaluate the chosen distribution and associated parameters for goodness of fit, Kolmogorov-Smirnov or chi-square 9.1 Data collection This is always the hard part – suggestions please! 9.2 Identifying the Distribution with Data Histograms and shape See page 341 for instructions for constructing a histogram. Selecting the Family of Distributions One aid to selecting distributions is to use the physical basis of the distributions as a guide, see pages 346 – 347 for descriptions Binomial, geometric, Poisson, normal, lognormal, exponential, gamma, beta, Eralng, Weibull, discrete or continuous uniform, triangular, empirical Quantile-Quantile Plots If the Q-Q plot comes out a straight line, it must be normal 9.3 Parameter Estimation Software packages are available to do a lot of this Preliminary Statistics: Sample Mean and Sample Variance Use the following as a guide: Table 9.3: Suggested Estimator for Distributions Often Used in Simulation Examples given of the various distributions. 9.4 Goodness-of-Fit Tests Chi-square test, H0 and H1 (figure this out) Applied to Poisson Assumption Test with Equal Probabilities Test for Exponential Distribution Kolmogorov-Smirnov Goodness-of-Fit Test Applied to test for Exponential Distribution, H0 and H1 p-values and Best Fits – should be read over but not important to test at this point 9.5 Fitting a Nonstationary Poisson Process -should be read over, but not important to the test at this point. 9.6 Selecting Input Models Without Data Engineering data, Expert opinion, Physical or conventional limitations, the nature of the process. 9.7 Multivariate and Time-Series Input Models Variables may be related, and if the variables appear in a simulation as inputs, the relationship should be investigated and taken into consideration. Quite often investigators will assume that the random variables are independent to avoid this. Covariance and correlation are measures of linear dependence between random variables. Multivariate Input Models Time-Series Input Models The Normal-to-Anything Transformation (NORTA) Chapter 9 homework problems: 6, 7, 8, 9, 10, 11, 20, and CPU Simulation Problem Chapter 10 Verification and Validation of Simulation Models Definitions of verification and validation 10.1 Model Building, verification, and validation See figure 10.1 for the loop 10.2 Verification of Simulation Models Suggestions given, how did you do in the assignment for the CPU simulation? Use of a trace 10.3 Calibration and Validation of Models Figure 10.3 Iterative process of calibrating a model Face Validity – seem reasonable Validation of Model Assumptions - collect data at different times validate the input data via Chapter 9 Validating Input-output Transformations Some version of the system under study must exit Watch out for changes in the operational model The Fifth National Bank of Jasper Input-Output Validation Using Historical Input Data This is the approach I like best Input-Output Validation using a Turing Test. What is a Turing Test?? Chapter 10 homework: problem 8 and the worksheet related to the CPU simulation. Chapter 11 Estimation of Absolute Performance What is a terminating simulation? Appropriate analysis for across replication data output data What is a non-terminating simulation? Appropriate output analysis for across replication output data Section 12.1 Comparison of Two System Designs Independent Sampling Common Random Numbers