EE/CPE 345 FINAL EXAM – December 2004
1.
Consider a linear congruential random number generator with parameters a = 3,
m = 16, and c=0.
(a)
Select the seed X0 = 3, and generate 3 random variables using this
generator.
(b)
What is the period of this generator?
Solution:
(a)
(
)
0,1,2,...
,
mod
1
=
+
=
+
i
m
c
aX
X
i
i
(
)
(
)
(
)
1
16
mod
0
11
*
3
11
16
mod
0
9
*
3
X
9
16
mod
0
3
*
3
3
2
1
=
+
=
=
+
=
=
+
=
X
X
(b)
P = m/4=4;
2.
We have implemented a random number generator that generates exponential
random variables with mean 2. We want to verify the correctness of this generator
by collecting samples from simulation and building a histogram which will be
compared with the exponential distribution, using a chisquare test.
(a)
Assuming that we select for the histogram a range [0, M], what should be
the value of M, such that we will have no more than 10% generated
samples that will fall outside the range?
(b)
Can we use this generator to generate Poisson arrivals for a queue
simulation? Explain. What will be the arrival rate in this case?
(c)
If we are going to estimate this arrival rate (or alternatively the mean of
the exponential r.v.) using the samples obtained from the simulation, how
many samples we would need in order to have a 2 digit accuracy (assume
the standard deviation S =1 )?
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 ARAVENA
 ChiSquare Test, Normal Distribution, Poisson Distribution, Exponential distribution, administrator

Click to edit the document details