{'fraction_non_alphanumeric': 0.027479483475074843, 'fraction_numerical': 0.011349250085640666, 'mean_word_length': 4.582141669437978, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Likelihood-Free Cosmological Inference with Type Ia Supernovae: Approximate Bayesian Computation for a Complete Treatment of Uncertainty

Cosmological inference becomes increasingly difficult when complex data-generating processes cannot be modeled by simple probability distributions. With the ever-increasing size of data sets in cosmology, there is increasing burden placed on adequate modeling; systematic errors in the model will dominate where previously these were swamped by statistical errors. For example, Gaussian distributions are an insufficient representation for errors in quantities like photometric redshifts. Likewise, it can be difficult to quantify analytically the distribution of errors that are introduced in complex fitting codes. Without a simple form for these distributions, it becomes difficult to accurately construct a likelihood function for the data as a function of parameters of interest. Approximate Bayesian computation (ABC) provides a means of probing the posterior distribution when direct calculation of a sufficiently accurate likelihood is intractable. ABC allows one to bypass direct calculation of the likelihood but instead relies upon the ability to simulate the forward process that generated the data. These simulations can naturally incorporate priors placed on nuisance parameters, and hence these can be marginalized in a natural way. We present and discuss ABC methods in the context of supernova cosmology using data from the SDSS-II Supernova Survey. Assuming a flat cosmology and constant dark energy equation of state we demonstrate that ABC can recover an accurate posterior distribution. Finally we show that ABC can still produce an accurate posterior distribution when we contaminate the sample with Type IIP supernovae.

grown to thousands through individual efforts with the Hubble Space Telescope (Knop et al. 2003;Riess et al. 2004;Amanullah et al. 2010) and surveys such as the Supernova Legacy Survey (Astier et al. 2006;Conley et al. 2011), the ESSENCE Supernova Survey Wood-Vasey et al. 2007), the CfA Supernova group (Hicken et al. 2009(Hicken et al. , 2012, the Carnegie Supernova Project (Contreras et al. 2010;Stritzinger et al. 2011), the Sloan Digital Sky Survey-II (Lampeitl et al. 2010), and the Lick Observatory Supernova Search (Ganeshalingam et al. 2010). Additional current and near-future surveys such as the Palomar Transient Factory 1 (Law et al. 2009), the Panoramic Survey Telescope and Rapid Response System (Pan-STARRS) 2 , SkyMapper 3 , and the Dark Energy Survey 4 will increase the sample by another order of magnitude with the goal of obtaining tighter constraints on the nature of dark energy. The Large Synoptic Survey Telescope (LSST) anticipates observing hundreds of thousands of well-measured Type Ia supernovae (SNe Ia) (LSST Science Collaborations et al. 2009).
In this new regime of large numbers of SNe Ia the weaknesses and limitations of our current χ 2 likelihood approach to estimating cosmological parameters are becoming apparent. For example, with limited spectroscopic follow-up, we must rely on light-curve classification codes and photometric redshift tools to maximize the scientific potential of SN Ia cosmology with LSST and near-future surveys. These two crucial steps alone introduce a nontrivial component to our probability models from which we construct the likelihood. Additionally, there are significant systematic uncertainties including errors from calibration, survey design and cadence, host galaxy subtraction and intrinsic dust, population evolution, gravitational lensing, and peculiar velocities. All of these uncertainties contribute to a probability model which simply cannot be accurately described by a multivariate normal distribution.
In this paper we describe how the statistical technique of Approximate Bayesian Computation (ABC) can be used to overcome these challenges and explore the space of cosmological parameters in the face of non-Gaussian distributions of systematic uncertainties, complicated functional priors, and large data sets. We encourage the reader to read the recent paper by Cameron & Pettitt (2012) for an introduction to and application of ABC in the context of galaxy evolution. We here focus on supernova cosmology, but ABC has applicability in a wide range of forward-modeling problems in astrophysics and cosmology.

Classical Estimation of Cosmological Parameters from SN Ia Data
Cosmological inference with SNe Ia is a classical statistical estimation problem. We have data, our set of supernova light-curve observations, and we seek to infer something about the universe in which we live. It is standard in cosmology to adopt a Bayesian approach to inference. To clarify our basic conceptual and notational framework, we review Bayes theorem, a simple identity which relates the posterior probability distribution-the probability of a set of model parameters given the data-to the probability of the data given the model, the likelihood. More precisely, the posterior probability distribution is derived as where p(x|θ) is the likelihood, π(θ) is the prior on the vector of model parameters θ, and p(x) is the marginal probability of the data x (p(x) = Θ p(x| θ)π(θ)dθ). The Bayesian framework is powerful in that it allows evidence and experience to modify the prior. The approach is challenging, however, in that standard computation methods rely upon full specification of the likelihood p(x| θ); this can be challenging in applications of interest.
For example, consider a cosmological model for which the distance modulus can be written as µ model = µ model (Ω M , Ω Λ , w, z). If we assume that each measured µ has a probability distribution function (PDF) described by a Gaussian with standard deviation σ we can write the likelihood for a single observation as If the distance observations are independent after calibration such that there are no correlated uncertainties we can simply multiply the likelihood of each observation together. By taking the logarithm, we can write a more convenient form of the likelihood as follows where K is an unimportant constant, giving us the familiar χ 2 statistic. Note that the use of this form of the likelihood function and χ 2 statistic is based on the assumption of independent data with normally distributed uncertainties.
Traditionally when making cosmological inference with SNe Ia one calculates the χ 2 statistic (Conley et al. 2011;Kessler et al. 2009a;Wood-Vasey et al. 2007;Astier et al. 2006;Riess et al. 2004). One method of including systematic uncertainties in such a framework is to use the "quadrature" method, accurately named by Conley et al. (2011). Systematic errors which are not redshift dependent and add scatter to the overall Hubble diagram are added in quadrature to the statistical uncertainties. For other sources of systematic uncertainty it is typical to perform the analysis with and without including the systematic effect on the data. The difference in inferred cosmological parameter is then a measure of the systematic uncertainty. All systematic effects are then added in quadrature as the quoted total systematic uncertainty. This method has been used in recent cosmological analyses by Kessler et al. (2009a), Wood-Vasey et al. (2007), and Astier et al. (2006). It has the advantage of being simple to implement but the disadvantage of missing correlations between systematic uncertainties, not producing the full likelihood, and could be inappropriate for asymmetric error distributions (Barlow 2003). One also has the difficult task of estimating the size of the systematic uncertainty and implementing its effect in the analysis. Conley et al. (2011) presented a more thorough approach to incorporating systematic uncertainties into a χ 2 analysis using a covariance matrix. By implementing a covariance matrix one can drop the assumption of independent data in Eq. 3. The covariance matrix can be decomposed into a diagonal, statistical component and two off-diagonal matrices which include statistical and systematic uncertainty. These off-diagonal covariance matrices include uncertainties from, e.g., uncertainty in the supernova model which is statistical in nature but could be correlated between different SNe Ia and uncertainty in zero points which would systematically affect all SNe Ia. Kowalski et al. (2008) and Amanullah et al. (2010) present similar methods which are approximations to Conley et al. (2011)'s covariance matrix approach. However, the overall approach must be modified for uncertainties due to, e.g., type contamination and Malmquist bias. They have the effect of adding or removing supernovae from the sample which is difficult to represent in a covariance matrix. For systematic effects such as these the field of supernova cosmology is moving toward calculating the corrections to the data using artificial SNe Ia generated from Monte Carlo simulations.
Bayesian inference becomes increasingly difficult as we depart from normal error distributions or when the likelihood function is not analytically or computationally tractable. Direct calculation of the likelihood may involve many integrations over systematic uncertainties, nuisance parameters, and latent variables. These integrations can make the use of standard Markov Chain Monte Carlo (MCMC) techniques very challenging and computational expensive. It may also be incredibly difficult to construct an analytic probability model over which to marginalize.
ABC allows one to bypass direct calculation of the likelihood by simulating data from the posterior distribution. The posterior distribution is then constructed from the model parameters necessary to simulate data which resemble the observed data. By incorporating into the simulation all of the statistical and systematic uncertainties for which we have models and priors, the simulation knows about the complicated probability model even thought the observer may not be able to have the model written out as a set of equations or numerical integrals. By simulating many realistic datasets one can marginalize over the nuisance parameters and systematic uncertainties such that high-dimensional marginalization problems, as in population genetics for which ABC techniques were first developed, are now computationally feasible. ABC is a consistent framework to incorporate systematic uncertainties with the cosmological model and more clearly defines what it means to use Monte Carlo simulations of artificial SNe Ia to quantify systematic uncertainty.
We begin in § 2 by motivating the general problem and discussing the breakdown of current cosmological inference methods using a simple example. In § 3 we outline three separate ABC algorithms and discuss their merits. To provide the reader with an introductory example of using ABC, we then illustrate how one might perform cosmological inference with Sequential Monte Carlo (SMC) ABC using the simple model discussed in § 2. In § 4 we present a more sophisticated analysis using SNe Ia from the Sloan Digital Sky Survey-II (SDSS-II) Supernova Survey and demonstrate how one might perform cosmological inference with a tool like the SuperNova ANAlysis (SNANA) (Kessler et al. 2009b) software using SMC ABC techniques. We compare our results to the cosmological analysis performed in Kessler et al. (2009a) using statistical errors only. At the end of this section we show that ABC can recover the full posterior distribution when we contaminate the data with simulated Type IIP supernovae. We discuss directions for future work in § 5 and conclude in § 6.

General Problem Formulation
Here we establish notation that we will use in discussing the SN Ia inference problem. Below we explain how this framework could be extended to other cosmological inference challenges. Let µ i be the measured distance modulus of the i th SN Ia in our sample, τ i be its true distance modulus, z i be the estimated redshift, and θ be the vector of cosmological parameters. We will use bold faced variables to indicate a set of n supernovae, e.g., z = {z 1 , ..., z n }. Here, we stress that the "estimated redshift" will be, in practice, the redshift as estimated from photometry, i.e., the photometric redshift.
The underlying objective is to determine the posterior of the cosmological parameters θ given the observed data (µ, z). There are two natural analytical routes, both of which lead to the same challenges. The first route is to note that the posterior of θ can be decomposed as where K is a constant that does not depend on θ and Note that in this last step, the density of µ conditional on θ and z is replaced with the density of µ conditional only on θ. Here we are assuming that µ and z are independent given τ : Once τ is known, the information in z does not affect the distribution of µ. We note that this assumption is not true if one is using the photometric redshift determined from the supernova light curve.
We could pose this problem in general statistical terms as follows. Assume that µ = {µ 1 , µ 2 , . . . , µ n } are random variables such that the distribution of µ i is determined by parameters θ and τ i . Here, θ represents the unknown parameters common to the µ i while τ i are the object-specific parameters. We further assume the existence of additional data, denoted z i , which have the property that µ i and z i are independent conditional on τ i . The quantities z i can be thought of as properties that help in the estimation of τ i , but would not be useful for estimating θ if τ i were known.
Note that each of µ i and τ i could be vectors. For example, in Mandel et al. (2011), µ i stores the full observed light curve of the supernova and τ i comprises not only the true distance modulus, but also parameters that capture the effect of extinction and dust and that define the true, underlying light curve. As mentioned above, these have the property that, if τ i were known, z i would not provide useful additional information for the estimation of θ.
The second route is to rewrite the posterior as and then rely upon the fact that, as derived above, to construct a hierarchical Bayesian model for the unknown "parameters" which now consist of both θ and τ . To analytically obtain the posterior in terms of only θ, one must integrate over τ , i.e., find This is exactly the form of the challenging integral that was confronted above in Equation (6). One can often justify further conditional independence assumptions and write Still, the computational feasibility of using analytical approaches to finding the posterior for θ will depend on the form of In practice, the complex nature of photometric redshift estimators will yield a complex form for the distribution p(τ i | θ, z i ).
An alternative is to adopt the "second route" described above but instead utilize MCMC methods to simulate from the posterior for both (θ, τ ). This is the approach taken in Mandel et al. (2011). This avoids the integral over τ i , but it is still apparent that practical implementation of analytical or MCMC methods when n is large (and hence τ is of high dimension) forces one to make choices for p(µ i | θ, τ i ) and p(τ i | θ, z i ) which may not be realistic. Unfortunately, as n gets large, even small mistakes in the specification of these densities could lead to significant biases in the estimates of the parameters. This is one of the fundamental challenges facing cosmology as we are presented with ever-larger data sets. In what follows we will develop an example that illustrates this point.

A Simple Example
To begin, note that in the present example µ i is the measured distance modulus, z i is the measured redshift, τ i is the true distance modulus, and θ represent the set of cosmological parameters. We ignore for the moment all parameters which affect the measured distance modulus except z i and θ. The measured redshift z i may differ from the true redshift of the supernova, which we will denote ζ i . Consider the following three scenarios: 1. z i = ζ i , i.e., the redshift is known exactly. In this case, and under our simplifying assumptions, we know exactly the value of τ i , and hence the "density" p(τ i | θ, z i ) is a delta function at this known value.
2. The redshift is observed with some normal error. We model ζ i with a Gaussian PDF with mean z i and variance σ 2 z,i . In this case we can apply the so-called "delta method" and state that p(τ i | θ, z i ) is approximately Gaussian with mean µ(z i , θ). This scenario is analogous to measuring a spectroscopic redshift with a small error such that a Gaussian approximation for the PDF of ζ i is sufficient or a photometric redshift which has a PDF which can be modeled well by a Gaussian.
3. z i is observed with some complicated uncertainty. The PDF is not described by a simple function although p(τ i | θ, z i ) may be estimated using observed data. This is the case for most photometric redshifts.
Of course, the first case is unrealistic. In order to demonstrate the pitfalls of making unwarranted assumptions regarding the likelihood function, we will first focus on the second case, in particular assume that p(τ i | θ, z i ) is a Gaussian density with mean µ(z i , θ). The rationale for this approximation relies on the assumption that the true redshift ζ i also has a Gaussian distribution, in this case with mean z i and variance σ 2 z,i . The true distance modulus is τ i = µ(ζ i , θ), so, using the standard linear approximation, we can argue that τ i is approximately normal with mean µ(z i , θ) and variance Then, the observed distance modulus can be modeled as the true distance modulus plus some additional Gaussian error; this is taken to have mean zero and variance (σ µ,i ) 2 . In a real-life application this variance includes uncertainty from the observed intrinsic dispersion in distance modulus and uncertainty from fitting the light curve. This is the current approach in most cosmological analyses where one has spectroscopic redshifts for each SN Ia (Conley et al. 2011;Kessler et al. 2009a;Wood-Vasey et al. 2007;Astier et al. 2006). The uncertainty in redshift is transferred to the uncertainty in measured distance modulus and one can find an analytic solution to Eq. 12 by noting that the integral is simply the convolution of two normal densities. Hence the result of Eq. 12 is another normal density, but now with mean µ(z i , θ) and variance σ z µ,i 2 + (σ µ,i ) 2 . This approach is also possible for larger uncertainties like those from photometric redshifts, but the concern becomes the fact that the linear approximation utilized does not extend to larger ranges of redshift. In what follows we examine the consequences of making this Gaussian assumption for photometric redshift uncertainties when the approximation is not valid, i.e., we treat scenario 3 as if it were scenario 2. Fig. 1 shows the photometric versus spectroscopic redshift for a sample of 1744 SNe Ia generated using SNANA 5 version v9 32 and smoothed with a Gaussian kernel. To make this figure, light curves were simulated and fit from the MLCS2k2 model ) as described in Section 4 with the following changes; we fix the cosmology to Ω Λ = 0.73, Ω M = 0.27 and w = −1, and we estimate photometric redshifts when we fit the light curves without using a host galaxy photo-z prior. 6 We use this sample to represent a realistic joint distribution between the spectroscopic and photometric redshifts. We further assume that the spectroscopic redshift is equal to the true redshift ζ = z spec and the observed redshift is the photometric redshift z = z phot . Fig. 2 shows three cross-sections of the joint distribution of spectroscopic and photometric redshifts, comparing the photometric redshift distribution with the assumed Gaussian PDF. Our proposed model assumes that the horizontal cross-section of this distribution at z phot is Gaussian with mean equal to z spec . This figure demonstrates that the Gaussian approximation to the distribution of z spec is not terrible. Further, under this Gaussian approximation µ(z phot i , θ) should be approximately normal with mean τ i , i.e., under the linear approximation the distance modulus estimated using the photometric redshift has mean equal to the true distance modulus. Fig. 3 uses boxplots to show the distribution of τ i − µ(z phot i , θ) at various values of z phot for the simulated data. This plot reveals that there are significant deviations from the expected difference of zero.
The effect of this bias is made clear in Fig. 4. This figure shows the 95% credible region as constructed by two different methods, which will be described below. In both cases, the data set utilized is the same. To construct this data set we simulated a sample of 200 SNe Ia by drawing with replacement from the (z spec , z phot ) sample shown in Fig. 1. We then calculated τ = µ(z spec , θ), where θ consists of w = −1 and Ω M = 0.27 and assumed a flat universe. Finally the observed distance modulus µ is constructed by adding mean-zero Gaussian error onto τ with variance σ 2 µ,i = 0.04.
The posterior for θ is found for this dataset in two ways, and the 95% credible region 7 is displayed for each.
1. The solid line shows the credible region if the posterior is constructed using z spec . It will serve as the fiducial reference for comparisons to the other region.
2. The dashed line is the credible region that results from using the approximation described above, i.e., assuming that the observed distance modulus has a Gaussian PDF with variance The point of emphasis here is that the additional uncertainty in the redshift is now taken into account and reflected in the extra width of the region as compared to the solid region. The shift from the solid region to the dashed region is the result of a bias.
The bias shown in Fig. 4 is much like the attenuation bias that results from inappropriately taking into account the errors in the predictor variables in a regression setting: simply adding more error into the response will not adequately account for this additional error. There are methods for dealing with this additional error, but these are not practical in this setting because of another fundamental challenge: the variance of the error in redshift cannot be assumed to be constant, it needs to be modeled as a function of redshift. This heteroskedastic error introduces significant obstacles to any method that would seek to "back out" its effect on the estimates. In the next section we will instead consider approaches that exploit our ability to model and/or simulate the forward process that generated the data, and hence allow us to incorporate in a natural way the errors due to the use of photometric redshifts.

Approximate Bayesian Computation
ABC methods simulate observations from the posterior distribution via algorithms that bypass direct calculation of the likelihood. This is done by drawing model parameters from some distribution, generating simulated data based on these model parameters and reducing the simulated data to summary statistics. Summary statistics are measures of the data designed to reduce the dimensionality of the data: they represent the maximum amount of information in the simplest form. Model parameters that generate data sufficiently similar to the observed data are drawn from the posterior distribution. This procedure allows one to simulate the complicated integral in Eq. 12 rather than evaluate it but instead relies upon the ability to simulate the forward process that generated the observed data.
Here we review two classes of ABC algorithms; ABC rejection samplers and adaptive ABC algorithms. The roots of ABC techniques lie in the first class while the goal of adaptive ABC algorithms is to efficiently determine the relevant regions of parameter and probability space to sample from. In this section we will adopt a Bayesian approach and endeavor to determine (approximately) the posterior distribution of model parameters θ given observed data x. The posterior is given by where p(x| θ) is the likelihood function and p(x) is a normalization constant. For a review on ABC algorithms we refer the reader to Marin et al. (2011).

ABC Rejection Samplers
The basic ABC prescription is best considered for a situation in which the data x are discrete: Rejection Sampler: Discrete Case Repeat these steps until N candidates are accepted.
Under this algorithm, the probability that θ * is accepted is exactly π(θ | x). Hence, it is simple in principle to generate a sample of size N from the posterior distribution. This sample is then used to estimate properties of the posterior distribution such as the 95% credible region.
In practice, however, most data are continuous, and we must instead decide to accept θ * if x * is suitably "close to" x; hence, a metric or distance ∆(x * , x) must be chosen. Under this setup, the accepted parameter vectors θ * are drawn from the posterior distribution conditioned on the simulated data being sufficiently close to the observed data. More precisely, the result will be a sample from the joint distribution p( (Sisson et al. 2007). Note that if ǫ is very large the sample will be effectively drawn from the prior. The continuous version of the ABC rejection sampler, introduced by Tavare et al. (1997) and Pritchard et al. (1999), is built upon this idea: Rejection Sampler: Continuous Case Repeat these steps until N candidates are accepted.
If the data have many dimensions, requiring that ∆(x * , x) ≤ ǫ may be impractical. For example, it would be nearly impossible to simulate 10 3 supernovae to within ǫ of the observed data even with the correct cosmology due to random photometric error, let alone population variance in realizations of stretch and color distribution. Fu & Li (1997) and Weiss & von Haeseler (1998) improved Step 3 by instead making the comparison between lower-dimensional summaries of the data; here these will be denoted s(x), or just s. The ideal choice for s would be a summary statistic that is a sufficient statistic for estimating θ. Technically, a vector s is sufficient if p(x| s, θ) is not a function of θ, and hence the posterior conditioned on s is the same as the posterior conditioned on x, i.e., π(θ |s) = π(θ |x). Of course, one cannot expect to derive an exactly sufficient statistic when the form of the likelihood is not known. Hence, much current research in ABC is focused on the derivation of approximately sufficient statistics or, more generally, summary statistics that preserve important information regarding the parameters of interest. Blum et al. (2012) provide an excellent overview and comparison of methods for constructing summary statistics. These methods generally fall into two categories: those that sift through a list of candidate summary statistics to find the "best" summary statistic as measured by some optimality criterion, and those that utilize the ability to simulate data sets under different parameter values as part of a process of fitting a regression where the responses are the parameters, and the predictors are the simulated data. This mapping is then used to transform observed summary statistics to parameters. For example, an early such example was Beaumont et al. (2002), who fit local linear regression to simulated parameter values on simulated summary statistics. The regression approach can be justified on theoretical grounds, see Fearnhead & Prangle (2012), and Cameron & Pettitt (2012) used this approach for their astronomical application. In our work, the relatively simple structure of the relationship between the simulated data and the parameters of interest leads to a natural approach to constructing a summary statistic: exploiting the known smooth distance modulus/redshift relationship. In other applications, there will not exist such a simple one-dimensional representation of the data, and these sophisticated approaches must be utilized.
There are advantages to the general ABC rejection sampler approach. Since each accepted parameter represents an independent draw from p(θ | ∆(s * , s) ≤ ǫ), properties of the posterior distribution are easily estimated from the accepted sample. There are no problems with such estimation due to dependence in the sample. Also, the ABC rejection sampler is simple to code and trivial to parallelize. However, the success of this method depends on how easy it is to simulate data from the model. If the model is complicated or if the acceptance rates are small, then the algorithm can be very expensive or inefficient. A low acceptance rate can be caused by a diffuse prior relative to the posterior or by a poor choice for the summary statistic. It is natural to consider approaches that do not rely upon independent sampling from the prior. In particular, one would anticipate that it would be possible to "learn" from the parameter values that have been accepted in the past to determine where good choices for future candidates θ * .

Adaptive ABC Algorithms
The aforementioned challenges are the major motivations for the use of MCMC techniques: instead of relying on random draws from a distribution to produce candidates, random walks are taken in parameter space. Marjoram et al. (2003) presented an MCMC version of ABC as follows: is the Metropolis-Hastings acceptance probability and N is the chain length. The chain length is determined after meeting some convergence criterion (see, e.g., Cowles & Carlin (1996)). As is proved in Marjoram et al. (2003), the posterior distribution of interest π(θ | x) is the stationary distribution of the chain.
The MCMC ABC algorithm can be much more efficient than the ABC rejection sampler, especially when the posterior and prior distributions are very different. This efficiency is gained, however, at the cost of highly correlated θ i . Additionally, the MCMC ABC sampler can become inefficient if it wanders into a region of parameter space with low acceptance probability with a poor perturbation kernel. Successive perturbations have a small chance or being accepted and the chain can get "stuck." It is worth noting that this algorithm is replacing the likelihood ratio present in standard MCMC techniques with a one or zero based on whether or not ∆(s * , s) ≤ ǫ. This is a significant loss of resolution in the information that was present in the likelihood ratio. Sisson et al. (2007) (improved upon by Beaumont et al. (2009)) overcome the inefficiencies of a MCMC ABC algorithm via a method which they term Population Monte Carlo or Sequential Monte Carlo (SMC) ABC. The SMC ABC approach adapts the SMC methods developed in Moral et al. (2006) to ABC. The algorithm learns about the target distribution using a set of weighted random variables that are propagated over iterations, similar to running parallel MCMC algorithms which interact at each iteration. The basic recipe of the SMC ABC algorithm is to initialize N points in parameter space according to π(θ). Points or particles are drawn from this sample, slightly perturbed, and are accepted for the next iteration if they meet the ǫ criterion. For each iteration, the tolerance ǫ is decreased, slowly migrating the N particles into the correct region of parameter space when we have reached a pre-specified tolerance threshold.
For t=2 to t=T do: For i=1 to i=N do: Step 1 6. Set Take τ 2 t+1 equal to twice the weighted variance of the set {θ t i : i = 1, ..., N } Here, K(x) is a kernel which could be, e.g., a Gaussian kernel such that K(x) ∝ exp (−x 2 /2) and the weights are normalized after N points have been selected. Following Beaumont et al. (2009), each particle is perturbed using a multivariate normal distribution with mean centered on the particle's current position θ * and variance equal to twice the weighted empirical covariance matrix of the previous iteration N (θ * , τ 2 t ). Some work has been invested determining the most efficient method of perturbing points and includes implementing a locally adapted covariance matrix and incorporating an estimate of the Fisher information (see Filippi et al. (2011)).
Since the target distribution is approximated by a random sample of N particles that have migrated over iterations, properties of the posterior distribution are again properties of the sample, i.e., there is no covariance between the points as in the MCMC case. Using the importance weighting scheme in Beaumont et al. (2009) along with the distribution of particles in parameter space allows one to construct an estimate of the posterior distribution and derive estimates of parameters of interest based on this posterior. SMC ABC has some distinct advantages over the other ABC methods. Both the ABC rejection sampler and the MCMC ABC scheme become very inefficient when the tolerance is small. SMC ABC derives its efficiency instead from sequentially learning about the target distribution by decomposing the problem into a series of simpler sub-problems. The sequence of ǫ's can be chosen such that the acceptance rates are never too poor and the algorithm converges at a reasonable rate. However, if the sequence of ǫ decreases too slowly the algorithm will be too computationally expensive and if it decreases too rapidly the acceptance rates will be too small. An inefficient perturbation kernel will also result in a poor exploration of the space and similarly poor acceptance rates as many simulated datasets will be generated before ∆(s t i , s) < ǫ t is reached.
ABC is an active field of research. Recent improvements have been made by Barnes et al. (2011), who employ an information-theoretical framework to construct approximately sufficient statistics and Blum & Francois (2010), who introduce a machine learning approach to estimate the posterior by fitting a nonlinear conditional heteroscedastic regression of the parameters on the summary statistics. The estimation is then adaptively improved using importance sampling. For a review and study of the improvements made in ABC methods in recent years we refer the reader to Marin et al. (2011).

Example: Revisited
Here, we apply SMC ABC to the stylized SN Ia inference example introduced in § 2. The model is the same as was specified in that section. The "observed data" are simulated by constructing a sample of 200 SNe Ia under a flat cosmology with Ω M = 0.27 and w = −1. For this toy example, H 0 is assumed to be perfectly known as 72 km s −1 Mpc −1 . Fig. 5 depicts key steps in the SMC algorithm as applied to this situation. The prior is chosen to be uniform over the region 0 < Ω M < 1 and −3 < w < 0. A collection of 500 (Ω M , w) pairs, often called particles in the context of SMC methods, is migrated through the iterations of the algorithm. Fig. 5a shows the collection of 500 particles at the conclusion of one of the early time steps. One of these particles is chosen at random and perturbed a small amount; the parameter combination is Ω M = 0.11 and w = −1.21, and is shown as the star in the plot. This parameter combination in denoted θ t i in the algorithm above. Simulated data are created by drawing a collection of 200 (z, z ′ ) pairs, sampling with replacement, from the collection shown in Fig. 1. With θ t i specified and the 200 true redshifts, it is trivial to calculate the distance modulus of each SN Ia, and then add uncertainty using a Gaussian PDF with variance (σ µ,i ) 2 = 0.04. Fig. 5b shows the resulting simulated distance moduli plotted against the photometric redshifts z. The point is that this is a plot that can be created using observable data: these data comprise the x t i that appear in the algorithm above.
A key step in any implementation of SMC ABC is the choice of the summary statistic. Here, the summary statistic s t i is found by applying a nonparametric regression smoother through these data; this curve is shown in Fig. 5b. (The approach used to perform this smooth is briefly presented in the Appendix.) The motivation for this choice is as follows: as stated above, ideally we would choose a sufficient statistic as our summary statistic. A sufficient statistic is a summary that separates out from the full data that portion which is useful for estimating θ. In this case, we know that the relationship between redshift and distance modulus for fixed θ is a smooth curve. The deviation of the data from a smooth curve can be solely attributed to random error in the measurements, error which is not all informative of the value of θ. For this reason, it is reasonable to believe that a smoothed version of the points shown in Fig. 5b captures all of the useful information for estimating θ.
The comparison between the real and simulated data will be done via these smooth curves. Fig. 5c shows the observed data, along with the result s of applying the same smoothing procedure to these data. Finally, in Fig. 5d, these two curves are compared via a simple distance calculation between these curves, namely, the sum of squared deviations across the length of the curve. The particle is accepted in this iteration, because even though the curves differ at high redshift, the tolerance is not sufficiently small yet to reject at this difference. Fig. 6 shows how the collection 500 particles evolves over the steps of the algorithm. As the steps progress, the particles converge in and approximate a sample from the posterior. The notable feature of this result is that this posterior is centered on the solid contours. Just as in Fig. 4, these contours represent the posterior as derived by someone who had full knowledge of the redshifts. It is clear that by avoiding the unjustified Gaussian assumptions made in § 2, the bias that was present in the previous posterior based on photometric redshifts has been removed.

SMC ABC Cosmology with SDSS-II Supernovae
In this section we apply SMC ABC to first year data from the SDSS-II Supernova Survey Kessler et al. 2009a). The development of the sophisticated supernova simulation and analysis software SNANA (Kessler et al. 2009b) has made possible the comparison between the SDSS-II supernova sample and simulated data sets and is a natural first choice to test ABC methods in cosmology. The purpose of this section is to demonstrate that ABC can be used to estimate an accurate posterior distribution. We use the spectroscopically confirmed sample to estimate cosmological parameters from assuming a spatially flat universe and a constant dark energy equation of state parameter, w. In this section we discuss how we create simulated data sets, our ABC setup, and compare our posterior distributions for the matter density Ω M and the equation of state parameter w with those from a χ 2 analysis using statistical errors only. We close this section demonstrating the full utility of ABC by including Type IIP supernovae contamination to the SDSS sample and estimating the correct posterior distribution with ABC.

Simulation Setup
For this analysis we will use data from the fall 2005 SDSS-II Supernova Survey which were published in Holtzman et al. (2008). For detailed information regarding the scientific goals and data processing for the survey we refer the reader to Frieman et al. (2008), to Sako et al. (2008) for details of the supernova search algorithms and spectroscopic observations and to Section 2 of Kessler et al. (2009a) for a brief summary of the survey.
Our goal is to compare the derived posterior distributions for Ω M and w using ABC with those from Kessler et al. (2009a) which were done using a more traditional χ 2 analysis. To make this comparison as meaningful as possible we apply the same relevant selection cuts to the data. Therefore, defining t 0 as the time of peak brightness in rest-frame B according to MLCS2k2 such that t − t 0 = 0, we require for each SN Ia light curve, one measurement before peak brightness and one measurement more than 10 days after peak brightness. Additionally we require five measurements with −15 < t − t 0 < 60 days. These requirements ensure adequate time sampling to yield a robust light-curve model fit. Kessler et al. (2009a) additionally require one measurement in gri with a signal-to-noise greater than 5 to put a floor on the quality of data and require P fit > 0.001, where P fit is MLCS2k2 light-curve fit probability based on χ 2 . This requirement is designed to remove obvious peculiar SNe Ia in an objective fashion.
All supernovae in this sample have unambiguous spectroscopic confirmation and we use photometry in g, r, and i bands. This leaves us with 103 SDSS SNe Ia. This sample is identical to Kessler et al. (2009a)'s sample A and can be taken from their Table 10.
We can broadly separate the treatment of variables in the likelihood into two categories: (1) those which are of cosmological interest and (2) nuisance parameters. One will be able to construct posterior distributions for all parameters in the first category, in this case θ = [Ω M , w], while sampling from the probability space spanned by the set of nuisance parameters when generating simulated data sets.
We use SNANA to simulate sets of supernovae from different cosmologies. The idea is to randomly sample from the probability distributions of each nuisance parameter every time a simulated set of supernovae is generated. If we were to fix the cosmology and simulate many data sets, the probability space spanned by the nuisance parameters should be reflected in the variance of the sets of simulated data.
Within SNANA we will use the MLCS2k2 model ) to simulate SN Ia light curves. We use the same modified version of MLCS2k2 that was developed and trained in Kessler et al. (2009a). In this model the observed model magnitudes corrected for Galactic extinction, Kcorrection, and time dilation, for each passband, X, are given by where M 0 X are the fiducial absolute magnitudes, µ 0 is the distance modulus, R V and A 0 V are the host galaxy extinction parameters, and P X and Q X describe the change in light-curve shape as a quadratic function of ∆. Quantities that are functions of phase are in bold. M 0 X , P X , and Q X are estimated from a training set leaving t 0 , µ 0 , ∆, A 0 V , and R V as the free parameters.
The distance modulus can be related to the luminosity distance for a flat universe with a constant dark energy equation of state parameter of w = −1 in the following way Note that a change in H 0 simply scales the distance modulus. It is easy to see that if one rewrites Eq. 16 in terms of luminosity distance that a degeneracy arises between H 0 and M V . Even if H 0 is known from some other experiment, M V would still need to be marginalized over.
ξ X is defined as and is equal to unity at maximum light. This framework allows one to separate out the time dependence of the extinction while being insensitive to the total extinction E(B − V ) and the extinction law R V .
A major advantage of MLCS2k2 is that it allows one to separate reddening resulting from dust in the host galaxy (third term in Eq. 16) from intrinsic color variations of the supernova which are captured by ∆. The validity of this approach depends on how separable these two terms are, how well intrinsic color is predicted by light curve shape, and relies on accurate models of the distribution of extinction with redshift ).
To generate a simulated set of data, we assume a flat universe and choose Ω M and w from flat priors over the range [0, 1] and [−3, 0] respectively. One could instead draw cosmological parameters from priors based on the SDSS detection of the baryon acoustic oscillations (Eisenstein et al. 2005) and the five-year Wilkinson Microwave Anisotropy Probe observations (WMAP-5) of the cosmic microwave background (Komatsu et al. 2009). A random supernova redshift is selected from a power law distribution given by dn dz ∼ (1 + z) β where β = 1.5 ± 0.6 ). ∆ and A V are then drawn from empirical distributions determined in Section 7.3 of Kessler et al. (2009a). Using the parameterization of Cardelli et al. (1989) to describe the extinction with R V = 2.18 (as determined from Section 7.2 in Kessler et al. 2009a), the MLCS2k2 light-curve model can now be used to generate supernovae magnitudes which are then K-corrected using spectral templates from Hsiao et al. (2007) into observer frame magnitudes.
SNANA then chooses a random sky coordinate consistent with the observed survey area and applies Galactic extinction using the Schlegel et al. (1998) dust maps, chooses a random date for peak brightness, and selects observed epochs from actual SDSS survey observations. Noise is simulated for each epoch and filter and includes Poisson fluctuations from the SN Ia flux, sky background, CCD read noise, and host galaxy background.
The simulation allows one to add additional intrinsic variations in SN Ia properties to better match the observed scatter in the Hubble diagram. We do this by "color smearing." A magnitude fluctuation drawn from a Gaussian distribution is added to the rest-frame magnitude for each passband leading to a change in model colors of ∼ 0.1 mag. SNANA also includes options to model the search efficiency of the survey.
The aforementioned selection cuts on the observed data are then applied to the simulated data. This process is done for a selected cosmology for ∼ 100 SN Ia over the redshift range of [0.02, 0.45], similar to the SDSS data, assuming a redshift uncertainty of 0.0005. Finally, the distance modulus is measured by performing an MLCS2k2 light curve fit assuming the same prior on A V and ∆ from which the data were simulated.
In Fig. 7 we plot the distance modulus as a function of redshift for the SDSS data in blue and a simulated data set in red. For the simulated data set we assume that Ω M = 0.3 and w = −1.0. The simulated data have been offset by 1 mag for clarity. The distance modulus uncertainties, intrinsic scatter, and redshift distributions are similar between the simulated and observed data sets.

