Question: Write a code to test a uniform pseudorandom number generator. If you do not have a canned generator available, write a generator based on L'Ecuyer's

Write a code to test a uniform pseudorandom number generator. If you do not have a canned generator available, write a generator based on L'Ecuyer's recommended generator in Appendix I. Apply the following tests: average \(\langle xangle=1 / 2\), variance \(\left\langle x^{2}\rightangle-\langle xangle^{2}=1 / 12\), and the pair correlations test \(\left\langle x_{i+k} x_{i}\rightangle=1 / 4\) for \(k eq 0\). Generate a histogram of pairs of numbers on a two-dimensional unit square and test that the distribution is statistically uniform.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is a C code snippet for a pseudorandom number generator based on ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mechanics Questions!