I am struggling with convergence criteria when performing a Monte carlo simulation on a uniform distribution. Any help would be much appreciated !
Say I want to sample uniformly a 1D interval (for the sake of simplicity).
I use a random number generator (in Fortran) to draw X values between 0 and 1. Then, how do i choose the number of points N such that I have a good sampling?
I know the expected mean ( = 0.5) and I can easily compute the average of the positions of my MC points, i.e. μ = (X_1 +... + X_N) / N. I was thinking that I could define a simple criterion such that: μ / < 1% for instance, in order to decide if N is large enough or not...
Please can anyone tell me if there is a better way to figure this out?
Thanks a lot !