Monte Carlo Method, Random Number Generator, Importance Sampling, Reversetransformsampling, Rejection Sampling.
nn+=f(x)*p_pdf(x)/imp_pdf(x) p = nn/n N.append(n) P.append(p) n = n*2 Inverse Transform Sampling (random number generator and integration approximation calculation) def sgn(x): if x>0: return 1 elif x==0: return 0 else: return -1 def p_laplace(x): return 0.5*np.exp(-abs(x)) #def P_laplace_cum(x):