3
$\begingroup$

I am doing a grid search of omega_Matter vs Omega_dark_energy by iterating over ranges of both and determining the chi-squared to determine the optimal value of both for a LambdaCDM model. I have my grid of omegaM and OmegaDE but I am trying to plot contours at a 68% confidence level and am at a bit of a loss at how to go about doing this.

I am using matplotlib to generate an NxN grid to which the axes correspond to omegaM and omegaDe values and the coordinate points on the grid correspond to the chi-squared of those values. I am then trying to plot a contour plot around the minimum chi-squared value. For now i am using plt.contourf but this doesn't generate specifically 68% confidence contours and therefore I was wondering if there was a specific package in python that did this.

Any help/advice would be greatly appreciated.

$\endgroup$
6
  • $\begingroup$ What program are you using? Please specify so unfamiliar users can understand. $\endgroup$
    – WarpPrime
    Oct 25, 2021 at 16:00
  • 2
    $\begingroup$ Yes my apologies I have been a little scarce on the details. I am using matplotlib to generate an NxN grid to which the axes correspond to omegaM and omegaDe values and the coordinate points on the grid correspond to the chi-squared of those values. I am then trying to plot a contour plot around the minimum chi-squared value. For now i am using plt.contourf but this doesn't generate specifically 68% confidence contours and therefore I was wondering if there was a specific package in python that did this. Hope that makes some more sense. Thank you! $\endgroup$
    – r21
    Oct 25, 2021 at 16:09
  • $\begingroup$ Thanks! I've edited your comment into the post. $\endgroup$
    – WarpPrime
    Oct 25, 2021 at 16:28
  • $\begingroup$ Ah thank you so much! $\endgroup$
    – r21
    Oct 25, 2021 at 16:29
  • 1
    $\begingroup$ Thank you for looking into that for me, I completely missed that part of the documentation! I will have a look now. Thanks again for your help. $\endgroup$
    – r21
    Oct 26, 2021 at 8:46

1 Answer 1

3
$\begingroup$

From your comment I would take that you already know how to plot contours in python, but are not sure, at what level/height to plot them to get a 1-sigma/68% contour.

The answer you can find, e.g., in table 1 from this paper: Avni 1976

Essentially, in case of a map of 2 parameters, your $\Delta S = S - S_\mathrm{min}$ statistic follows a $\chi²$ distribution with 2 free parameters. So we want to know how high we have to go in $\Delta S$ to include 68% of this distribution. And if you look that up from the cumulative distribution function: enter image description here

So in conclusiion you will get the 1-sigma contour, if you draw you contours at $S_\mathrm{min} + 2.30$.

$\endgroup$
1
  • 1
    $\begingroup$ Thank you for clarifying that! I will check out the paper as I have a plot of the cumulative frequency so that is very relevant. Thanks again! I really appreciate your help. $\endgroup$
    – r21
    Oct 26, 2021 at 8:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .