Let h 0 (e) be the histogram created by random sampling. In the limit N → ∞, h 0 (e)/N will converge to n(e), but random sampling performs poorly when N is small due to the shortage of samples in the domain of small e. One way to solve this problem is to use Markov chain Monte Carlo (MCMC) method to sample from a long-tailed distribution and reweighting the samples to estimate the DoS.