Page 1 of 1

Please simulate a random variable {Y,: i = 0, 1, 2,..., T} that starts at Y = 0. In particular, at every time step i + 1

Posted: Wed May 11, 2022 2:53 pm
by answerhappygod
Please Simulate A Random Variable Y I 0 1 2 T That Starts At Y 0 In Particular At Every Time Step I 1 1
Please Simulate A Random Variable Y I 0 1 2 T That Starts At Y 0 In Particular At Every Time Step I 1 1 (89.2 KiB) Viewed 22 times
Please simulate a random variable {Y,: i = 0, 1, 2,..., T} that starts at Y = 0. In particular, at every time step i + 1 when you obtain Y,-1, it is based on the following information: P(Y41 = j+1 Y = j) = P (Eq. 1) P(Y+1 = j-1 Y = j) = 1-p (Eq. 2) where j is an integer that je Z = {..., -2, -1, 0, 1, 2,...}. Note that you will need to first generate the random numbers based on the following LCG generator (Note: Xo = 1268): Xi+1 = (57015 + 755391831 * X:)mod 215, i = 0,1,2 ....T Random number: Ri+1 Xi+1 215 If the random number obtained at each time step i is less than p, then you will use Eq. 1 to specify Yri; otherwise, you will use Eq. 2. (a) Generate 6 realizations {91,92, ...,Y6} of the process for p = 0.51; (3 points) (b) Generate 6 realizations {Y1,Y2,...,Y6} of the process for p = 0.68; (3 points) (c) Plot the first 50 samples {71, 72, ..., 950} you obtained for p = 0.51 and p = 0.68, respectively, on one graph. Make sure your graph is clear enough to present the Y vs. time step. (4 points)