Monte Carlo Method, Random Number Generator, Importance Sampling, Reversetransformsampling, Rejection Sampling.
len(random_samples) < n: proposal = np.random.normal(loc=theta_i,scale=1) v = np.random.uniform(0,1) a = p_laplace(proposal)*p_proxy(theta_i,proposal,1) b = p_laplace(theta_i)*p_proxy(proposal,theta_i,1) if v <= (a/b): random_samples.append(proposal) theta_i = proposal return random_samples n = 50