Beruflich Dokumente
Kultur Dokumente
- Plot p(x)
- Compute and plot F(x)
- Compute P(1.9999 X 4.0001)
- Compute E(X)
- Compute Var(X)
(See the next page)
3- a) Briefly describe the following concepts:
- Trace-driven simulation
- Empirical distributions
- Fitting (theoretical) distributions
b) Mention the advantages and disadvantages of each of the methods in (3-a).
5) For the following sequence of RNs, showing the steps, determine whether or not it
passes the Runs Test of Independence. Read rows first.
0.51241930545 0.73274767607 0.69352298968 0.05625394357
0.87392980821 0.41511904218 0.00827973058 0.85934662808
0.43506513399 0.23565273400 0.46119246644 0.19769494628
0.83463619173 0.62852266468 0.74303463833 0.36879405984
0.12350150713 0.18494672983 0.40616476953 0.28358993554
Model Answer
Modeling and Simulation Exam
1- a)
Solution:
Verification is to determine whether the conceptual simulation model has been correctly translated
into a computer program
Validation is the process of determining whether a simulation model is an accurate representation of
the real system
Credibility: A simulation model and its results have credibility if the manager and other key
project personnel accept them as correct
b)
Solution:
Yes, a model can be verified but not validated and vice-versa. For example, a model that
simulates the operations of an airport may be valid such that it really represents the airport system;
however, it contains an internal defect which means it is not verified (for example, it fails after
running 50 times, or uses a wrong random number generator function). On the other hand, another
model may be verified such that it doesnt contain any defects; however, it doesnt represent the
airport system very accurately (doesnt consider the flights schedule for example)
c)
Solution:
Any 5 techniques of the techniques below shall be correct and complete answer:
Technique 1: Divide the program into subprograms and then debug these subprograms individually.
Sometimes computer simulation programs may go to 10,000 statements
Start by a moderate simulation model then gradually increase complexity as needed.
Technique 2: Make a structured walk-through of the program by other persons as one may not able
to criticize himself.
Technique 3: Run the simulation model under several settings of the input parameters. Try it first
for known system performance.
Technique 4: One of the powerful techniques is to trace the state of the simulated system and
compare with a hand simulation.
Technique 5: Run the model under simplified assumptions for which its true characteristics are
known.
Example: replace the M/E2/1 queuing model by M/M/1 etc.
d)
Technique 1: Collect high quality information and data on the system. To develop such a model, it
should make use of the existing information including:
A. Conversation with Subject Mater Experts (SMEs)
Analyst not working in isolation.
The modeler should work with some people
Analyst will have to be resourceful
B. Observations of the system:
Data which used in building the model must be correct (contain no recording error)
Existing Theory:
The interval times of costumers are quite likely to be IID exponential random variable
Relevant Results from similar simulation model:
Use previous data that have been introduced from similar simulation studies.
Experience/Intuition:
Use the experience and intuition of the modelers to hypothesize how certain components of
a complex system operation.
b)
- Plot p(x)
p(x)
15/15
6/15
5/15
4/15
3/15
2/15
1/15
0 1 2 3 4 5 x
F(1) = 1/15
F(2) = 1/15 + 2/15 = 3/15
F(3) = 1/15 + 2/15 + 3/15 = 6/15
F(4) = 1/15 + 2/15 + 3/15 + 4/15 = 10/15
F(5) = 1/15 + 2/15 + 3/15 + 4/15 + 5/15 = 15/15
F(x)
15/15
10/15
6/15
5/15
4/15
3/15
2/15
1/15
0 1 2 3 4 5 x
- Compute E(X)
5
x
i 1
i p( xi ) for discrete X i
- Compute Var(X)
Var( X i ) i2 = E ( X i2 ) i2
E(X) = 1(1/15) + 4(2/15) + 9(3/15) + 16(4/15) + 25(5/15) = 225/15
E(X) = (55/15)
Hence, Var(X) = 225/15 (55/15) = 14/9 1.556
3- a)
Trace-driven simulation: The data on the input random variables of interest are
used directly in the simulation without making any change. In other words, we use
historical data as is without making any modifications or additions to it.
xy y / 2 1
2
1
2
2
x 2 1/ 2
3/ 2 x
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1
1
f y ( y ) y x dx
0
1 1
y dx x dx
0 0
yx 0 x 2 / 2 0
1
1
1
(y )
2
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2
f x ( x) . f y ( y ) (3 / 2 x) . ( y 1 / 2) 3 / 2 y 3 / 4 xy 1 / 2 x ( y x)
-
X and Y are dependent
-
1
F ( X ) 3 / 2 x dx
0
1
x2
3 / 2 x
1
0
2 0
3 / 2 1 / 2 1
2
F (Y ) y 1 / 2 dy
1
2 2
y2 y
2 1 2 1
(2 1) (1 / 2 1 / 2) 1
1
E ( X ) x f x ( x) dx
0
1
x (3 / 2 x) dx
0
1
(3 / 2 x x 2 ) dx
0
1
3 / 2 x 2 x3
2 3 0
3/ 2 1
5 / 12
2 3
2
E (Y ) y f y ( y ) dy
1
2
y ( y 1 / 2) dy
1
2
y 2 y / 2 dy
1
y 3 / 3 1/ 4 y 2 1
2
(8 / 3 1) (1 / 3 1 / 4)
4 / 3 1 / 4 19 / 12
1
E ( X 2 ) x 2 f x ( x) dx
0
1
x 2 (3 / 2 x) dx
0
1
(3 / 2 x 2 x3 ) dx
0
1
3 / 2 x3
x 4 / 4
3 0
3 / 6 1/ 4 1/ 4
2
E (Y 2 ) y 2 f y ( y ) dy
1
2
y 2 ( y 1 / 2) dy
1
2
( y 3 y 2 / 2) dy
1
y 4 / 4 y3 / 6 1
2
(4 4 / 3) (1 / 4 1 / 6)
31 / 12
Var( X ) E ( X 2 ) ( E ( X ))2
1/ 4 (5 / 12)2 11/ 144
Var(Y ) E (Y 2 ) ( E (Y ))2
31 / 12 (19 / 12) 2
11 / 144
1 2
E ( XY ) xy f ( x, y ) dy dx
0 1
1 2
xy ( y x) dy dx
0 1
1 2
( xy 2 x 2 y ) dy dx
0 1
1
xy 3 / 3 x 2 y 2 / 2 1 dx
2
0
1
7 x / 3 3x 2 / 2 dx
0
1
7 x 2 / 6 x3 / 2 0
7 / 6 1/ 2 2 / 3
Cov ( X , Y ) E ( XY ) E ( X ) . E (Y )
2 / 3 5 / 12 * 19 / 12
1 / 144
Cov ( X , Y )
Cor ( X , Y )
Var( X ) .Var(Y )
1 / 144
11 / 144 * 11 / 144
1 / 11
5)
1. N = number of RNs = 20
2. let a to be the number of runs. Runs are:
+--+--+--+-+-+--++-
and hence, a = 14
2N 1
a
3. Calculate 3
16 N 29
a2
90
39
a 13
3
291
a2 3.233
90
a a
Z0 ~ N 0,1
4. Calculate a
14 13 1
Z0 0.5562
3.233 1.798
5. If -z0.05/2 <= Z0 <= z0.05/2; where is the significance level, we will accept H0 and
our sequence passes the independence test. Otherwise, we reject it
Z0.025 = 1.96 , - Z0.025 = - 1.96 , and Z0 = 0.556 . Z0 lies between Z0.025 and - Z0.025 and
hence, H0 is accepted and the sequence of RNs passes the test of independence