Summary Mid Contents - 2023
Summary Mid Contents - 2023
Summary Mid Contents - 2023
Midterm Review
Lecture 1: Introduction to Simulation
Lecture 2: Simulation Examples
Lecture 3: General Principles of Simulation Modelling
Lecture 4: Review Statistics
Lecture 5: Random Numbers
Lecture 6: Random Variate
Review questions:
1. What is a Simulation?
2. When to and NOT to use Simulation?
3. What are advantages and disadvantages of Simulation?
4. What are some areas for applications of Simulation?
5. What are systems, system environment, and components of a system? Example?
6. Distinguish discrete and continuous systems! Example?
7. What are models and some model types of a system?
8. What are some methods to study systems?
9. What are steps in a simulation study?
What are some methods to study systems?
System
verified ? Validation ?
Simulation of queueing system
Single-channel queue
2 sever queuing system ?
dong cuoi
Simulation of queueing system
• Single-channel queue
• Simulation of a two-server queuing system
x − 0
zt =
s n
z 2 − z ( z )
zt z 2 or zt − z 2 zt − z ( zt z )
Hypothesis testing
For population mean (small sample), s unknown, population is normally distributed
x − 0
tt =
s n
t n−1, 2
− t n−1, (t n−1, )
• Independence
Generation of pseudo-random numbers
• Linear Congruential Method
• Combined Linear Congruential Method
• Random-Number Streams
Test for RNs
Test for uniformity (Frequency test)
Kolmogorov-Smirnov test
Arrange R(i) from
smallest to largest
Step 1:
Oi is the observed
# in the ith class
– Approximately the chi-square distribution with n-1 degrees of freedom (where the
critical values are tabulated in Table A.6)
– For the uniform distribution, Ei, the expected number in each class is:
n: so luong interval
n co the tu chon nhung nen la <= N/5
⚫ Testing the autocorrelation between every l numbers (l is as known as. the lag), starting
with the ith number
– The autocorrelation ril between numbers: Ri, Ri+l, Ri+2l, Ri+(M+1)l
– M is the largest integer such that i + (M + 1 )l N
⚫ Hypothesis:
rˆ il
⚫ Test statistics is: Z0 =
ˆ rˆil
𝑋 = 𝐹 −1 (𝑅)
Continuous distribution: exponential distribution, uniform distribution, triangular
distribution, empirical continuous distribution, etc.
Discrete distribution: discrete uniform distribution, geometric distribution, etc.
Inverse-transform technique: 𝑿 = 𝑭−𝟏 (𝑹)
Ex ponential distribution
Pdf: Cdf:
Pdf: Cdf:
tu chon Ri de generate
Inverse-transform technique: 𝑿 = 𝑭−𝟏 (𝑹)
Weibull distribution
Pdf: Cdf:
Pdf: Cdf:
Step 1. Set n = 0, P = 1.
Step 2. Generate a random number Rn+1 and replace P by P · Rn+1.
Step 3. If P < 𝑒 −𝛼 , then accept N = n. Otherwise, reject the current n, increase n by one,
and return to step 2.
Acceptance-rejection technique
Poisson Distribution
Special properties
Some random-variate generation methods are based on features of a particular
family of probability distributions. For example:
• Direct transformation for normal and lognormal distributions
• Convolution method
• Beta distribution from gamma distribution