SMC ABC Implementation
To calculate the measure of similarity between the observed and simulated data sets, ∆(s t i , s), we turn to the Hubble diagram. In the top panel of Fig. 8 we show µ versus z for our observed data and a simulated data set with Ω M = 0.1, and w = −2.0. A reasonable distance measure could be the Euclidean distance between the data sets at the redshifts of the observed data. However, in keeping with the notion of summary statistics, we would like to compare a smooth representation of the two data sets rather than the data themselves. In the bottom panel of Fig. 8 we show a non-parametric smooth of the simulated and observed data. The details on how we perform the non-parametric smooth are in Appendix A. We opt for a non-parametric smooth in the interests of efficiency and to prevent inserting additional assumptions about the data in an intermediate step in contrast to fitting the data with a cosmology fitter. We now define ∆(s t i , s) to be the median absolute deviation between the smoothed data sets evaluated at the observed redshifts. We choose this because it is simple, it is robust to poor smoothing at high and low redshifts, and allows for a physical interpretation of the minimum tolerance. Since we are basically measuring the distance between the two data sets in distance modulus, we consider our minimum tolerance to be equal to the median uncertainty in the smoothed observed data, i.e., we declare the observed data and simulated data sets sufficiently similar when the simulated data are within the error of the observed data.
For simplicity in this analysis we fix the value of H 0 to 65 km s −1 Mpc −1 to restrict the relevant region of parameter space. This improves the efficiency of the ABC algorithm and more importantly, makes the comparison between ABC and χ 2 more striking. However, we note that for this particular definition of the distance metric the simulated value of H 0 directly scales ∆(s t i , s) in a trivial manner. One could naively treat H 0 as a nuisance parameter and randomly sample H 0 from a flat prior over some range. Since H 0 , w, and Ω M are correlated, a faster approach would be to add H 0 as another cosmological parameter, adding a third dimension to the parameter space. The particles would then trace out the three-dimensional posterior distribution from which one could marginalize over H 0 to obtain the two-dimensional projection. Given the simulation expense, one would like to take advantage of the simple relationship between H 0 and ∆(s t i , s). To this end one could calculate a set of ∆(s t i , s)s corresponding to a range of Hubble parameter values for a given w and Ω M . The particle is then accepted with a percentage based on the number of ∆(s t i , s) elements that meet the tolerance criterion. This avoids re-simulating data sets a given number of times over a range of H 0 values while still sampling the probability space fully and thus marginalizing over H 0 .
We choose ǫ t according to the distribution of {∆(s t−1 i , s) : i = 1, ..., N } instead of having a predefined sequence of tolerances to walk though. For the first iteration, we accept all points, i.e., the tolerance is infinite. For the next iteration, t = 2, the tolerance ǫ t=2 is set to the 25% percentile of {∆(s 1 i , s)}. All subsequent ǫs are the 50% percentile of the previous iteration. A percentile which is too large allows for many acceptances and will not localize into the correct region until T is large. Conversely, if one is too strict in their sequence of tolerances, many simulations are required before a point is accepted. We found that putting a stricter cut on what ǫ should be early on helps concentrate quickly into the correct area of parameter space, requiring fewer simulations in future iterations.
We define ǫ to be sufficiently small when it is less than the uncertainty on the non-parametric smooth of the observed data, which we estimate via bootstrap. The median uncertainty on the non-parametric smooth for the SDSS data set is 0.033. We require ∆(s t i , s) for each particle to be less than this value at the final iteration.
We choose N = 150 particles and run the code on eight different processors. As the initial particles are independently drawn between the three runs, the results can be combined to better estimate the posterior distribution. However, the sequence in ǫ is slightly different for each run. In practice one should parallelize the code at the level of accepting N points so that there is just one sequence of tolerances. Ours do not vary significantly and is not a concern for our demonstration.
Properties of the posterior distribution are then drawn from the final sample of particles and their weights which meet the minimum tolerance criteria.

