Monte Carlo Method, Random Number Generator, Importance Sampling, Reversetransformsampling, Rejection Sampling.
generated from p(x)") plt.show() # Laplace distribution variance calculation N = [] P = [] n= 10 while n <= 100000: s = np.random.uniform(0,1,n) theta = reverse_generator(s) p = 0 for x in theta: p += x*x N.append(n) P.append(p/n) n = n*2 P_r = [2]*len(N) plt.plot(N,P) plt.plot(N,P_r,c='red')