LAB-05
Mahfoozur Rahman Khan
Computational time for Box Muller Method=0.028478 seconds Computational time for Marsaglia and Bray method =0.028478 seconds
Proportion of Values rejected by Marsaglia and Bray method = 0.2763 Value of 1-pi/4=0.2146
Using Box-Muller Method to generate N(0,1) random variables: 100 iterations: mean = -0.18652 1000 iterations: mean =0.023803
variance=0.97126 variance =1.0056
Using Marsaglia and Bray method to generate N(0,1) random variables: 100 iterations: mean = -0.0060389 10000 iterations: mean =0.007681
variance=0.92781 variance =0.97287
Using Box-Muller Method to generate N(0,5) random variables: 100 iterations: mean = -0.41706 10000 iterations: mean =0.053226
variance=4.8563 variance =5.0278
Using Marsaglia and Bray method to generate N(0,5) random variables: 100 iterations: mean = -0.013503 10000 iterations: mean =-0.017169
variance=4.6391 variance =4.8643
Using Box-Muller Method to generate N(0,5) random variables: 100 iterations: mean = 4.5829 10000 iterations: mean =5.0532
variance=4.8563 variance =5.0278
Using Marsaglia and Bray method to generate N(0,5) random variables: 100 iterations: mean = 4.9865 10000 iterations: mean =4.9828
variance=4.6391 variance =4.8643