Results and Discussion
It is useful to first review the cosmological analysis performed in Kessler et al. (2009a). MLCS2k2 provides an estimate of the distance modulus for each supernova. The χ 2 statistic is then calculated over a grid of model parameters and used to derive cosmological parameter estimates. Recall that −2 ln(π(θ | x)) = χ 2 . The χ 2 statistic for the SDSS supernova sample is calculated according to where µ i and z i are the distance modulus returned from MLCS2k2 and measured redshift of the supernova, and µ mod is the model magnitude. The distance modulus uncertainties are given by where σ fit µ is the statistical uncertainty reported by MLCS2k2, σ int µ = 0.16 is additional intrinsic error, and σ z µ = σ z 5 ln 10 The posterior distributions for Ω M and w assuming a flat universe can then be found by marginalizing over H 0 . Recall for our comparison that we are fixing the value of H 0 and do not need to marginalize over H 0 .
In Fig. 9 we compare our posterior distribution to that found using the approach described above. The top plot shows the particles from the final iteration of the SMC ABC algorithm. The area of the particle symbol represents the weight. These points and their weights represent a sample from the posterior distribution. We estimate the 95% credible region from this sample and compare with the 95% confidence region from a χ 2 analysis in the bottom plot. Overall the contours are well matched. The weights on the particles become large just inside the hard boundaries set by the priors on Ω M and w. The algorithm is accounting for the fact that there is parameter space beyond the boundary which it cannot explore. This is similar to an MCMC algorithm running into a boundary and sampling more in that region because it cannot cross the boundary. As a result the ABC contours become wider than those from χ 2 near the boundaries.
We reiterate that the goal of this exercise was not to derive new cosmological constraints but merely to see how well we can recover the likelihood contours presented in Kessler et al. (2009a) using a simple implementation of SMC ABC. We demonstrate that we can recover the posterior distribution derived from current analysis techniques with the hope of convincing the reader this approach will be useful in the near future. We do note that the A in ABC stands for "Approximate." One should expect slight differences in the estimated posterior distributions due to choices of distance metric, summary statistics, and final tolerance.

