Question

1) Consider a linear congruential random number generator with parameters a = 35, c = 20...

1) Consider a linear congruential random number generator with parameters a = 35, c = 20 and m = 100.

a- Generate 5 random numbers by using this method. Use 84.

b- By using inverse transform method, generate 2 random variate for an exponential distribution with parameter λ = 0.5. Use the first two random numbers you generated in part a.

Homework Answers

Answer #1

1) generating random numbers using linear congreuential number generator

a= 35

c= 20

m=100

X0= 84, to generate 5 random numbers

Xi+!= (a Xi+c)* mod m

Ri= Xi/m

X1= ( 35 x 84 + 20) mod 100= 60, R1= X1/m= 60/100= 0.6

X2= (35 x 60 + 20) mod 100= 20,, R2=X2/m= 20/100= 0.2

X3= ( 35x20+20) mod 100= 20, R3=X2/m= 20/100= 0.2

X4= (35x20+20) mod 100= 20, R4=X2/m= 20/100= 0.2

X5= (35x20+20) mod100= 20, R5=X2/m= 20/100= 0.2

5 random numbers are = 0.6, 0.2,0.2,0.2,0.2

b) inverse sampling method

to find random variates first we need inverse cdf for it

cdf of exponential = 1-e-px, p= lambda

let u = 1-e-px, , u-1= -e-px, 1-u= e-px,, -px= log(1-u), x=- log(1-u)/p

so our inv-cdf = - log(1-u)/p

using two random numbers from above we have

Xi= - log(1-u)/p

X1= -log(1-0.6)/0.5= 1.8

X2=-log(1-0.2)/0.5= 0.4

two random variates are 1.8, 0.4

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
USING MATLAB: 1. Assume Y is an exponential random variable with rate parameter λ=2. (1) Generate...
USING MATLAB: 1. Assume Y is an exponential random variable with rate parameter λ=2. (1) Generate 1000 samples from this exponential distribution using inverse transform method (2) Compare the histogram of your samples with the true density of Y.
Using MATLAB, not R codes, I repeat, please, not in R, just MATLAB codes, write the...
Using MATLAB, not R codes, I repeat, please, not in R, just MATLAB codes, write the complete code for: 1. Assume Y is an exponential random variable with rate parameter λ=2. (1) Generate 1000 samples from this exponential distribution using inverse transform method (2) Compare the histogram of your samples with the true density of Y.
Random number generator 1: Search for algorithms generating pseudo-random numbers. Select one of them for generating...
Random number generator 1: Search for algorithms generating pseudo-random numbers. Select one of them for generating a pseudo-random sequence. Original sample can be generated in any form: binary, decimal, etc. But submitted sample must be in the form of uniform random numbers on [0,1][0,1]. The sample should not be generated by any function, like runif(), sample(), etc. Instead it must be some algorithm that you code yourselves. For example, mid-square algorithm, Fibonacci-based algorithm, etc. Random number generator 2: Find some...
A random number generator is supposed to produce random numbers that are uniformly distributed on the...
A random number generator is supposed to produce random numbers that are uniformly distributed on the interval from 0 to 1. If this is true, the numbers generated come from a population with μμ = 0.5 and σσ = 0.2887. A command to generate 169 random numbers gives outcomes with mean x¯¯¯x¯ = 0.4366. Assume that the population σσ remains fixed. We want to test H0:μ=0.5 Ha:μ≠0.5 (a) Calculate the value of the Z test statistic. (b) Use Table C:...
Generate at least 20 random numbers within the range of 1 to 900 using linear congruent...
Generate at least 20 random numbers within the range of 1 to 900 using linear congruent method. Xi = (aXo + C) mod m using a = 87, c = 29 and Xo = 19
5. Consider the random variable X with the following distribution function for a > 0, β...
5. Consider the random variable X with the following distribution function for a > 0, β > 0: FX (z) = 0 for z ≤ 0 ​= 1 – exp [–(z/a)β] for z > 0 (where exp y = ey) (a) Determine the inverse function of FX (z), where 0 < z < 1. (b) Let a = β = 2 for the random variable X, and define the numbers u1 = .33 and u2 = .9. Use the inverse...
1. A random number generator is used to select a number from 1 to 500 ?(inclusively)....
1. A random number generator is used to select a number from 1 to 500 ?(inclusively). What is the probability of selecting the number 595 ? What is the probability? 2.Identify the sample space of the probability experiment and determine the number of outcomes in the sample space. -Randomly choosing an even number between 10 and 20, inclusive The sample space is? (Use a comma to separate answers) There are _____ outcomes in the sample space 3. Determine the number...
Consider the simple linear regression model y=10+30x+e where the random error term is normally and independently...
Consider the simple linear regression model y=10+30x+e where the random error term is normally and independently distributed with mean zero and standard deviation 1. Do NOT use software. Generate a sample of eight observations, one each at the levels x= 10, 12, 14, 16, 18, 20, 22, and 24. Do NOT use software! (a) Fit the linear regression model by least squares and find the estimates of the slope and intercept. (b) Find the estimate of ?^2 . (c) Find...
Q1d08A.) Edward Shack is conducting a simulation of a serial production line for Lowliner Foods in...
Q1d08A.) Edward Shack is conducting a simulation of a serial production line for Lowliner Foods in St John’s, NL. The line processes fresh fish into frozen fish fingers. The line operates on three shift basis, 7.5 hours per shift, with a half-hour between shifts. Machines are idled between the shifts. a.) Mr. Shack is very interested in determining the effect of unscheduled downtime of the flash freezing unit on shift output. Eddie has implemented a data collection procedure that will...
(1) Using a generator for a binomial distribution, we will test the results of Example 3.8.2....
(1) Using a generator for a binomial distribution, we will test the results of Example 3.8.2. Using software generate 500 random deviates for X from a B(10, 0.3) distribution and 500 random deviates for Y from a B(5, 0.3) distribution. Add corresponding random deviates from each distribution to form an empirical W=X+Y. Then use the theoretical result of Example 3.8.2 and directly generate another 500 random deviates for W from a B(15, 0.3). Order the result of the sum of...