How to Plot Confidence Contours in Matlab for a Non-Gaussian Distribution?

  • Context: MATLAB 
  • Thread starter Thread starter aymer
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary

Discussion Overview

The discussion revolves around plotting confidence contours in MATLAB for a non-Gaussian distribution in the context of cosmological parameter estimation. Participants explore methods for estimating confidence regions based on MCMC chains and the challenges associated with non-Gaussian distributions.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks to plot 1-sigma and 2-sigma confidence contours without assuming a Gaussian distribution, expressing a desire to enclose 68% of the area of the surface.
  • Another participant suggests using a Monte-Carlo Markov Chain (MCMC) approach, mentioning the use of cosmomc for cosmological parameter estimation and its associated program, getdist, for contour plotting.
  • A participant indicates they have an MCMC chain of parameter values and chi-square values but have not used cosmomc, asking for clarification on how confidence regions are estimated from the chain.
  • In response, it is explained that the posterior distribution can be obtained by binning the parameter's prior range and counting chain steps in each bin, with confidence intervals defined by the parameter values that contain a specified percentage of chain points.
  • It is noted that functions like getdist can perform interpolation on the 2D grid of binned chain points to create smooth error contours.

Areas of Agreement / Disagreement

Participants express varying approaches to estimating confidence contours, with some advocating for MCMC methods while others seek clarification on specific techniques. The discussion remains unresolved regarding the best method for non-Gaussian distributions.

Contextual Notes

Participants discuss the limitations of assuming Gaussian distributions and the need for alternative methods in the context of cosmological parameter estimation. The specifics of the MCMC chain and the prior distributions are not fully detailed.

aymer
Messages
16
Reaction score
0
Hello..

I am dealing with a cosmological parameter estimation problem. I have a sum of squares function (chi-squared) of two parameters and I have minimized it using fminsearch, to find the best fit. Now, I want to plot 1-sigma, 2-sigma confidence contours for this. My parameter probability distribution may not be Gaussian. So , I don't want to do it in the usual way of adding 2.3 to chi-squared minimum and drawing the contour for 1-sigma. How can I draw a contour that encloses 68% of the area of the surface?

thanx
 
Physics news on Phys.org
aymer said:
Hello..

I am dealing with a cosmological parameter estimation problem. I have a sum of squares function (chi-squared) of two parameters and I have minimized it using fminsearch, to find the best fit. Now, I want to plot 1-sigma, 2-sigma confidence contours for this. My parameter probability distribution may not be Gaussian. So , I don't want to do it in the usual way of adding 2.3 to chi-squared minimum and drawing the contour for 1-sigma. How can I draw a contour that encloses 68% of the area of the surface?

thanx
Well, if you want the entire contour that may not be Gaussian, you're probably going to want to use a Monte-Carlo Markov Chain, unless you already have an analytical result for the two-parameter probability distribution. Most people use cosmomc for MCMC's with cosmological parameter estimation. Cosmomc also includes a program, getdist, which can be used to produce a variety of different contour plots for chain outputs. It uses Matlab for the actual plotting.
 
I already have an mcmc chain of parameter values and corresponding chi-square values. I have not used cosmomc though. Can you give me an idea how are the confidence regions estimated from the chain?
 
aymer said:
I already have an mcmc chain of parameter values and corresponding chi-square values. I have not used cosmomc though. Can you give me an idea how are the confidence regions estimated from the chain?
To obtain the posterior distribution, you chop the parameter's prior range into bins. Then, you count the number of chain steps that fall into each bin. The number in each bin is proportional to the marginal probability that the parameter value falls in that bin. Confidence intervals are then set by the parameter values within which a specified % of chain points lie. To obtain smooth 2D error contours, functions like getdist perform an interpolation on the 2D grid of binned chain points.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 1 ·
Replies
1
Views
4K