Search code examples
statisticsconfidence-intervalvariancemcmc

How to calculate errors of best value of parameters that obtained from MCMC method and observational data


I had a model and some observational data. I used the MCMC method to obtain the best free parameters and used some coding to plot contours of 1 to 3 sigma confidence levels (as you see in the plot). I want the +/- value of sigma for each best value in any confidence level but I know that it is not symmetric. So, I didn't find the common equation of square variance useful. Is there any other way to calculate +/- errors? this is my contours

this is what I want to get


Solution

  • I used np. percentile(w, [15, 85]), np. percentile(w, [5, 95]) and np. percentile(w, [0.5, 99.5]) in the final Gaussian probability and found errors for each confidence level correctly