Python, Monte Carlo, Monte Carlo Simulation, Importance Sampling, Machine Learning.
sigma) return distribution if __name__ == "__main__": # pre-setting n = 1000 mu_target = 3.5 sigma_target = 1 mu_appro = 3 sigma_appro = 1 p_x = distribution(mu_target, sigma_target) q_x = distribution(mu_appro, sigma_appro) plt.figure(figsize=[10, 4]) sns.distplot([np.random.normal(mu_target,