In: Mechanical Engineering
Q 418. Using an LCG generator with parameters a: 21, m: 100, c: 13 and x0: 7 generate (if possible) a random variate from each of the following distributions. For each sub question, you may restart the LCG stream (i.e. feel free to reuse the same random number for each sub-question)
a. Normal (15, 5)
b. Gamma (5, 4)
c. Poisson (2)
d. Weibull (2, 2)
e.Triangular(1,2,5)
Table 1 : Randon number sequence for Linear Congruential Generator | ||||||
Start Seed X0 = 7 | ||||||
Parameters | Sequence of Random numbers | |||||
S.no. | a | Xn | C | m | ((a*Xn)+c) | Xn+1 = ((a*xn)+c)mod(m) |
1 | 21 | 7 | 13 | 100 | 160 | 60 |
2 | 21 | 60 | 13 | 100 | 1273 | 73 |
3 | 21 | 73 | 13 | 100 | 1546 | 46 |
4 | 21 | 46 | 13 | 100 | 979 | 79 |
5 | 21 | 79 | 13 | 100 | 1672 | 72 |
6 | 21 | 72 | 13 | 100 | 1525 | 25 |
7 | 21 | 25 | 13 | 100 | 538 | 38 |
8 | 21 | 38 | 13 | 100 | 811 | 11 |
9 | 21 | 11 | 13 | 100 | 244 | 44 |
10 | 21 | 44 | 13 | 100 | 937 | 37 |
11 | 21 | 37 | 13 | 100 | 790 | 90 |
12 | 21 | 90 | 13 | 100 | 1903 | 3 |
13 | 21 | 3 | 13 | 100 | 76 | 76 |
14 | 21 | 76 | 13 | 100 | 1609 | 9 |
15 | 21 | 9 | 13 | 100 | 202 | 2 |
16 | 21 | 2 | 13 | 100 | 55 | 55 |
17 | 21 | 55 | 13 | 100 | 1168 | 68 |
18 | 21 | 68 | 13 | 100 | 1441 | 41 |
19 | 21 | 41 | 13 | 100 | 874 | 74 |
20 | 21 | 74 | 13 | 100 | 1567 | 67 |
21 | 21 | 67 | 13 | 100 | 1420 | 20 |
22 | 21 | 20 | 13 | 100 | 433 | 33 |
23 | 21 | 33 | 13 | 100 | 706 | 6 |
24 | 21 | 6 | 13 | 100 | 139 | 39 |
25 | 21 | 39 | 13 | 100 | 832 | 32 |
26 | 21 | 32 | 13 | 100 | 685 | 85 |
27 | 21 | 85 | 13 | 100 | 1798 | 98 |
28 | 21 | 98 | 13 | 100 | 2071 | 71 |
29 | 21 | 71 | 13 | 100 | 1504 | 4 |
30 | 21 | 4 | 13 | 100 | 97 | 97 |
Table 2. Random number variates for given distributions | ||||||||
a. Normal (15,5) | b. Gamma(5,4) | c. poisson(2) | d. Weibull(2,2) | |||||
Xn=x | a | b | y=ax+b | NORMAL(15,5) | Gamma(5,4) | Poisson(2) | Weibull(2,2) | |
60 | 15 | 5 | 905 | 1 | 0.999143359 | 1 | 1 | |
73 | 15 | 5 | 1100 | 1 | 0.999930957 | 1 | 1 | |
46 | 15 | 5 | 695 | 1 | 0.989253422 | 1 | 1 | |
79 | 15 | 5 | 1190 | 1 | 0.999979253 | 1 | 1 | |
72 | 15 | 5 | 1085 | 1 | 0.999915824 | 1 | 1 | |
25 | 15 | 5 | 380 | 0.977249868 | 0.747014677 | 1 | 1 | |
38 | 15 | 5 | 575 | 0.999997888 | 0.959737318 | 1 | 1 | |
11 | 15 | 5 | 170 | 0.211855399 | 0.144621488 | 0.999998635 | 1 | |
44 | 15 | 5 | 665 | 0.999999997 | 0.984895399 | 1 | 1 | |
37 | 15 | 5 | 560 | 0.999994587 | 0.952907277 | 1 | 1 | |
90 | 15 | 5 | 1355 | 1 | 0.999997825 | 1 | 1 | |
3 | 15 | 5 | 50 | 0.008197536 | 0.001064678 | 0.85712346 | 0.894600775 | |
76 | 15 | 5 | 1145 | 1 | 0.999962048 | 1 | 1 | |
9 | 15 | 5 | 140 | 0.11506967 | 0.078014105 | 0.999953502 | 0.999999998 | |
2 | 15 | 5 | 35 | 0.004661188 | 0.000172116 | 0.676676416 | 0.632120559 | |
55 | 15 | 5 | 830 | 1 | 0.997830523 | 1 | 1 | |
68 | 15 | 5 | 1025 | 1 | 0.999815302 | 1 | 1 | |
41 | 15 | 5 | 620 | 0.9999999 | 0.975137134 | 1 | 1 | |
74 | 15 | 5 | 1115 | 1 | 0.999943407 | 1 | 1 | |
67 | 15 | 5 | 1010 | 1 | 0.999775617 | 1 | 1 | |
20 | 15 | 5 | 305 | 0.841344746 | 0.559506715 | 1 | 1 | |
33 | 15 | 5 | 500 | 0.999840891 | 0.913813889 | 1 | 1 | |
6 | 15 | 5 | 95 | 0.035930319 | 0.018575936 | 0.995466194 | 0.99987659 | |
39 | 15 | 5 | 590 | 0.999999207 | 0.965647279 | 1 | 1 | |
32 | 15 | 5 | 485 | 0.999663071 | 0.900367599 | 1 | 1 | |
85 | 15 | 5 | 1280 | 1 | 0.999993892 | 1 | 1 | |
98 | 15 | 5 | 1475 | 1 | 0.999999593 | 1 | 1 | |
71 | 15 | 5 | 1070 | 1 | 0.999897443 | 1 | 1 | |
4 | 15 | 5 | 65 | 0.013903448 | 0.003659847 | 0.947346983 | 0.981684361 | |
97 | 15 | 5 | 1460 | 1 | 0.999999497 | 1 | 1 |