Question

In: Statistics and Probability

Consider a linear congruential random number generator with parameters a = 3, m = 16, and...

  1. 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?

Solutions

Expert Solution

SOLUTION:

From given data,

Consider a linear congruential random number generator with parameters a = 3,m = 16, and c=0.

a = 3,

m = 16,

c=0.

The recurrence relation to define generator is

Xn+1 = (a Xn+c) mod m

here X is sequence of random numbers

and X0 is referred to seed which is also called start value.

Select the seed X0 = 3, and generate 3 random variables using this generator.

No we have X0 = 3, we need to generate three random numbers with it

as we are starting with n = 0 (X0)

X1 = (a*X0 + c ) mod m

X1 = (3*3 + 0) mod 16

X1 = 9 mod 16

X1 = 9

Now let us try X2

X2 = (a * X1 + 0) mod 16

X2 = (3*9 + 0) mod 16

X2 = 27 mod 16

X2 = 11

Now X3

X3 = (a * X2 + 0) mod 16

X3 = (3* 11 + 0) mod 16

X3 = 33 mod 16

X3 = 1

What is the period of this generator

Period of Generator :

When c = 0 then generator is call multiplicative congruential generator and period of MCG is at most m


Related Solutions

3. Develop a LCG random number generator in a spreadsheet for the following constants: Z0 =...
3. Develop a LCG random number generator in a spreadsheet for the following constants: Z0 = 17, a = 31, c= 5, and m = 73. Generate 72 random numbers. Change the value of a to 23 and describe what happens.
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)                                                                                
A random number generator picks a number from 7 to 68 in a uniform manner. Round...
A random number generator picks a number from 7 to 68 in a uniform manner. Round answers to 4 decimal places when possible. The mean of this distribution is The standard deviation is The probability that the number will be exactly 42 is P(x = 42) = The probability that the number will be between 16 and 28 is P(16 < x < 28) = The probability that the number will be larger than 48 is P(x > 48) =...
1.) Using excel. A random number generator picks a number from one to nine in a...
1.) Using excel. A random number generator picks a number from one to nine in a uniform manner. X ~ _________ Graph the probability distribution. f(x) = _________ μ = _________ σ = _________ P(3.5 < x < 7.25) = _________ P(x > 5.67) P(x > 5|x > 3) = _________ Find the 90th percentile. 2) using excel A subway train on the Red Line arrives every eight minutes during rush hour. We are interested in the length of time...
A random number generator picks a number from 18 to 64 in a uniform manner. Round...
A random number generator picks a number from 18 to 64 in a uniform manner. Round answers to 4 decimal places when possible. The mean of the distribution is: The standard deviation is: The probability that the number will be exactly 20 is P(x = 20) = The probability that the number will be between 24 and 26 is P(24 < x < 26) = The probability that the number will be larger than 32 is P(x > 32) =...
A computer random number generator was used to generate 950 random digits from 0 to 9....
A computer random number generator was used to generate 950 random digits from 0 to 9. The observed frequencies of the digits are given in the table below. 0 1 2 3 4 5 6 7 8 9 88 82 97 84 87 87 95 93 90 147 Using a 0.05significance level, test the claim that all of the digits are equally likely. (a) Find the rejection region. Reject H0 if χ2> (b) Find the test statistic. (Round your final...
A random number generator returns random floats between 0 and 1, according to a uniform distribution....
A random number generator returns random floats between 0 and 1, according to a uniform distribution. say you let the random number generator draw 100 numbers, the sample mean will be... A.impossible to determine, because the data aren't drawn from a normal distribution. B.normally distributed, with mean 0.5 and standard deviation 0.2887. C.uniformely distributed, between 0 and 1. D.normally distributed, with mean 0.5 and standard deviation 0.02887.
Suppose you have access to a random number generator Rng() that generates uniform random numbers in...
Suppose you have access to a random number generator Rng() that generates uniform random numbers in {0, 1, . . . , n − 1}. Design a function uses Rng() generate a uniform random number in {0, 1, . . . , m − 1}, where m ≤ n
Questions 36-39: Six numbers are selected at random from a random number generator and entered into...
Questions 36-39: Six numbers are selected at random from a random number generator and entered into each of four rows. The summary statistics are presented in the chart below. Mean SD   Row 1 5.8  0.78 Row 2 3.6  0.23 Row 3 5.5  0.32 Row 4 4.0  0.59 Assume the populations are normal with equal variances. It is of interest to test the following: Ho: μ1 = μ2 = μ3 = μ4 36. What are the degrees of freedom for the...
16-3. Consider the titration of 25.0 mL of 0.010 0 M Sn21 by 0.050 0 M...
16-3. Consider the titration of 25.0 mL of 0.010 0 M Sn21 by 0.050 0 M Tl31 in 1 M HCl, using Pt and saturated calomel electrodes to find the end point. (a) Write a balanced titration reaction. (b) Write two different half-reactions for the indicator electrode. (c) Write two different Nernst equations for the cell voltage. (d) Calculate E at the following volumes of Tl31: 1.00, 2.50, 4.90, 5.00, 5.10, and 10.0 mL. Sketch the titration curve. How do...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT