Biostatistics 615 / 815 Problem Set 7 Due November 17, 2004 Random Number Generation1.An old text book on computer simulation recommends the following sequence of pseudo-random numbers: Ij+1= a Ijmodm, with a = 20,403 and m = 215. What is the period of this random number generator, that is, how many numbers can be generated before the sequence repeats itself? 2.Consider the following formula for generating pseudo-random sequences: Ij+1= (a Ij+c) modm When c = 1 and m = 32, examine the resulting sequences when: a)a = 13 b)a = 17 c)a = 19 d)a = 10 Which of the three sequences appear random? Do all sequences have a full period (32 is the maximum period in this case)? Integration3.Implement code to calculate the integral of the function f(x) = (1 + x)/(1 + x2) in the interval (2, 4) using each of the following numerical methods:
This preview has intentionally blurred sections.
Sign up to view the full version.