Type IIP Contamination
We add 34 simulated Type IIP supernovae to the SDSS sample so that the overall type contamination is 25%. While the amount and type are a bit extreme it is useful for illustrative purposes. We use SNANA to simulate the data which uses spectral templates and smoothed light curves of well observed supernovae. We use the "NONIa" option which computes the observer magnitudes from the spectral energy distribution and we set MAGOFF=-0.6 and MAGSMEAR=0.9. For details on these keywords and additional information on simulating non-Ia light curves we refer the reader to Section 3.5 of the SNANA manual. 8 The selection cuts, other observing parameters, and fitting procedure remain as described in Section 4.1. Our new sample is plotted in Figure 10.
We modify our SMC ABC analysis as follows; after drawing cosmology parameters from π(θ), we simulate and fit additional Type IIP light curves in the aforementioned manner and add those to our simulated Type I data. From this point the SMC ABC algorithm proceeds as before. Our new final tolerance has increased to 0.038 due to the additional scatter in the Hubble diagram.
The resulting 95% credible region is plotted in Fig. 11 as the blue-solid line along with the 95% confidence regions from χ 2 with (red-dashed) and without (black-dotted) type contamination. The contours from the χ 2 analysis have shifted due to the type contamination. One can attempt to fix this bias with simulations about the best fit value but one can use SMC ABC to reproduce the full bias-correct contours. The ABC contours are 42% larger in area than the χ 2 uncontaminated contours, but cover essentially the same area as the original ABC contours from the uncontaminated sample. If contamination is properly modeled the ABC method is robust against these effects that can only be applied on a population basis rather than as a per-object correction.
It is worthwhile to note that while the division between statistical and systematic errors is often loosely used to make a distinction between uncertainties that will decrease with more data of the same form versus uncertainties that will not decrease with larger sample sizes, the benefit of a forward-modeling framework is that they can be treated consistently and simultaneously. To create a simulation model one is forced to make choices regarding the distributions of all statistical and systematic uncertainties through either analytic or empirical methods. Systematic errors come in at least three flavors: (1) effects that we know and understand and have a reasonable understanding of the relevant input distribution; (2) effects we qualitatively understand, but for which we do not have a good input prior distribution: e.g., R V values in host galaxies. We can compute the effect on a supernova lightcurve, but we are relatively uncertain about the correct distribution of R V in galaxies in the Universe; (3) effects that we lose sleep over but that we have so little understanding of that we cannot model their effects at all, although we may have some purely empirical guidance: spectroscopic selection biases; evolving metallicity content of stars over the last 8 billion years. Systematic errors of type 1 are easy to include in ABC. One can use ABC to examine the effects on the posterior distribution from different choices of distributions for systematic errors of type 2. One may be able to include empirical distributions for systematic errors of type 3. Otherwise ABC can not tell you something about these systematic errors unless they are treated as model parameters. Forward modeling with an SMC ABC approach provides a powerful way to fully incorporate all available knowledge and ignorance.

Future Work
We presented here a proof of concept for an SMC ABC method to infer model parameters based on SN Ia measurements. To fully deploy this method will require an incorporation of all data sets and modeling relative systematics between the surveys, e.g., relative calibration. This is tractable, if somewhat tedious, and has been done with varying degrees of completeness already in the literature. Extending this approach to explorations of time-variable dark energy is a simple matter of implementing at different generating model for luminosity distance as a function of redshift.
For future photometric-focused surveys, we would explore more fully the non-Gaussianity of photometric redshifts as derived from calibration samples. The probability distributions for these photometric redshifts will be strongly affected by evolution of the contamination fraction of non-SN Ia with redshift. Once that is phrased as part of the generating model, ABC will incorporate such uncertainties on the same basis as all of the other cosmological and astrophysical parameters.
The ABC+SNANA framework is a very suitable vehicle for testing the effects of different lightcurve fitters on the derived cosmological parameters. ABC will help efficiently determine what different parameter choices in the fitters should be explored.
But the real long-term goal would be to apply the summary statistic comparison at the individual lightcurve level. This could significantly reduce the computing time. The analysis presented in this work with ∼100 supernovae and 1200 particles required ∼600 CPU-hours. We estimate that a realistic problem with a sample of 10 4 supernovae could be done on O(10) CPU-years, which is within reasonable computing resources. Applying the summary statistic comparison at the individual light curve level rather than in Hubble diagram space bypasses fitting the simulated light curves which currently requires most (∼90%) of the computing time.
Comparing the simulated and observed data at the individual lightcurve level would also be the cleanest framework to explore agreement and evolution of systematics. The only "training" would be in the generation of the templates that the SN Ia are derived from in the first place. The cosmological distance and supernova property comparison would be finally integrated in one direct comparison.

Conclusions
We have introduced and demonstrated the use of Approximate Bayesian Computation techniques to address the requirements for analyzing near-future SN Ia cosmological data sets. ABC presents a consistent and efficient approach to explore multi-dimensional non-Gaussian parameter distributions with full incorporation of systematic uncertainties.
• Forward modeling is often the only way to correctly incorporate the full range of statistical and systematic uncertainties in some of the big astronomy questions being addressed today.
• Calculation of likelihood functions for evaluation in a traditional Markov Chain Monte Carlo approach may not be analytically tractable.
• ABC allows for a simultaneous exploration of parameter space and tolerance to create credible regions for physical parameters of interest without the need to construct an explicit likelihood function.
• Sequential Monte Carlo ABC offers an efficient way to explore the full parameter space of all important input parameters and model effects.
• The use of a summary statistic focuses attention directly on the ability to discriminate model parameter values in the relevant space of observed values.
We encourage scientists facing similar problems to consider the use of ABC techniques to increase their incisive power to explore the complicated parameter spaces that are surrounding the key questions in astrophysics and cosmology today.

Acknowledgements
We thank the referee for helpful comments and A.W. and M.W.-V. thank Saurabh Jha for insightful discussions. This research was supported in part by NSF DMS-1106956. A.W. and M.W.-V. were supported in part by NSF AST-1028162. A.W. additionally acknowledges support from PITT PACC and the Zaccheus Daniel Foundation.

A. Non-Parametrically Smoothing the Simulated and Observed Data
To perform a non-parametric smooth we use a robust locally weighted regression (loess) (Cleveland 1979). This routine smooths the data by iteratively fitting a local d-order polynomial to the data using a tricube weighting function. We use a quadratic polynomial and, for the observed data, add an additional weight according to the uncertainty in µ given by Eq. 21.
We choose the size of the window to locally smooth over by minimizing the risk or the sum of the variance and bias squared. We estimate the risk using the leave-one-out cross validation score where f (x) is the smoothed function using a smoothing window given by h and f (−x i ) is the smooth obtained leaving out the i th data point (see, e.g., Wasserman (2006)). The smoothing window goes from zero to one with zero being no smooth and one resulting in a line. Using the SDSS data we find the minimum risk to yield a smoothing window of 0.52. As estimating the risk is somewhat computationally intensive, we determine the smoothing window using the observed data and use the same window to smooth the simulated data in the ABC algorithm. -Comparison between the assumed Gaussian joint distribution between z and ζ i (dashed) and nonparametric fits (solid) through the simulated data shown in Fig. 1. Three cross-sections are shown, one at each of photometric redshifts of 0.1, 0.2, and 0.3. In each case, a bin of width 0.02 is constructed, centered on these values, and the observations which fall into this bin are used to estimate the distribution for spectroscopic redshift. A Gaussian is not a terrible approximation to these cross-sections, but is it far from ideal. -Distance modulus residual defined as µ(ζ i , θ)−µ(z i , θ) as a function of photometric redshift z i . Under the described Gaussian approximation, these distributions should all have mean zero. The boxplots compare the distribution in different narrow redshift bins. The top and bottom of the box indicate the 25th and 75th percentile, the center line marks the median, and the "whiskers" mark 1.5 times the inter-quartile range. Points outside the whiskers are considered outliers. The "notch" in each boxplot allows for comparison to determine statistical significance: if the notches of two boxes do not overlap, then there is a statistically significant difference between the medians of the populations. Hence, it is evident that there is a bias introduced; the centers of these distributions are not always zero. This bias indicates that the Gaussian model for the joint distribution of (ζ, z) is inappropriate.  (2) where the approximation described in Section 2.1 is utilized (blue-dashed line). The star is at the true value of the parameters used in the simulation. The increased width of the confidence region is natural, given the use of photometric redshifts instead of spectroscopic redshifts, but the bias is a result of the inadequacy of the assumed Gaussian model. The line is a nonparametric smooth of the data and represents the summary statistic. Panel (c): "Observed" data. The dashed line represents a nonparametric smooth of the observed data. Panel (d): a comparison between the simulated and observed datasets via the sum of squared deviations across the length of the curve. The particle is accepted in this iteration even though the curves are discrepant at high redshift as the tolerance is not small enough to reject it. Such a point would likely be rejected in a future iteration as the tolerance is decreased (see Fig. 6). As ǫ decreases, the collection of particles converges to a sample from the posterior (when the weights are taken into account). The solid contour is the 95% credible region that would have been formed by someone who had knowledge of the spectroscopic redshifts. The dashed contours result from fitting to the output of the ABC algorithm. Compare with Fig. 4 to note the reduction of the bias that resulted from the Gaussian approximation. Note that it is not expected that these contours will be the same, as the ABC simulations are built upon data using photometric redshifts; hence, there is additional uncertainty in the parameter estimates. Fig. 7.-Hubble diagram for the observed data in blue and a simulated dataset in red. The simulated dataset is offset from the observed data by 1 mag and was generated assuming Ω M = 0.3 and w = −1.0. The distance modulus uncertainties, intrinsic scatter, and redshift distributions are well reproduced in the simulated dataset. Simulated datasets like this one with different cosmologies are used in our ABC analysis. Fig. 8.-Illustration of the distance metric using SDSS data and simulated data from SNANA. Top: Hubble diagram for the observed data in blue and a simulated dataset in red. The simulated data were generated assuming Ω M = 0.1 and w = −2.0. Bottom: Nonparametric smooth of the two datasets. The distance metric is defined to be the median absolute deviation between the smoothed curves which is equal to 0.402 for this case. Our final tolerance is 0.033. Fig. 9.-Comparison of SMC ABC with a χ 2 analysis. Top: Particles from the final ABC iteration. Bottom: The 95% credible regions from ABC (blue-solid) and χ 2 (red-dashed). The contours between ABC and χ 2 are well matched except near the boundaries. The discrepancy results from the sharp boundaries of our prior. ABC is attempting to account for the fact that there is relevant parameter space which it cannot explore. Fig. 10.-SDSS sample plus 34 Type IIP supernovae simulated with SNANA. This combined dataset is our "observed" sample for the type contamination analysis. Fig. 11.-95% credible region from ABC (blue-solid) and the 95% confidence interval from χ 2 for the SDSS sample with type contamination (red-dashed) and the original SDSS sample (blackdotted). The type contamination biases the χ 2 result. ABC reproduces the entire credible region without this bias and reflects additional uncertainty due to increased scatter in the Hubble diagram.