HW 2 Chap 2-1-2

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

SIMULATION

HOMEWORK 2 CHAPTER 2
RANDOM NUMBERS AND RANDOM VARIABLES

1. Use the linear algorithm to generate a sequence of three two-digit random integers
and corresponding numbers. Let X0 = 27, a = 8, c = 47, and m = 100.

2. Use the multiplicative congruential algorithm to generate a sequence of four three-


digit random integers and corresponding random numbers. Let X 0 = 117, a =43,
and m = 1000.

3. The sequence of numbers 0.54, 0.73, 0.98, 0.11, and 0.68 has been generated.
Use the Kolmogorov-Smirnov test with α= 0.05 to learn whether the hypothesis that
the numbers are uniformly distributed on the interval [0, 1] can be rejected.

4. Use Chi-square test, with α = 0.05, to learn whether the hypothesis that the
numbers are uniformly distributed on the interval can be rejected.

0.43 0.09 0.52 0.98 0.78 0.44 0.21 0.12 0.64 0.76
0.38 0.67 0.97 0.46 0.07 0.18 0.49 0.47 0.22 0.47
0.69 0.99 0.77 0.76 0.65 0.14 0.25 0.37 0.99 0.20
0.74 0.03 0.71 0.28 0.65 0.50 0.54 0.13 0.87 0.50
0.97 0.17 0.32 0.91 0.28 0.39 0.56 0.73 0.93 0.24
0.99 0.71 0.99 0.64 0.50 0.66 0.01 0.24 0.81 0.94
0.73 0.15 0.45 0.10 0.18 0.82 0.96 0.43 0.57 0.94
0.27 0.34 0.65 0.79 0.03 0.49 0.69 0.85 0.37 0.50
0.60 0.93 0.48 0.42 0.04 0.46 0.04 0.91 0.97 0.26
0.81 0.62 0.79 0.88 0.46 0.74 0.06 0.11 0.92 0.87

5. Test the following sequence of numbers 2º, 9ª, 16ª,... for independence, use
.

0.30 0.48 0.36 0.01 0.54 0.34 0.96 0.06 0.61 0.85
0.48 0.86 0.14 0.83 0.89 0.37 0.49 0.60 0.04 0.83
0.42 0.83 0.37 0.21 0.90 0.89 0.91 0.79 0.57 0.99
0.95 0.27 0.41 0.81 0.96 0.31 0.09 0.06 0.23 0.77
0.73 0.47 0.13 0.55 0.11 0.75 0.36 0.25 0.23 0.72
0.60 0.83 0.70 0.30 0.26 0.38 0.05 0.19 0.73 0.44

6. Develop a generator for a triangular distribution with range (1, 10) and mode
at x=4. Generate 10 values of the random variable.

7. Given the following cdf for a continuous variable with range from – 3 to 4,
develop a generator for the variable, generate 30 values, and plot a
histogram.

8. Given the cdf F(x) = x4/16 on 0<=x<=2, develop a generator for this
distribution. Generate 10 values of the random variable.
9. Data have been collected on service times at a drive-in bank window at the
Shady Lane National Bank. These data are summarized into intervals as
follows:

Interval (seconds) Frequency


15-30 10
30-45 20
45-60 25
60-90 35
90-120 30
120-180 20
180-300 10

Consider data as empirical continuous distribution and generate five values of


service time, using four-digit random numbers

10. Lead times have been found to be exponentially distributed with mean 3.7 days.
Generate five random lead times from this distribution.

C8 3, 5, 6, 11, 17 C7 4, 6, 7, 8,-

You might also like