[GetDist] Probability densities and confidence limits in cases with hard parameters boundaries from priors

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Minh Nguyen
Posts: 15
Joined: March 21 2016
Affiliation: Leinweber Center for Theoretical Physics, University of Michigan
Contact:

[GetDist] Probability densities and confidence limits in cases with hard parameters boundaries from priors

Post by Minh Nguyen »

The attachment no_boundary_case.png is no longer available
Hi,

I know that getdist corrects for the bias introduced by smoothing over parameter hard boundaries. But I'm still failing to see how this significantly changes the answer I am getting in the scenario below.

Given a

Code: Select all

getdist.mcsamples.MCSamples
, suppose I want to compute how much of the posterior mass is there where P(theta|data) > P(theta0|data), where theta0 is the fiducial point in parameter space. I can get P(theta0|data) by interpolating the

Code: Select all

getdist.densities.Density2D
*.

Code: Select all

getdist_Density2D=getdist_samples.get2DDensity(pars[0],pars[1],normalized=False)
interpolator = RectBivariateSpline(getdist_Density2D.x, getdist_Density2D.y, getdist_Density2D.P)
Ptheta0 = interpolator.ev(fiducial_point[0], fiducial_point[1])
Once I have P(theta0|data), I can compute a bunch of contour levels, calling

Code: Select all

getdist.densities.Density2D. getContourLevels()
, and (adaptively) search for the contour levels with P(theta|data) ~ P(theta0|data) till reaching a convergence target.
For visual inspection, I can plot the found CL and it should be very close to the fiducial point, looking like the attached `no_boundary_case.png`, for example.

However, this procedure would fail when parameters have hard boundaries imposed by their priors, e.g. [w0,wa]. The situation then looks like the `with_boundary_case.png` attached.

FWIW, here is the jupyter notebook:
https://github.com/MinhMPA/getdist/blob/master/getdist_analysis_pipelines_and_tutorials/compute_significance_from_chains.ipynb
with the full routine. The result in the notebook corresponds to the case without boundaries.

*I know that `getdist.densities.Density2D` is supposed to support this procedure directly through the method `Prob()` but it never works for me in 2D as it returns `None` always.

Any insight would be greatly appreciated.
Attachments
Case with hard boundaries
Case with hard boundaries
with_boundary_case.png (41.15 KiB) Viewed 1545 times
Case without boundary
Case without boundary
no_boundary_case.png (83.92 KiB) Viewed 1546 times
Minh Nguyen
Posts: 15
Joined: March 21 2016
Affiliation: Leinweber Center for Theoretical Physics, University of Michigan
Contact:

Re: [GetDist] Probability densities and confidence limits in cases with hard parameters boundaries from priors

Post by Minh Nguyen »

Thank you very much, Antony! Now that the interpolation step is handled internally by getdist, I'm getting consistent results.
Post Reply