Question

In: Mechanical Engineering

Q 418. Using an LCG generator with parameters a: 21, m: 100, c: 13 and x0:...

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)                                                                                

Solutions

Expert Solution

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

Related Solutions

Consider a linear congruential random number generator with parameters a = 3, m = 16, and...
Consider a linear congruential random number generator with parameters a = 3, m = 16, and c=0. Select the seed X0 = 3, and generate 3 random variables using this generator. What is the period of this generator?
You will be using the equations… q(metal) = -q(water) and q = m x C x...
You will be using the equations… q(metal) = -q(water) and q = m x C x delta T Two trials have been done. The following procedure is used: The initial temperature of ~200 ml of room temperature water is measured, and ~15 grams of an unknown metal is heated in boiling water from which the initial temperature of the metal is measured. At this point the heated metal is carefully added to the room temperature water, and the temperature of...
ball is kicked with an initial velocity of 21 m/s in the horizontal direction and 13...
ball is kicked with an initial velocity of 21 m/s in the horizontal direction and 13 m/s in the vertical direction. (Assume the ball is kicked from the ground.) (a) At what speed (in m/s) does the ball hit the ground?   m/s (b) For how long (in s) does the ball remain in the air?   s (c) What maximum height (in m) is attained by the ball? m
q = a(b+c(de+f)), t = !(q+a), m = aq, where the inputs are a, b, c,...
q = a(b+c(de+f)), t = !(q+a), m = aq, where the inputs are a, b, c, d, e, f and q; and outputs are t and m. Please provide the truth table. Please write the Sum of Products for the output t. Implement the Sum of Products of t with AND2, OR2 and NOT gates. Convert the previous part by using ONLY NAND2 gates. Provide MIPS code for the last part.
Q5. A monopolist has the cost function C(Q) = m*Q +k*Q2 where m and k are...
Q5. A monopolist has the cost function C(Q) = m*Q +k*Q2 where m and k are parameters. It faces two types of consumers, A and B, with the following demand curves for its product: PA =60–3*QA PB =80–2*QB For (a)—(c) below, assume Assume m=30 and k=0. (a) [4] What price will the monopolist charge under uniform pricing? (b) [4] What prices will the monopolist charge if it can price discriminate? (c) [4] How much higher is the monopolist’s profit in...
At 100°C, The molality of solute is 2.13 m. If Kb is 0.52 K/m, the boiling point of solution will be (a) 102°C (b) 103°C (c) 101 °C (d) 100°C
At 100°C, The molality of solute is 2.13 m. If Kb is 0.52 K/m, the boiling point of solution will be ________ (a) 102°C (b) 103°C (c) 101°C (d) 100°C
Steam at 100°C is blown into an airstream at 21°C dry bulb, 50% saturation (Relative humidity),...
Steam at 100°C is blown into an airstream at 21°C dry bulb, 50% saturation (Relative humidity), at the rate of 1 kg steam/150 kg dry air. What is the final condition and show the process on the psychrometric chart? (Ans. Final moisture content (W2 = 0.0148 kgv/kg ; Final dry bulb temperature Tdb2=22.02°C ).
Assume p = 13, q = 7, e = 11 and message m = 46. 1)...
Assume p = 13, q = 7, e = 11 and message m = 46. 1) Can given e be suitable for public key? Give reason why. 2) Find d = e-1 if e is suitable. 3) Perform encryption on the message m using RSA algorithm. 4)Perform decryption on the ciphertext c = 56 using the RSA algorithm. 5) is c = 56, the ciphertext for the message m = 46?
($4.6 Variation of Parameters): Solve the equations (a)–(c) using method of variation of parameters. (a) y''-6y+9y=8xe^3x...
($4.6 Variation of Parameters): Solve the equations (a)–(c) using method of variation of parameters. (a) y''-6y+9y=8xe^3x (b) y''-2y'+2y=e^x (secx) (c) y''-2y'+y= (e^x)/x
BY Using MATLAB software: Exercise 3: Calculation of the parameters of a dipole. % M-File: ML0804...
BY Using MATLAB software: Exercise 3: Calculation of the parameters of a dipole. % M-File: ML0804 % % Perform numerical integration to find % beam solid angle, directivity, and the % maximum power function for a given length % dipole. % % Variables % L dipole length (in wavelengths) % bL2 phase constant * length/2 % N number of theta points % th,thr angle theta in degrees,radians % dth differential theta % num,den temporary variables % F un-normalized power function...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT