Monte Carlo, Markov Chains, Metropolis Hastings.
the 2.5% quantile will be 25th θ after sorting and 97.5% quantile will be 975th θ after sorting. # sort theta theta_accept_sorted = np.sort(theta_accept) theta_25_quantile = theta_accept_sorted[25] theta_975_quantile = theta_accept_sorted[975] print('the 2.5% quantile is: ', theta_25_quantile)