Python, Monte Carlo, Monte Carlo Simulation, Importance Sampling, Machine Learning.
another distribution: # pre-setting 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, sigma_appro) with histogram: Here we set n to 5000, when the distribution is dissimilar, in general, we need more