Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use python 3 random number generator! Plots in part a: b) Tests of Uniformity For a sequence of pseudo-random numbers by 1 of 2 the
Use python 3 random number generator!
Plots in part a:
b) Tests of Uniformity For a sequence of pseudo-random numbers by 1 of 2 the k order moments are defined which have an expected limit 1/+k) for a random number sequence with a uniform distribution. The deviation from this limit is expected to scale asO(/N). Consider k -1,3,7. Calculatefor multiple random sequences for a range of N values. (That is, for each value of N, create M random sequences and perform the calculation-in this way you will be able to obtain a sample distribution for the r). Make your N values at least 10x bigger than the previous value so that it can be plotted on a log scale for N For each k, plot the mean values for that you obtained versus log (N), along with a line for the expected limit 1/(1+k). Are your results reasonable? For each k, plot the average of the deviation-1/(1+ vesus log (N).Does this scale as OI/NN c) Tests of near neighbour correlations For your pseudo random sequences for part a), also determine the values of ci)- i+j forjz 1.2.3. Do your average values of CU) approach the theoretical limit 01%? Does the deviation from this limit scale as o//N)2 Produce simlar plots as for part a) and discuss. 1.0 0.4 0.2 0.0 0.0 0.2 0.4 0.6 0.8 1.0 b) Tests of Uniformity For a sequence of pseudo-random numbers by 1 of 2 the k order moments are defined which have an expected limit 1/+k) for a random number sequence with a uniform distribution. The deviation from this limit is expected to scale asO(/N). Consider k -1,3,7. Calculatefor multiple random sequences for a range of N values. (That is, for each value of N, create M random sequences and perform the calculation-in this way you will be able to obtain a sample distribution for the r). Make your N values at least 10x bigger than the previous value so that it can be plotted on a log scale for N For each k, plot the mean values for that you obtained versus log (N), along with a line for the expected limit 1/(1+k). Are your results reasonable? For each k, plot the average of the deviation-1/(1+ vesus log (N).Does this scale as OI/NN c) Tests of near neighbour correlations For your pseudo random sequences for part a), also determine the values of ci)- i+j forjz 1.2.3. Do your average values of CU) approach the theoretical limit 01%? Does the deviation from this limit scale as o//N)2 Produce simlar plots as for part a) and discuss. 1.0 0.4 0.2 0.0 0.0 0.2 0.4 0.6 0.8 1.0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started