<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Analytic distribution of the optimal cross-correlation statistic for stochastic gravitational-wave-background searches using pulsar timing arrays</title></titleStmt>
			<publicationStmt>
				<publisher>Physical Review D</publisher>
				<date>11/01/2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10501161</idno>
					<idno type="doi">10.1103/PhysRevD.108.104050</idno>
					<title level='j'>Physical Review D</title>
<idno>2470-0010</idno>
<biblScope unit="volume">108</biblScope>
<biblScope unit="issue">10</biblScope>					

					<author>Jeffrey S. Hazboun</author><author>Patrick M. Meyers</author><author>Joseph D. Romano</author><author>Xavier Siemens</author><author>Anne M. Archibald</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[We show via both analytical calculation and numerical simulation that the optimal cross-correlation statistic (OS) for stochastic gravitational-wave-background (GWB) searches using data from pulsar timing arrays follows a generalized chi-squared (GX2) distribution-i.e., a linear combination of chi-squared distributions with coefficients given by the eigenvalues of the quadratic form defining the statistic. This observation is particularly important for calculating the frequentist statistical significance of a possible GWB detection, which depends on the exact form of the distribution of the OS signal-to-noise ratio ρ ≡ Â2 gw =σ 0 in the absence of GW-induced cross correlations (i.e., the null distribution). Previous discussions of the OS have incorrectly assumed that the analytic null distribution of ρ is well approximated by a zero-mean unit-variance Gaussian distribution. Empirical calculations show that the null distribution of ρ has "tails" which differ significantly from those for a Gaussian distribution but which follow (exactly) a GX2 distribution. Thus, a correct analytical assessment of the statistical significance of a potential detection requires the use of a GX2 distribution.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>Pulsar timing array (PTA) collaborations have recently reported evidence for a stochastic background of nanohertz gravitational waves <ref type="bibr">[1]</ref><ref type="bibr">[2]</ref><ref type="bibr">[3]</ref>. These findings were corroborated by a meta-analysis of these separate data sets by the International Pulsar Timing Array (IPTA) <ref type="bibr">[4]</ref>. All of these studies confirmed the presence of a common-spectrum rednoise process across pulsars, along with evidence for the quadrupolar spatial correlations <ref type="bibr">[5]</ref> necessary to attribute the signal to a GWB.</p><p>A computationally efficient technique used by the pulsar timing community to calculate the significance of the cross correlations involves the so-called optimal statistic (OS) <ref type="bibr">[6]</ref><ref type="bibr">[7]</ref><ref type="bibr">[8]</ref>. This statistic, denoted &#194;2 gw , is an unbiased estimator for the squared GWB amplitude A 2 gw derived by maximizing the logarithm of the likelihood ratio. The corresponding signal-to-noise ratio &#961; &#8801; &#194;2 gw =&#963; 0 , where &#963; 2 0 is the variance of the estimator &#194;2 gw in the absence of GWinduced spatial correlations, can be related to the Bayesian odds ratio between a model with correlations and a model without correlations via the Laplace approximation <ref type="bibr">[9]</ref>. The work in this paper concerns the calculation of the probability distribution for &#961;.</p><p>The distribution for &#961; in the absence of such spatial correlations is called the null distribution and is denoted by p&#240;&#961;jH 0 &#222;. Here, H 0 is the null hypothesis-i.e., the hypothesis that there are no GW-induced spatial correlations in the data. Although H 0 assumes no spatial correlations, it does allow for the presence of a nonzero common-spectrum red-noise process, whose amplitude A cp is determined from a joint noise analysis for the pulsars in the array. As such, the null distribution H 0 depends on the particular value of A cp -i.e., H 0 &#188; H 0 &#240;A cp &#222;. However, to simplify the notation in what follows, we will not explicitly display the A cp dependence of H 0 , although we will investigate the dependence of the null distribution on the amplitude and spectral shape of the common-spectrum red-noise process.</p><p>Given the null distribution, we can calculate the probability that our measured signal-to-noise ratio, denoted &#961;obs , could have resulted from noise alone. This is called the p-value and is defined as</p><p>The false alarm probability &#945; is similarly defined:</p><p>where &#961;th is the detection threshold, above which one would reject the null hypothesis and claim detection of a GWB. The detection threshold is typically chosen so that the false alarm probability has a sufficiently small value, e.g., &#945; &lt; 1 &#215; 10 -3 above that threshold. Note that the righthand sides of both ( <ref type="formula">1</ref>) and ( <ref type="formula">2</ref>) can also be written as 1 -CDF&#240;xjH 0 &#222;, where CDF&#240;x&#222; is the standard cumulative distribution function and x &#188; &#961;obs and &#961;th , respectively. By construction, both the p-value and the false alarm probability (or, equivalently, the choice of the detection threshold) depend on the detailed form of the null distribution. In previous work <ref type="bibr">[6]</ref><ref type="bibr">[7]</ref><ref type="bibr">[8]</ref>, appealing to the central limit theorem (and also for simplicity), this distribution was assumed to be Gaussian. Here, we show that the null distribution for the OS follows a generalized chi-squared (GX2) distribution <ref type="bibr">[10]</ref>, and we explore the consequences of this observation. (A paper by Cordes and Shannon <ref type="bibr">[11]</ref> also noted that the distribution of the cross-correlation statistic was highly non-Gaussian and skewed, but did not identify it as a GX2 distribution.) We show that differences between the GX2 and Gaussian distributions can be significant for current pulsar timing array configurations (defined by the numbers of pulsars, observation spans, noise parameters, etc.), as well as the amplitude and spectral shape of the common-spectrum process, especially in the tails of the distribution. Thus, the GX2 distribution should be used to calculate more accurate p-values in the case of a GW detection. In particular, we show that the Gaussian distribution assumption for the null distribution of the OS leads to overestimates of the significance of a potential detection, i.e., smaller p-values, than for the GX2 distribution.</p><p>We also compare the GX2 and Gaussian distributions of the OS to the null distributions obtained from phase shifts <ref type="bibr">[12]</ref> and sky scrambles <ref type="bibr">[13]</ref> of the PTA data. The phase shifts are analogous to applying time shifts in ground-based GW detectors, while sky scrambles replace the actual pulsar locations with random sky locations, thus removing the dependence of the spatial correlations on the angular separation between pairs of pulsars. Both of these techniques work well at removing GW-induced correlations and are now standard methods to determine null distributions for our statistics, be it the OS or the Bayes factor, directly from our data <ref type="bibr">[14]</ref>. We show that the GX2 distribution is an excellent fit to the phase-shifted or skyscrambled data compared with the standard Gaussian approximation, especially in the tails of the distribution (where it matters most) at larger values of the OS signal-tonoise ratio &#961;.</p><p>The rest of the paper is organized as follows: In Sec. II, we summarize the results of <ref type="bibr">[10]</ref>, explaining how GX2 distributions arise whenever one has a (symmetric) quadratic combination of random variables satisfying a multivariate Gaussian distribution. We then show, in Sec. III, that the OS used for PTA searches is an example of such a quadratic combination, explicitly describing the various pieces that enter the calculation of the eigenvalues needed for the GX2 distribution. In Sec. IV, we first calculate GX2 distributions for the OS for several different sets of simulated data, in the absence of simulated GW-induced cross correlations. We show how these distributions depend on the relative contribution of red and white noise, the number of pulsars, fitting to a timing model, etc., and compare these distributions with unit (i.e., standard normal) Gaussians, which often deviate significantly from the GX2 distributions in the tails of the distributions. We then compare the GX2 distribution for the OS with the null distribution of &#961; obtained by phase shifting the NANOGrav 12.5-year data <ref type="bibr">[14]</ref>. Finally, we conclude in Sec. V by discussing possible extensions or modifications to the calculations presented here-e.g., which might simplify the calculation of GX2 distributions for realistic PTA data sets. The Appendix describes a simple "tail-fitting" approach that allows us to extrapolate the tail of the OS null distribution beyond empirically determined phase-shift or sky-scramble values.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. MATHEMATICAL FORMALISM</head><p>By definition, the GX2 distribution is the probability distribution of a quadratic form of multivariate-Gaussian random variables x &#8764; N &#240;&#956;; &#931;&#222;:</p><p>Here, q 0 is a real constant, q 1 is a real vector of the same dimension as x, and Q 2 is a real symmetric matrix</p><p>As we shall describe in Sec. III, the crosscorrelation statistic that we are interested in has the simpler form</p><p>In this last equation, we have dropped the subscript 2 from Q 2 to simplify the notation since there is no chance of confusing it with a linear or constant term. We will work with this simpler form for the rest of the paper.</p><p>To use the formalism of <ref type="bibr">[10]</ref> to explicitly compute the GX2 distribution of q&#240;x&#222;, we need to write (5) as a linear superposition of standard normal distributions v &#8764; N &#240;0; 1&#222;. This is done via a series of eigenvalue-eigenvector decompositions which we summarize below.</p><p>Following <ref type="bibr">[10]</ref>, we start by converting x &#8764; N &#240;0; &#931;&#222; to a vector of uncorrelated standard normal distributions z &#8764; N &#240;0; 1&#222; by finding the eigenvalues and eigenvectors of &#931;:</p><p>where D is a diagonal matrix of eigenvalues D &#188; diag&#240;&#963; 2 1 ; &#963; 2 2 ; &#193; &#193; &#193;&#222; and E is an orthogonal matrix (i.e., E T &#188; E -1 ) whose columns are the corresponding (orthonormal) eigenvectors of &#931;. Since &#931; is a covariance matrix, we are guaranteed that its eigenvalues are all positive, hence the form &#963; 2 1 , &#963; 2 2 , &#8230;. We then take the square root of D:</p><p>for which</p><p>where</p><p>In terms of z the quadratic combination ( <ref type="formula">5</ref>) has the form</p><p>where</p><p>The final step is to diagonalize Q, by finding its eigenvalues &#240;&#7869; 1 ; &#7869;2 ; &#193; &#193; &#193;&#222; and the orthogonal matrix of eigenvectors U. This gives</p><p>for which</p><p>(Note that v is standard normal since U is an orthogonal matrix and z is standard normal.) Since the probability distribution of the square of a standard normal distribution is chi-squared distributed with 1 degree of freedom (DOF), it follows that q&#240;x&#222; is a general linear combination of &#967; 2 1 distributions, which is the form of the generalized chisquared distribution discussed in Ref. <ref type="bibr">[10]</ref>. The analytic form of this distribution for the quadratic form ( <ref type="formula">5</ref>) is completely specified by the eigenvalues of Q defined by ( <ref type="formula">6</ref>), <ref type="bibr">(7)</ref>, and <ref type="bibr">(11)</ref>. Note that the mean and variance of q&#240;x&#222; can be simply written in terms of sums (and sums of squares) of the eigenvalues used to construct the optimal statistic:</p><p>where hi denotes the expectation value. The above results follow from the expansion (13) with v 2 i &#8764; &#967; 2 1 being statistically independent of one another, and each having mean &#188; 1 and variance &#188; 2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. APPLICATION TO THE OPTIMAL STATISTIC FOR PTA SEARCHES FOR GWBs</head><p>Now we show that different forms of the OS used for PTA searches for GWBs are examples of GX2 distributions. For more details regarding the OS, we refer the reader to <ref type="bibr">[7]</ref>, with which this work shares notation, and also <ref type="bibr">[6,</ref><ref type="bibr">8]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Optimal statistic signal-to-noise ratio and GWB amplitude estimator</head><p>The optimal statistic signal-to-noise ratio for PTA searches for GWBs is typically written as</p><p>where</p><p>In the above expressions, &#194;2 gw is an estimator of the squared amplitude of the GW signal, &#963; 2 0 is its variance in the absence of GW-induced spatial correlations, and N is a normalization factor constructed from terms involving the total autocorrelated power and cross-correlated power in pulsars labeled by a, b (more about these expressions below). More compactly, </p><p>define the (symmetric) quadratic form for &#961;. Note that summations denoted by P a&lt;b run over distinct pulsar pairs, while P a;b &#8801; P a P b double counts the pulsar pairs [hence the factor of 1=2 in <ref type="bibr">(19)</ref>] and also includes the autocorrelations (which do not contribute to &#961; since Q aa &#188; 0).</p><p>The data r are zero-mean multivariate Gaussian random variables defined by</p><p>where</p><p>and</p><p>Here, M denotes the number of pulsars, and G a is the G-matrix <ref type="bibr">[15]</ref> for pulsar a, which encodes information about the timing-model fit</p><p>where &#948;t a are the timing residuals for pulsar a. If we denote the number of TOAs for pulsar a by N TOA;a and the number of timing model parameters by N par;a , then G a has dimensions N TOA;a &#215; &#240;N TOA;a -N par;a &#222;, and r a is a vector with components</p><p>The covariance matrix &#931; is thus a symmetric block matrix and has overall dimension</p><p>The diagonal terms of the covariance matrix involve the autocorrelations</p><p>where the last two terms specify the white-noise contributions, and</p><p>consists of both intrinsic pulsar red-noise and a potential common-spectrum red-noise process contribution most likely from the GWB. We assume that both of these rednoise contributions can be described by power-law spectra</p><p>For the GWB formed from the superposition of signals from inspiraling supermassive binary black holes in the centers of merging galaxies, &#945; gw &#188; -2=3. Finally, &#964; aa is the time-lag matrix, whose components are given by &#189;&#964; aa ij &#8801; t i at j a , which are the differences of the TOAs of the pulses from pulsar a.</p><p>The off-diagonal terms in the covariance matrix are assumed to have only a GWB contribution,</p><p>where</p><p>are the values of the Hellings-and-Downs function, &#915; ab &#8801; &#915;&#240;&#958; ab &#222;, evaluated for two pulsars a and b separated by the angle &#958; ab (see <ref type="bibr">[5]</ref>). The quantity</p><p>which enters the expression for the quadratic form Q ab , <ref type="bibr">(20)</ref>, is a normalized version of S ab defined in terms of</p><p>Note that these cross-correlations are proportional to the spectral shape of the GWB-i.e., they do not depend on its amplitude. Finally, it is a simple matter to show that the GWB amplitude estimator &#194;2 gw can also be written as a (symmetric) quadratic combination of the multivariate Gaussian random variables r with quadratic form</p><p>Thus, according to the discussion in Sec. II, both &#961; and &#194;2 gw will be described by GX2 distributions. For calculating the distributions of these statistics in the absence of GW-induced spatial correlations (i.e., null distributions), we should set X ab &#188; 0 in the definition of &#931; and replace the GW contribution P gw &#240;f&#222; to N a by a potential commonspectrum red-noise process P cp &#240;f&#222; (with amplitude A cp and spectral index &#945; cp ), which is common to all pulsars. (The normalized cross-correlation terms Sab in Q ab do not change since they involve the normalized cross-correlations Xab .) These null distributions are obviously also described by GX2 distributions since they are special cases of the non-null quadratic combinations. Using <ref type="bibr">(14)</ref>, it follows that the eigenvalues &#7869;i that specify the GX2 distribution for &#961; &#8801; &#194;2 gw =&#963; 0 in the absence of GWinduced spatial correlations satisfy</p><p>These are consequences of &#961; having zero mean and unit variance for the null distribution case.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Optimal statistic pulsar-pair cross-correlation estimators</head><p>One can also construct cross-correlation estimators for individual pulsar pairs:</p><p>where</p><p>Using</p><p>it follows that &#961;ab is an unbiased estimator of the crosscorrelated power in the GWB-i.e.,</p><p>with variance</p><p>In the absence of GW-induced spatial correlations, the variance simplifies to</p><p>Recall that &#915; ab are the values of the Hellings and Downs function evaluated for different angular separations between the two pulsars labeled by a and b. The matrix Xab is the time-domain representation of the spectral shape of the GW power spectrum, which (by its definition) is independent of the GWB amplitude A gw and the spatial correlation coefficients &#915; ab . It depends on the pulsar pair ab only via the discrete times t i a , t j b of the timing residuals &#948;t a , &#948;t b , which enter the time-lag matrix &#964; ab . This means that Xab is a rectangular matrix with dimensions N TOA;a &#215; N TOA;b . Since &#961;ab &#188; &#961;ba , we can write</p><p>Note that Q is a symmetric matrix since QT ab &#188; Qba . Note also that x &#8764; N &#240;0; &#931;&#222;, where</p><p>Thus, given that &#961;ab is a symmetric quadratic combination of multivariate Gaussian random variables, it obeys a GX2 distribution.</p><p>If desired, one can express both the OS signal-to-noise ratio &#961; and the GWB amplitude estimator &#194;2 gw in terms of the pulsar-pair cross-correlation estimators &#961;ab :</p><p>These results are a consequence of Sab &#188; &#915; ab Sab and the definitions ( <ref type="formula">15</ref>), <ref type="bibr">(16)</ref>, and (35) of &#961;, &#194;2 gw , and &#961;ab . Thus, &#961; and &#194;2</p><p>gw are simple noise-weighted and &#915; ab -matched linear combinations of &#961;ab .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. DEMONSTRATION OF THE GX2</head><p>DISTRIBUTION ON PTA DATA</p><p>The exact form of the GX2 distribution varies with the amplitude of the GW signal and the noise properties of the data. The characteristics of PTA noise have been studied extensively in the literature <ref type="bibr">[16]</ref><ref type="bibr">[17]</ref><ref type="bibr">[18]</ref>. The considerations for PTA detector characterization vary widely from radiometer noise at the telescope receiver to possible intrinsic spin instabilities of the neutron star. However, they can be split into a few categories including white noise, red noise, the fit of the deterministic timing model for the radio pulse times of arrival, and the number and sky position of the pulsars. In this section we demonstrate the influence that these characteristics of PTAs have on the GX2 distribution.</p><p>Fig. <ref type="figure">1</ref> shows various GX2 distributions constructed from the parameters defining some simple (fictitious) PTAs, with the spectral properties of the pulsars calculated using the pulsar spectral characterization software HASASIA <ref type="bibr">[19]</ref>. The panels demonstrate how differences in the GW signal (spatial correlations, spectral index), noise, and timing parameters change the shape of the distribution. Note that we have not included a comparison of different white-noise levels because the noise power spectral densities cancel out of the numerator and denominator of Q, which defines the GX2 distribution. <ref type="foot">1</ref>The interplay of the parameters makes it difficult to predict exactly what the distribution will look like. However, the trends for any individual parameter follow the simple rule that as the sensitivity of the PTA is increased, the tail of the GX2 distribution becomes smaller at larger values of &#961;. A couple other general observations are as follows: (i) adding sufficiently large red noise to the pulsars quickly obscures the subtle differences in the GX2 distributions, as seen in panel (b) of Fig. <ref type="figure">1</ref>, and (ii) the sky positions of the pulsars matter via the Sab terms in the expression for &#961;.</p><p>Next, we present a realistic GX2 distribution calculated using the noise and sensitivity parameters of the NANOGrav 12.5-year dataset <ref type="bibr">[20,</ref><ref type="bibr">21]</ref> to demonstrate the usefulness of an accurate analytic GX2 distribution in calculating p-values or false-alarm probabilities. Diagonalizing the various matrices described in Sec. III over full PTA data sets is challenging because of the length of the data sets. Nonetheless, by using the salient noise and sensitivity parameters of the NANOGrav 12.5 data set, we obtain fairly reasonable agreement with the phase-shift method for determining the null distribution of the optimal statistic. This is illustrated in Fig. <ref type="figure">2</ref>, which compares the analytic GX2 distribution with a histogram of &#961; values for 1000 different phase shifts of the NANOGrav 12.5-year data. For reference, we also show the unit (standard normal) Gaussian distribution.</p><p>By looking at the right-hand panel of Fig. <ref type="figure">2</ref>, one immediately sees the inaccuracy that would arise if the p-value was calculated assuming that the null distribution was Gaussian. Table <ref type="table">I</ref> gives the p-values for &#961; &#188; 5 and &#961; &#188; 1.3 calculated using the analytic form of the GX2 distribution and the Gaussian distribution, and from phase shifts and sky scrambles of the NANOGrav 12.5-year data, the latter as described in <ref type="bibr">[12]</ref><ref type="bibr">[13]</ref><ref type="bibr">[14]</ref>. (The value &#961; &#188; 1.3 is what was measured in the NANOGrav 12.5-year data set.) While the agreement between the various methods<ref type="foot">foot_2</ref> is reasonable for the lower value of &#961;, assuming that the null distribution is Gaussian for &#961; &#188; 5 leads to a p-value that is more than 1000 times smaller than it should be.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V. DISCUSSION</head><p>We have demonstrated that a GX2 distribution is the correct analytical distribution for the optimal crosscorrelation statistic (OS) used for analyzing PTA data sets. Although we focused on the null distribution of the OS signal-to-noise ratio &#961; for this paper, our analyses in Secs. III A and III B were sufficiently general to show that GX2 distributions also apply to the optimal estimator of the squared-amplitude &#194;2 gw and pulsar-pair cross-correlations &#961;ab in the presence of a signal.</p><p>We applied the general formalism to calculate the GX2 distribution for &#961; using parameters appropriate for NANOGrav's 12.5-year data set and showed that it agreed quite well with the empirical null distribution that was obtained by phase shifting the NANOGrav data. We also calculated the GX2 distribution for several different sets of simulated data in the absence of a GWB cross-correlation, varying, in turn, the number of pulsars, the relative contribution of red and white noise, etc., to see how these affected the shape of the resulting distributions.</p><p>Generically, the GX2 distributions we obtained differed from the best-fit (standard normal) Gaussian distribution by having a mode less than their mean and having "fatter" tails at high values of the statistic. (Both distributions have zero mean and unit variance for the null distribution case.) The fatter tails are especially important when calculating p-values for the null distribution, which is needed to assess the statistical significance of a possible detection.</p><p>As mentioned in Sec. IV, constructing the quadratic form for the GX2 distribution-which requires solving for the eigenvectors of large matrices-is challenging for realistic data. Using the full NANOGrav 12.5-year data set would require solving the eigenvalue problem for an N &#188; 410064 dimensional matrix twice. An additional complication is that the detailed dispersion-measure-variation (DMX) model that NANOGrav uses <ref type="bibr">[23]</ref> has a large effect on the transmission function of the pulsars <ref type="bibr">[18,</ref><ref type="bibr">24]</ref>. This shows up in the timing model fit, which enters the quadratic form via the G-matrix, e.g., r a &#188; G T a &#948;t a . As such, the key to constructing a valid GX2 distribution for a realistic PTA data set is to find a reduced set of parameters that faithfully describes the spectral properties of the PTA pulsars and the corresponding timing model of the array. We used HASASIA to calculate the spectra for all of the NG12.5 pulsars, using their full data sets <ref type="bibr">[18]</ref>. The noise power spectral density (from the spectrum) and rednoise parameters (from the Bayesian noise analyses) were FIG. <ref type="figure">1</ref>. Comparison of GX2 distributions when varying different PTA parameters: (a) varying the number of pulsars for fixed pulsar white noise, (b) varying the amplitude of the common-spectrum red-noise process for fixed pulsar white noise and number of pulsars, (c) comparing distributions with different spatial correlations for fixed pulsar white noise and number of pulsars, (d) comparing distributions having a nontrivial and trivial (i.e., identity) timing models, (e) varying the spectral index of the GWB search (here written in terms of the spectral index in timing residuals, &#947; &#8801; 3 -2&#945;) for fixed white noise and number of pulsars, and (f) comparing a set of realistic NANOGrav parameters, with a simple white-noise plus common-spectrum red-noise process. The insets show plots of the p-values of the various GX2 distributions as functions of &#961;. The gray bands show the p-values for traditional 3&#963; and 4&#963; detection significances based on a unit (standard normal) Gaussian distribution. Note that the 11, 22, and 45 pulsar cases all fall along the same p-values in (a).</p><p>then used to construct shorter data sets with similar properties, including the broadband effect of the DMX model. Spectra of these simulated data sets were taken to iteratively find the correct effective level of white-noise power spectral density to inject into the pulsars to match the spectra from the full data sets.</p><p>This process proved expeditious to obtain a fairly accurate realization of a GX2 distribution on a modest laptop. However, it is computationally inefficient for generating GX2 distributions for several different choices of noise parameters, for example. Fortunately, PTA calculations are usually carried out using a rank-reduced formalism <ref type="bibr">[25]</ref> that drastically reduces the size of matrices dealt with in the analysis. This reduced representation of the data alleviates the main problem discussed previously. For example, we are currently developing techniques to use a frequency-domain implementation of the optimal statistic to speed up the calculation, taking advantage of the rankreduced matrix, which is only 2N freq &#215; 2N freq , as opposed to N TOA &#215; N TOA . However, we leave that discussion for future work.</p><p>An alternative to using noise estimates from a previous Bayesian inference run to calculate the optimal statistic is to marginalize over the noise parameters. As described in <ref type="bibr">[8]</ref>, marginalizing over the red-noise parameters tends to remove biases that would otherwise exist due to correlations between the noise estimates and the timing residual data used to construct the optimal statistic. For the analyses described in this paper, we used maximum-likelihood estimates of noise parameters from a Bayesian analysis to construct the quadratic forms needed for calculating the GX2 distributions. We did not investigate any source of bias that might have been introduced by using noise estimates as opposed to noise marginalization. However, we are currently investigating the possibility of marginalizing over the noise for future uses of the GX2 distributions.</p><p>Finally, optimal cross-correlation statistics are also used when analyzing data from ground-based GW detectors like Advanced LIGO, Virgo, and KAGRA. However, for this case, the optimal statistics are well described by Gaussian distributions, so GX2 distributions are not needed. This is because the data from pairs of detectors are analyzed in roughly 100-sec segments (to account for potential nonstationarities in the detector noise power) and then averaged together over &#8819;10 5 such segments, corresponding to a typical year-long observation. The cross-correlation estimates of the amplitude of the GWB for each 100-sec segment are GX2 distributed. However, the final averaged optimal-statistic value (inverse-noise weighted by the variance of the individual estimates) is well described by a Gaussian distribution due to the central-limit theorem.</p><p>Lastly, we also thank the authors of <ref type="bibr">[10]</ref> for helpful discussions regarding the MatLab code [27] they developed to calculate GX2 distributions. TABLE I. The p-values calculated using various methods in the context of the NANOGrav 12.5-year data set. &#961; Analytic GX2 Gaussian Phase shifts Sky scrambles 5 3.3 &#215; 10 -4 2.87 &#215; 10 -7 &#193; &#193; &#193; &#193; &#193; &#193; 1.3 0.0983 0.0951 0.091 [14] 0.082 [14]</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>APPENDIX: EMPIRICAL TAIL FITTING AND EXTRAPOLATION</head><p>The GX2 is the analytic null distribution for the optimal statistic, but it depends upon specific characteristics of the data set, e.g., white-noise and red-noise parameters. In the case of red noise, a Bayesian analysis is used to obtain a posterior distribution on the amplitude and spectral index; using different draws from that posterior to calculate the GX2 changes the resulting distribution. Choosing the best parameters to use requires care and potentially comparison with empirical distributions. In this appendix we introduce a technique that can be used in the interim. In situations where we need to evaluate the null distribution in a place where we have few empirical simulations, but we do not yet have the full GX2 method, we can empirically fit the tail of the empirical simulations with an exponential function. This method has been used to extrapolate the tail of the null distribution in, e.g., searches for GWs from rapidly rotating neutron stars <ref type="bibr">[28]</ref>. The uncertainty on the fit parameters can then be used to bound our estimate of the p-value or false alarm probability.</p><p>We begin by choosing a point beyond which p&#240;&#961;&#222; looks like an exponential. This choice is arbitrary, but the procedure can be done using several choices, picking the one that looks most reasonable. We call this value &#961;tail . Therefore, for &#961; &gt; &#961;tail , we have</p><p>The shape parameter &#955; is a free parameter that we fit using the values in the tail of the empirical distribution. Since there is only a single free parameter, we can fit this using a brute-force Bayesian approach, with a uniform prior on &#955;</p><p>where N tail is the number of empirical distribution values satisfying &#961;i &gt; &#961;tail , and &#955; max is the upper bound on the uniform prior on &#955;. In this notation, f&#961; i g N tail i&#188;1 denotes the set of empirical distribution results that populate the tail.</p><p>The posterior on &#955; can then be used to quantify the uncertainty in the tail of the distribution on &#961;. We show an example of fits to the tail of the empirical distribution in Fig. <ref type="figure">3</ref> using 300 different draws from the posterior on &#955; (the 90% credible interval is shown in orange), along with the GX2 estimate (black line) and the empirical distribution (blue histogram). The blue histogram uses the phase shifts from the NANOGrav 12.5-year analysis that were used to generate Fig. <ref type="figure">2</ref>. For the sake of comparison, we also include the best-fit Gaussian PDF (gray dashed), which clearly underestimates p&#240;&#961;&#222; in the tail. The exponential fit agrees with the GX2 estimate out to &#961; &#188; 6, indicating it can be effectively used to extrapolate the tail and still be consistent with the analytic distribution. We can also quantify the uncertainty in the tails of the empirical distribution due to having a small number of points in the tail of the empirical distribution.</p><p>Once we have a fit for p&#240;&#961;&#222;, we can analytically calculate the cumulative distribution function (CDF), p&#240;&#961; &lt; &#961;&#222;, which can be used to estimate the false alarm probability. The CDF is given by FIG. <ref type="figure">3</ref>. Comparison of GX2 fit to empirical phase shifts and tail-fitting procedure. Left: 90% credible interval of fit (orange) to the empirical PDF (blue). The theoretical distribution from the GX2 distribution is shown in black. Right: same as the left but for the p-value &#240;1 -CDF&#222;. In both cases we can see that fitting the empirical distribution from phase shifts with an exponential gives a reasonable approximation of the GX2 in the region in which we are interested.</p><p>p&#240;&#961; &lt; &#961;j&#955;&#222; &#188; (</p><p>where 1 is the indicator function that equals 1 if the subscript condition is met and equals zero otherwise. In this expression, N is the total number of empirical trials, and &#961;i is now any one of those N trials (as opposed to being taken only from the tail). The normalization factor N is chosen such that the CDF evaluates to 1 at infinity.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>104050-2</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_1"><p>See<ref type="bibr">(11)</ref>,<ref type="bibr">(20)</ref>, and<ref type="bibr">(22)</ref>, noting that &#931; is block diagonal for the null distribution case.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_2"><p>Note that sky scrambles are currently being revisited as a robust method for retrieving the null distribution empirically<ref type="bibr">[22]</ref>. We have included the values here for historical completeness.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_3"><p>104050-11</p></note>
		</body>
		</text>
</TEI>
