I would like to find the quantiles of a random variable $X$ by simulations. I plan to do it in the following way, however, I do not know which one should be more correct though the results look very very close. Let's say p=0.99
A)1.Simulate 100 random numbers of $X$, order them, and pick up the 99th one. 2.Do 1 for 1e4 times and take the average.
B)Simulate 1e6(100*1e4) random numbers of $X$, and pick up the .99*1e6-th one from the ordered sequence.
I guess A may look may "correct", and the standard error can be computed. But B is much faster. However, I do not know how to compute the standard error with B. The reuslts are close indeed.
Thanks a lot for you helps