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.
The Random class implements a random number generator, which produces sequences of numbers that appear to...
The Random class implements a random number generator, which produces sequences of numbers that appear to be random. To generate random integers, you construct an object of the Random class, and then apply the nextInt method. For example, the call generator.nextInt(6) gives you a random number between 0 and 5. Write a program DieSimulator that uses the Random class to simulate the cast of a die, printing a random number between 1 and 6 every time that the program is...
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) =...
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 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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT