Python, Monte Carlo, Monte Carlo Simulation, Importance Sampling, Machine Learning.
q_x.pdf(x_i)) value_list.append(value) print("average {} variance {}".format(np.mean(value_list), np.var(value_list))) # pre-setting different q(x) n = 5000 mu_target = 3.5 sigma_target = 1 mu_appro = 1 sigma_appro = 1 p_x = distribution(mu_target, sigma_target) q_x = distribution(mu_appro,