Question: This is to be written with Fortran... 2. (a) Program a random tossing of a coin with equal probability of head and tail. Get the
This is to be written with Fortran...

2. (a) Program a random tossing of a coin with equal probability of head and tail. Get the ratio N/N of the number of head Nh over the total number N of tosses. What results do you get for N = 10,100,1000,10000, 105 and 106 tosses? (b) The ratio Nh/N gives a number between 0 and 1. Divide the interval [0,1] into Np = 20 intervals of length Ip = [pAx, (p + 1)Ax] for p = 0 to 19, such that each interval Ip has length A.x = 0.05. Consider first N = 100 tosses of the coin and calculate N/N for n = 5,000 different experiments (this means we are repeating 5,000 times the experiment with 100 tosses). Record for all the experiments the number of times Fp that Nh/N falls into the interval Ip (note that Fp = n) and draw Fp as a function of p. Repeat the same procedure but now for 1,000, 10,000 and 50,000 experiments and draw your results. Finally repeat the procedure but using 400 tosses instead of 100 tosses. What do you observe? Why? 2. (a) Program a random tossing of a coin with equal probability of head and tail. Get the ratio N/N of the number of head Nh over the total number N of tosses. What results do you get for N = 10,100,1000,10000, 105 and 106 tosses? (b) The ratio Nh/N gives a number between 0 and 1. Divide the interval [0,1] into Np = 20 intervals of length Ip = [pAx, (p + 1)Ax] for p = 0 to 19, such that each interval Ip has length A.x = 0.05. Consider first N = 100 tosses of the coin and calculate N/N for n = 5,000 different experiments (this means we are repeating 5,000 times the experiment with 100 tosses). Record for all the experiments the number of times Fp that Nh/N falls into the interval Ip (note that Fp = n) and draw Fp as a function of p. Repeat the same procedure but now for 1,000, 10,000 and 50,000 experiments and draw your results. Finally repeat the procedure but using 400 tosses instead of 100 tosses. What do you observe? Why
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
