Fisher Matrices and Confidence Ellipses: A Quick-Start Guide and Software
VVersion 1
Preprint typeset using L A TEX style emulateapj v. 10/09/06
FISHER MATRICES AND CONFIDENCE ELLIPSES: A QUICK-START GUIDE AND SOFTWARE
Dan Coe
Jet Propulsion Laboratory, California Institute of Technology, 4800 Oak Grove Dr, MS 169-327, Pasadena, CA 91109
Version 1
ABSTRACTFisher matrices are used frequently in the analysis of combining cosmological constraints fromvarious data sets. They encode the Gaussian uncertainties of multiple variables. They are simple touse, and I show how to get up and running with them quickly. Python software is also provided. Icover how to obtain confidence ellipses, add data sets, apply priors, marginalize, transform variables,and even calculate your own Fisher matrices. This treatment is not new, but I aim to provide a clearand concise reference guide. I also provide references and links to more sophisticated treatments andsoftware.
Subject headings: cosmology OUTLINE
I explain how to do/obtain the following with/fromFisher matrices: §
2: Confidence Ellipses §
3: Manipulation:Marginalization, Priors, Adding Data Sets §
4: How to Calculate your Own Fisher Matrices §
5: How to transform variables §
6: Dark energy pivot redshift §
7: Discussion (brief) about what Fisher matrices are §
8: Software I’ve come across (including my own) §
9: How you can contribute to this paper FISHER MATRICES ⇒ CONFIDENCE ELLIPSES
The inverse of the Fisher matrix is the covariancematrix: [ F ] − = [ C ] = (cid:34) σ x σ xy σ xy σ y (cid:35) (1) σ x and σ y are the 1- σ uncertainties in your parameters x and y , respectively (marginalizing over the other). σ xy = ρσ x σ y , where ρ is known as the correlation coefficient. ρ varies from 0 (independent) to 1 (completely correlated).Examples are plotted in Fig. 1.The ellipse parameters are calculated as follows (e.g.,Unknown 2008): a = σ x + σ y (cid:114) ( σ x − σ y ) σ xy (2) b = σ x + σ y − (cid:114) ( σ x − σ y ) σ xy (3)tan 2 θ = 2 σ xy σ x − σ y (4)We then multiply the axis lengths a and b by a coefficient α depending on the confidence level we are interested in.For 68.3% CL (1- σ ), ∆ χ ≈ . α = (cid:112) ∆ χ ≈ . Electronic address: [email protected]
TABLE 1Confidence Ellipses: σ CL ∆ χ α The area of the ellipse is given by A = π ( αa )( αb ) (5)= π (∆ χ ) ab (6)= πσ x σ y (cid:112) − ρ (7)The inverse of the area is a good measure of figure ofmerit. The Dark Energy Task Force (DETF; Albrechtet al. 2006, 2009) used FOM = π/A for the ability ofexperiments (WL, SN, BAO, CL) to constrain the darkenergy equation of state parameters ( w , w a ). Probability P ( x, y )Interested in the probability that specific valuesare correct for parameters x and y ? The probabilityfunction P ( x, y ) given best fit values ( x , y ) and 1- σ uncertainties ( σ x , σ y ) is calculated as follows: χ = (cid:18) ∆ xσ x (cid:19) + (cid:18) ∆ yσ y (cid:19) − ρ (cid:18) ∆ xσ x (cid:19) (cid:18) ∆ yσ y (cid:19) − ρ (8) P ( x, y ) = exp (cid:18) − χ (cid:19) (9)with ∆ x ≡ x − x and ∆ y ≡ y − y . Note for ρ = 0(uncorrelated x and y ), the χ formula looks familiar.For correlated x and y ( ρ > χ is reduced. MANIPULATION: MARGINALIZATION, PRIORS,ADDING DATA SETS, AND MORE
Consider a Fisher matrix provided by the DETF (Table2) for optimistic Stage IV BAO observations for the fol-lowing variables: ( ω m , Ω Λ , Ω k ), where ω m ≡ Ω m h and a r X i v : . [ a s t r o - ph . I M ] J un ¯x−ασ x ¯x ¯x+ασ x ¯y−ασ y ¯y¯y+ασ y ρ=0 ¯x−ασ x ¯x ¯x+ασ x ¯y−ασ y ¯y¯y+ασ y ρ=0.5 ¯x−ασ x ¯x ¯x+ασ x ¯y−ασ y ¯y¯y+ασ y ρ=−0.5 ¯x−βσ x ¯x ¯x+βσ x ¯y−βσ y ¯y¯y+βσ y ρ=0.9999 Fig. 1.— σ ) confidence ellipses for parameters x and y with 1- σ uncertainties σ x and σ y and correlation coefficient ρ . In thefirst three panels, we plot as dashed lines the marginalized 1- σ uncertainty for each variable: ασ x and ασ y , where α ≈ √ . ≈ .
52. In thebottom-right panel, we zoom in to show the intersections with the axes: ± βσ x and ± βσ y , where β ≈ . √ − ρ (for ρ ≈ TABLE 2Example Fisher Matrix ω m Ω Λ Ω k ω m Λ k TABLE 3Corresponding Covariance Matrix ω m Ω Λ Ω k ω m Λ -1.56E-4 8.71E-4 -5.25E-4Ω k Ω m +Ω Λ +Ω k = 1. The covariance matrix (inverse of theFisher matrix) is given in Table 3. For example, the top-left element tells us that ∆ ω m ≈ . ≈ √ . E − Marginalization
When quoting these uncertainties on ω m , the othervariables (Ω Λ , Ω k ) have automatically been marginalizedover. That is, their probabilities have been integratedover: they have been set free to hold any values while wecalculate the range of acceptable ω m .To calculate a new Fisher matrix marginalized over any TABLE 4Fisher Matrix with Fixed Ω k = 0 ω m Ω Λ ω m Λ variable, simply remove that variable’s row and columnfrom the covariance matrix, and take the inverse of thatto yield the new Fisher matrix. Fixing Parameters
Suppose instead want the opposite: perfect knowledgeof a parameter. For example, we want to consider aflat universe with a fixed value of Ω k = 0. To do this,simply remove Ω k from the Fisher matrix (Table 4). Thenew covariance matrix and parameter uncertainties arecalculated from the revised Fisher matrix.Alternatively, the on-diagonal element correspondingto that parameter can be set to a very large value. Forexample, if we set the bottom-right element in Table 2to 10 , that would correspond to a 10 − uncertainty in ω m , or nearly fixed. Note that higher values in the Fishermatrix correspond to higher certainty. Priors
Rather than fixing a parameter to an exact value, wemay want to place a prior such as ∆Ω k = 0 .
01 (1- σ ).In this case, simply add 1 /σ = 10 to the on-diagonalelement corresponding to that variable (in this case, thebottom left element). Adding Data Sets
To combine constraints from multiple experiments,simply add their Fisher matrices: F = F + F . Strictlyspeaking, any marginalization should be performed af-ter the addition. But if the “nuisance parameters” areuncorrelated between the two data sets, then marginal-ization may be performed before the addition. HOW TO CALCULATE YOUR OWN FISHER MATRICES
Given the badness of fit χ ( x, y ), your 2-D Fishermatrix can be calculated as follows:[ F ] = 12 ∂ ∂x ∂ ∂x∂y∂ ∂x∂y ∂ ∂y χ (10)In other words, F ij = 12 ∂χ ∂p i ∂p j .These derivatives are simple to calculate numerically: ∂ χ ∂x ≈ χ ( x + ∆ x, y ) − χ ( x , y ) + χ ( x − ∆ x, y )(∆ x ) (11) ∂χ ∂x ≈ χ ( x + ∆ x, y ) − χ ( x − ∆ x, y )2∆ x (12) ∂ χ ∂x∂y = ∂ ∂χ ∂x∂y (13) TRANSFORMATION OF VARIABLES
Suppose we are given a Fisher matrix in terms ofvariables p = ( x, y, z ) but we are interested in constraintson related variables p (cid:48) = ( a, b, c ). We can obtain a newFisher matrix as follows: F (cid:48) mn = (cid:88) ij ∂p i ∂p (cid:48) m ∂p j ∂p (cid:48) n F ij (14)Let’s spell this out explicitly. Here is the expression forelement ( a, b ) in the new Fisher matrix: F (cid:48) ab = ∂x∂a ∂x∂b F xx + ∂x∂a ∂y∂b F xy + ∂x∂a ∂z∂b F xz (15)+ ∂y∂a ∂x∂b F yx + ∂y∂a ∂y∂b F yy + ∂y∂a ∂z∂b F yz (16)+ ∂z∂a ∂x∂b F zx + ∂z∂a ∂y∂b F zy + ∂z∂a ∂z∂b F zz (17)This can be calculated using matrices:[ F (cid:48) ] = [ M ] T [ F ][ M ] (18) where M ij = ∂p i ∂p (cid:48) j :[ M ] = ∂x∂a ∂x∂b ∂x∂c∂y∂a ∂y∂b ∂y∂c∂z∂a ∂z∂b ∂z∂c (19)and [ M ] T is the transpose.All of these partial derivatives should be evaluated nu-merically, plugging in best-fit values of the parameters. Transformation Example
Suppose we are given a Fisher matrix in terms of( ω m , Ω Λ , Ω k ), but we are interested in (Ω m , Ω Λ , h ). Here ω m ≡ Ω m h and Ω k = 1 − Ω m − Ω Λ . Suppose further thatthe best-fit cosmology is (Ω m , Ω Λ , h ) = (0 . , . , . M ] = ∂ω m ∂ Ω m ∂ω m ∂ Ω Λ ∂ω m ∂h∂ Ω Λ ∂ Ω m ∂ Ω Λ ∂ Ω Λ ∂ Ω Λ ∂h∂ Ω k ∂ Ω m ∂ Ω k ∂ Ω Λ ∂ Ω k ∂h (20)(21)= h m h − − = .
49 0 0 .
420 1 0 − − (22) PIVOT REDSHIFT
Given the dark energy equation of state parameteriza-tion w = w + (1 − a ) w a (23)where 1 /a = 1 + z , if you have calculated a FisherMatrix for dark energy parameters w and w a , go aheadand calculate the pivot redshift, too: z p = −
11 + ∆ w a ρ ∆ w (24)At this redshift, w ( z ) is best constrained (e.g., Fig. 16of Huterer & Turner 2001). Rather than presenting con-straints on ( w , w a ), constraints on ( w p , w a ) can be pre-sented. That is, we constrain the value of w at z = z p rather than at z = 0 (along with w ’s rate of change withtime w a ).The ( w p , w a ) confidence ellipse has no tilt; thereis no correlation between the two, by definition. Thus the DETF chooses a more interesting ellipse to plot:( w p , Ω DE ). But the area of the ( w p , w a ) ellipse is equal to the areaof the ( w , w a ) ellipse. From this and Eq. 7 it follows that∆ w p = ∆ w (cid:112) − ρ (25)And if w is constant, then ∆ w p = ∆ w .Derivation of the pivot redshift formula follows from(Albrecht et al. 2006), calculating the uncertainty of w p = w + (1 − a p ) w a (26)(∆ w p ) = (∆ w ) + ((1 − a p )∆ w a ) + 2(1 − a p )∆ w ,a (27)where ∆ w ,a = ρ ∆ w ∆ w a , and then minimizing ∆ w p for a p . DISCUSSION
Fisher matrices encode the Gaussian uncertainties in anumber of parameters. Confidence ellipses can be easilycalculated over any pair of parameters. These provide anoptimistic approximation to the true probability distri-bution. The true uncertainties may be larger and non-Gaussian. Note the best fit values themselves are notencoded in the Fisher matrices, and must be providedseparately.Fisher matrices allow one to easily manipulate param-eter constraints over many variables. It is easy to adddata sets, add priors, marginalize over parameters, andtransform variables, as shown here.A more in-depth discussion of Fisher matrices and is-sues surrounding their use can be found in (Albrechtet al. 2009).This is the paper I’d wished I could find when I beganmy work with Fisher matrices: projections for cosmolog-ical constraints from gravitational lens time delays (Coe& Moustakas 2009). SOFTWARE
Fisher.py Python – simple manipulation of Fishermatrices and plotting of ellipses
DETFast (Albrecht et al. 2006) JAVA – Compareexpectations of cosmological constraints from differentexperiments with your choice of priors with a few clicks! Fisher4Cast (Bassett et al. 2009) Matlab – most so-phisticatedYour ad here. CONTRIBUTE
This is meant to be a brief guide, but if I’ve failed toreference another useful guide or your software or if I’veneglected some detail (subtle or otherwise) about Fishermatrices, please e-mail me at coe(at)caltech.edu, and I’llbe happy to update this document. Also please tell meif any section is unclear.If I have not covered a useful topic, it is probablyoutside my knowledge of Fisher matrices. For exam-ple, I have not covered the analysis of Monte CarloMarkov Chains (MCMC) as provided, for example, bythe WMAP Lambda website. If a generous reader couldexplain to me (or point me to an appropriate referenceon) how to extract confidence contours and a Fisher ma-trix from a MCMC, I would be grateful and include theexplanation here, giving due credit to the contributor.I thank Olivier Dore for referring me to the DETFastsoftware written by Jason Dick and Lloyd Knox whom Ialso thank for answering my questions about their soft-ware. It is a valuable resource. Once I took off thesetraining wheels and began to produce my own plots,DETFast is still a valuable resource for Fisher matricescalculated by the DETF encoding their estimates of cos-mological constraints from various future experiments.This work was carried out at Jet Propulsion Labora-tory, California Institute of Technology, under a contractwith NASA. / http://lambda.gsfc.nasa.gov/http://lambda.gsfc.nasa.gov/