• AMORPH utilizes a new Bayesian statistical approach to interpreting X-ray diffraction results of samples with both crystalline and amorphous components. AMORPH fits X-ray diffraction patterns with a mixture of narrow and wide components, simultaneously inferring all of the model parameters and quantifying their uncertainties. The program simulates background patterns previously applied manually, providing reproducible results, and significantly reducing inter- and intra-user biases. This approach allows for the quantification of amorphous and crystalline materials and for the characterization of the amorphous component, including properties such as the centre of mass, width, skewness, and nongaussianity of the amorphous component. Results demonstrate the applicability of this program for calculating amorphous contents of volcanic materials and independently modeling their properties in compositionally variable materials.
  • Bayesian inference methods rely on numerical algorithms for both model selection and parameter inference. In general, these algorithms require a high computational effort to yield reliable estimates. One of the major challenges in phylogenetics is the estimation of the marginal likelihood. This quantity is commonly used for comparing different evolutionary models, but its calculation, even for simple models, incurs high computational cost. Another interesting challenge relates to the estimation of the posterior distribution. Often, long Markov chains are required to get sufficient samples to carry out parameter inference, especially for tree distributions. In general, these problems are addressed separately by using different procedures. Nested sampling (NS) is a Bayesian computation algorithm which provides the means to estimate marginal likelihoods together with their uncertainties, and to sample from the posterior distribution at no extra cost. The methods currently used in phylogenetics for marginal likelihood estimation lack in practicality due to their dependence on many tuning parameters and the inability of most implementations to provide a direct way to calculate the uncertainties associated with the estimates. To address these issues, we introduce NS to phylogenetics. Its performance is assessed under different scenarios and compared to established methods. We conclude that NS is a competitive and attractive algorithm for phylogenetic inference. An implementation is available as a package for BEAST 2 under the LGPL licence, accessible at https://github.com/BEAST2-Dev/nested-sampling.
  • We present theoretical and practical properties of the affine-invariant ensemble sampler Markov chain Monte Carlo method. In high dimensions the affine-invariant ensemble sampler shows unusual and undesirable properties. We demonstrate this with an $n$-dimensional correlated Gaussian toy problem with a known mean and covariance structure, and analyse the burn-in period. The burn-in period seems to be short, however upon closer inspection we discover the mean and the variance of the target distribution do not match the expected, known values. This problem becomes greater as $n$ increases. We therefore conclude that the affine-invariant ensemble sampler should be used with caution in high dimensional problems. We also present some theoretical results explaining this behaviour.
  • The Shannon entropy, and related quantities such as mutual information, can be used to quantify uncertainty and relevance. However, in practice, it can be difficult to compute these quantities for arbitrary probability distributions, particularly if the probability mass functions or densities cannot be evaluated. This paper introduces a computational approach, based on Nested Sampling, to evaluate entropies of probability distributions that can only be sampled. I demonstrate the method on three examples: a simple gaussian example where the key quantities are available analytically; (ii) an experimental design example about scheduling observations in order to measure the period of an oscillating signal; and (iii) predicting the future from the past in a heavy-tailed scenario.
  • Cricketing knowledge tells us batting is more difficult early in a player's innings but becomes easier as a player familiarizes themselves with the conditions. In this paper, we develop a Bayesian survival analysis method to predict the Test Match batting abilities for international cricketers. The model is applied in two stages, firstly to individual players, allowing us to quantify players' initial and equilibrium batting abilities, and the rate of transition between the two. This is followed by implementing the model using a hierarchical structure, providing us with more general inference concerning a selected group of opening batsmen from New Zealand. The results indicate most players begin their innings playing with between only a quarter and half of their potential batting ability. Using the hierarchical structure we are able to make predictions for the batting abilities of the next opening batsman to debut for New Zealand. Additionally, we compare and identify players who excel in the role of opening the batting, which has practical implications in terms of batting order and team selection policy.
  • In probabilistic (Bayesian) inferences, we typically want to compute properties of the posterior distribution, describing knowledge of unknown quantities in the context of a particular dataset and the assumed prior information. The marginal likelihood, also known as the "evidence", is a key quantity in Bayesian model selection. The Diffusive Nested Sampling algorithm, a variant of Nested Sampling, is a powerful tool for generating posterior samples and estimating marginal likelihoods. It is effective at solving complex problems including many where the posterior distribution is multimodal or has strong dependencies between variables. DNest4 is an open source (MIT licensed), multi-threaded implementation of this algorithm in C++11, along with associated utilities including: i) RJObject, a class template for finite mixture models, (ii) A Python package allowing basic use without C++ coding, and iii) Experimental support for models implemented in Julia. In this paper we demonstrate DNest4 usage through examples including simple Bayesian data analysis, finite mixture models, and Approximate Bayesian Computation.
  • We present a new sample of strong gravitational lens systems where both the foreground lenses and background sources are early-type galaxies. Using imaging from HST/ACS and Keck/NIRC2, we model the surface brightness distributions and show that the sources form a distinct population of massive, compact galaxies at redshifts $0.4 \lesssim z \lesssim 0.7$, lying systematically below the size-mass relation of the global elliptical galaxy population at those redshifts. These may therefore represent relics of high-redshift red nuggets or their partly-evolved descendants. We exploit the magnifying effect of lensing to investigate the structural properties, stellar masses and stellar populations of these objects with a view to understanding their evolution. We model these objects parametrically and find that they generally require two S\'ersic components to properly describe their light profiles, with one more spheroidal component alongside a more envelope-like component, which is slightly more extended though still compact. This is consistent with the hypothesis of the inside-out growth of these objects via minor mergers. We also find that the sources can be characterised by red-to-blue colour gradients as a function of radius which are stronger at low redshift -- indicative of ongoing accretion -- but that their environments generally appear consistent with that of the general elliptical galaxy population, contrary to recent suggestions that these objects are predominantly associated with clusters.
  • We introduce a Bayesian solution to the problem of inferring the density profile of strong gravitational lenses when the lens galaxy may contain multiple dark or faint substructures. The source and lens models are based on a superposition of an unknown number of non-negative basis functions (or "blobs") whose form was chosen with speed as a primary criterion. The prior distribution for the blobs' properties is specified hierarchically, so the mass function of substructures is a natural output of the method. We use reversible jump Markov Chain Monte Carlo (MCMC) within Diffusive Nested Sampling (DNS) to sample the posterior distribution and evaluate the marginal likelihood of the model, including the summation over the unknown number of blobs in the source and the lens. We demonstrate the method on two simulated data sets: one with a single substructure, and one with ten. We also apply the method to the g-band image of the "Cosmic Horseshoe" system, and find evidence for more than zero substructures. However, these have large spatial extent and probably only point to misspecifications in the model (such as the shape of the smooth lens component or the point spread function), which are difficult to guard against in full generality.
  • Inferring the number of planets $N$ in an exoplanetary system from radial velocity (RV) data is a challenging task. Recently, it has become clear that RV data can contain periodic signals due to stellar activity, which can be difficult to distinguish from planetary signals. However, even doing the inference under a given set of simplifying assumptions (e.g. no stellar activity) can be difficult. It is common for the posterior distribution for the planet parameters, such as orbital periods, to be multimodal and to have other awkward features. In addition, when $N$ is unknown, the marginal likelihood (or evidence) as a function of $N$ is required. Rather than doing separate runs with different trial values of $N$, we propose an alternative approach using a trans-dimensional Markov Chain Monte Carlo method within Nested Sampling. The posterior distribution for $N$ can be obtained with a single run. We apply the method to $\nu$ Oph and Gliese 581, finding moderate evidence for additional signals in $\nu$ Oph with periods of 36.11 $\pm$ 0.034 days, 75.58 $\pm$ 0.80 days, and 1709 $\pm$ 183 days; the posterior probability that at least one of these exists is 85%. The results also suggest Gliese 581 hosts many (7-15) "planets" (or other causes of other periodic signals), but only 4-6 have well determined periods. The analysis of both of these datasets shows phase transitions exist which are difficult to negotiate without Nested Sampling.
  • We present dynamical modeling of the broad line region (BLR) for a sample of five Seyfert 1 galaxies using reverberation mapping data taken by the Lick AGN Monitoring Project in 2008. By modeling the AGN continuum light curve and H$\beta$ line profiles directly we are able to constrain the geometry and kinematics of the BLR and make a measurement of the black hole mass that does not depend upon the virial factor, $f$, needed in traditional reverberation mapping analysis. We find that the geometry of the BLR is generally a thick disk viewed close to face-on. While the H$\beta$ emission is found to come preferentially from the far side of the BLR, the mean size of the BLR is consistent with the lags measured with cross-correlation analysis. The BLR kinematics are found to be consistent with either inflowing motions or elliptical orbits, often with some combination of the two. We measure black hole masses of $\log_{10}(M_{\rm\,BH}/M_\odot)=6.62^{+0.10}_{-0.13}$ for Arp 151, $7.42^{+0.26}_{-0.27}$ for Mrk 1310, $7.51^{+0.23}_{-0.14}$ for NGC 5548, $6.42^{+0.24}_{-0.18}$ for NGC 6814, and $6.99^{+0.32}_{-0.25}$ for SBS 1116+583A. The $f$ factors measured individually for each AGN are found to correlate with inclination angle, although not with $M_{\rm\,BH}$, $L_{5100}$, or FWHM/$\sigma$ of the emission line profile.
  • Many inference problems involve inferring the number $N$ of components in some region, along with their properties $\{\mathbf{x}_i\}_{i=1}^N$, from a dataset $\mathcal{D}$. A common statistical example is finite mixture modelling. In the Bayesian framework, these problems are typically solved using one of the following two methods: i) by executing a Monte Carlo algorithm (such as Nested Sampling) once for each possible value of $N$, and calculating the marginal likelihood or evidence as a function of $N$; or ii) by doing a single run that allows the model dimension $N$ to change (such as Markov Chain Monte Carlo with birth/death moves), and obtaining the posterior for $N$ directly. In this paper we present a general approach to this problem that uses trans-dimensional MCMC embedded within a Nested Sampling algorithm, allowing us to explore the posterior distribution and calculate the marginal likelihood (summed over $N$) even if the problem contains a phase transition or other difficult features such as multimodality. We present two example problems, finding sinusoidal signals in noisy data, and finding and measuring galaxies in a noisy astronomical image. Both of the examples demonstrate phase transitions in the relationship between the likelihood and the cumulative prior mass, highlighting the need for Nested Sampling.
  • Reverberation mapping (RM) is an important technique in studies of active galactic nuclei (AGN). The key idea of RM is to measure the time lag $\tau$ between variations in the continuum emission from the accretion disc and subsequent response of the broad line region (BLR). The measurement of $\tau$ is typically used to estimate the physical size of the BLR and is combined with other measurements to estimate the black hole mass $M_{\rm BH}$. A major difficulty with RM campaigns is the large amount of data needed to measure $\tau$. Recently, Fine et al (2012) introduced a new approach to RM where the BLR light curve is sparsely sampled, but this is counteracted by observing a large sample of AGN, rather than a single system. The results are combined to infer properties of the sample of AGN. In this letter we implement this method using a hierarchical Bayesian model and contrast this with the results from the previous stacked cross-correlation technique. We find that our inferences are more precise and allow for more straightforward interpretation than the stacked cross-correlation results.
  • The long-standing assumption that the stellar initial mass function (IMF) is universal has recently been challenged by a number of observations. Several studies have shown that a "heavy" IMF (e.g., with a Salpeter-like abundance of low mass stars and thus normalisation) is preferred for massive early-type galaxies, while this IMF is inconsistent with the properties of less massive, later-type galaxies. These discoveries motivate the hypothesis that the IMF may vary (possibly very slightly) across galaxies and across components of individual galaxies (e.g. bulges vs discs). In this paper we use a sample of 19 late-type strong gravitational lenses from the SWELLS survey to investigate the IMFs of the bulges and discs in late-type galaxies. We perform a joint analysis of the galaxies' total masses (constrained by strong gravitational lensing) and stellar masses (constrained by optical and near-infrared colours in the context of a stellar population synthesis [SPS] model, up to an IMF normalisation parameter). Using minimal assumptions apart from the physical constraint that the total stellar mass within any aperture must be less than the total mass within the aperture, we find that the bulges of the galaxies cannot have IMFs heavier (i.e. implying high mass per unit luminosity) than Salpeter, while the disc IMFs are not well constrained by this data set. We also discuss the necessity for hierarchical modelling when combining incomplete information about multiple astronomical objects. This modelling approach allows us to place upper limits on the size of any departures from universality. More data, including spatially resolved kinematics (as in paper V) and stellar population diagnostics over a range of bulge and disc masses, are needed to robustly quantify how the IMF varies within galaxies.
  • We present and implement a probabilistic (Bayesian) method for producing catalogs from images of stellar fields. The method is capable of inferring the number of sources N in the image and can also handle the challenges introduced by noise, overlapping sources, and an unknown point spread function (PSF). The luminosity function of the stars can also be inferred even when the precise luminosity of each star is uncertain, via the use of a hierarchical Bayesian model. The computational feasibility of the method is demonstrated on two simulated images with different numbers of stars. We find that our method successfully recovers the input parameter values along with principled uncertainties even when the field is crowded. We also compare our results with those obtained from the SExtractor software. While the two approaches largely agree about the fluxes of the bright stars, the Bayesian approach provides more accurate inferences about the faint stars and the number of stars, particularly in the crowded case.
  • The prominent broad Fe II emission blends in the spectra of active galactic nuclei have been shown to vary in response to continuum variations, but past attempts to measure the reverberation lag time of the optical Fe II lines have met with only limited success. Here we report the detection of Fe II reverberation in two Seyfert 1 galaxies, NGC 4593 and Mrk 1511, based on data from a program carried out at Lick Observatory in Spring 2011. Light curves for emission lines including H-beta and Fe II were measured by applying a fitting routine to decompose the spectra into several continuum and emission-line components, and we use cross-correlation techniques to determine the reverberation lags of the emission lines relative to V-band light curves. In both cases the measured lag (t_cen) of Fe II is longer than that of H-beta, although the inferred lags are somewhat sensitive to the choice of Fe II template used in the fit. For spectral decompositions done using the Fe II template of Veron-Cetty et al. (2004), we find t_cen(Fe II)/t_cen(H-beta) = 1.9+-0.6 in NGC 4593 and 1.5+-0.3 in Mrk 1511. The detection of highly correlated variations between Fe II and continuum emission demonstrates that the Fe II emission in these galaxies originates in photoionized gas, located predominantly in the outer portion of the broad-line region.
  • We present dynamical modeling of the broad line region (BLR) in the Seyfert 1 galaxy Mrk 50 using reverberation mapping data taken as part of the Lick AGN Monitoring Project (LAMP) 2011. We model the reverberation mapping data directly, constraining the geometry and kinematics of the BLR, as well as deriving a black hole mass estimate that does not depend on a normalizing factor or virial coefficient. We find that the geometry of the BLR in Mrk 50 is a nearly face-on thick disk, with a mean radius of 9.6(+1.2,-0.9) light days, a width of the BLR of 6.9(+1.2,-1.1) light days, and a disk opening angle of 25\pm10 degrees above the plane. We also constrain the inclination angle to be 9(+7,-5) degrees, close to face-on. Finally, the black hole mass of Mrk 50 is inferred to be log10(M(BH)/Msun) = 7.57(+0.44,-0.27). By comparison to the virial black hole mass estimate from traditional reverberation mapping analysis, we find the normalizing constant (virial coefficient) to be log10(f) = 0.78(+0.44,-0.27), consistent with the commonly adopted mean value of 0.74 based on aligning the M(BH)-{\sigma}* relation for AGN and quiescent galaxies. While our dynamical model includes the possibility of a net inflow or outflow in the BLR, we cannot distinguish between these two scenarios.
  • We present gravitational lens models for 20 strong gravitational lens systems observed as part of the Sloan WFC Edge-on Late-type Lens Survey (SWELLS) project. Fifteen of the lenses are taken from paper I while five are newly discovered systems. The systems are galaxy-galaxy lenses where the foreground deflector has an inclined disc, with a wide range of morphological types, from late-type spiral to lenticular. For each system, we compare the total mass inside the critical curve inferred from gravitational lens modelling to the stellar mass inferred from stellar population synthesis (SPS) models, computing the stellar mass fraction f* = M(SPS)/M(lens). We find that, for the lower mass SWELLS systems, adoption of a Salpeter stellar initial mass function (IMF) leads to estimates of f* that exceed 1. This is unphysical, and provides strong evidence against the Salpeter IMF being valid for these systems. Taking the lower mass end of the SWELLS sample sigma(SIE) < 230 km/s, we find that the IMF is lighter (in terms of stellar mass-to-light ratio) than Salpeter with 98% probability, and consistent with the Chabrier IMF and IMFs between the two. This result is consistent with previous studies of spiral galaxies based on independent techniques. In combination with recent studies of massive early-type galaxies that have favoured a heavier Salpeter-like IMF, this result strengthens the evidence against a universal stellar IMF.
  • Supermassive black holes are believed to be ubiquitous at the centers of galaxies. Measuring their masses is extremely challenging yet essential for understanding their role in the formation and evolution of cosmic structure. We present a direct measurement of the mass of a black hole in an active galactic nucleus (Arp 151) based on the motion of the gas responsible for the broad emission lines. By analyzing and modeling spectroscopic and photometric time series, we find that the gas is well described by a disk or torus with an average radius of 3.99 +- 1.25 light days and an opening angle of 68.9 (+21.4, -17.2) degrees, viewed at an inclination angle of 67.8 +- 7.8 degrees (that is, closer to face-on than edge-on). The black hole mass is inferred to be 10^(6.51 +- 0.28) solar masses. The method is fully general and can be used to determine the masses of black holes at arbitrary distances, enabling studies of their evolution over cosmic time.
  • We present a general method to analyze reverberation mapping data that provides both estimates for the black hole mass and for the geometry and dynamics of the broad line region (BLR) in active galactic nuclei (AGN). Our method directly infers the spatial and velocity distribution of the BLR from the data, allowing us to easily derive a velocity-resolved transfer function and allowing for a self-consistent estimate of the black hole mass without a virial coefficient. We obtain estimates and reasonable uncertainties of the BLR model parameters by implementing a Markov Chain Monte Carlo algorithm using the formalism of Bayesian probability theory. We use Gaussian Processes to interpolate the the continuum light curve data and create mock light curves that can be fitted to the data. We test our method by creating simulated reverberation mapping data-sets with known true parameter values and by trying to recover these parameter values using our models. We are able to recover the parameters with realistic uncertainties that depend upon the variability of the AGN and the quality of the reverberation mapping campaign. With a geometry model we can recover the mean radius of the BLR to within ~0.1dex random uncertainty for simulated data with an integrated line flux uncertainty of 1.5%, while with a dynamical model we can recover the black hole mass and the mean radius to within ~0.05dex random uncertainty, for simulated data with a line profile average signal to noise ratio of 4 per spectral pixel. These uncertainties do not include modeling errors, which are likely to be present in the analysis of real data, and should therefore be considered as lower limits to the accuracy of the method.
  • We present the first high-resolution images of CSWA 31, a gravitational lens system observed as part of the SLUGS (Sloan Lenses Unravelled by Gemini Studies) program. These systems exhibit complex image structure with the potential to strongly constrain the mass distribution of the massive lens galaxies, as well as the complex morphology of the sources. In this paper, we describe the strategy used to reconstruct the unlensed source profile and the lens galaxy mass profiles. We introduce a prior distribution over multi-wavelength sources that is realistic as a representation of our knowledge about the surface brightness profiles of galaxies and groups of galaxies. To carry out the inference computationally, we use Diffusive Nested Sampling, an efficient variant of Nested Sampling that uses Markov Chain Monte Carlo (MCMC) to sample the complex posterior distributions and compute the normalising constant. We demonstrate the efficacy of this approach with the reconstruction of the group-group gravitational lens system CSWA 31, finding the source to be composed of five merging spiral galaxies magnified by a factor of 13.
  • We introduce a general Monte Carlo method based on Nested Sampling (NS), for sampling complex probability distributions and estimating the normalising constant. The method uses one or more particles, which explore a mixture of nested probability distributions, each successive distribution occupying ~e^-1 times the enclosed prior mass of the previous distribution. While NS technically requires independent generation of particles, Markov Chain Monte Carlo (MCMC) exploration fits naturally into this technique. We illustrate the new method on a test problem and find that it can achieve four times the accuracy of classic MCMC-based Nested Sampling, for the same computational effort; equivalent to a factor of 16 speedup. An additional benefit is that more samples and a more accurate evidence value can be obtained simply by continuing the run for longer, as in standard MCMC.
  • Bayesian methods are becoming more widely used in asteroseismic analysis. In particular, they are being used to determine oscillation frequencies, which are also commonly found by Fourier analysis. It is important to establish whether the Bayesian methods provide an improvement on Fourier methods. We compare, using simulated data, the standard iterative sine-wave fitting method against a Markov Chain Monte Carlo (MCMC) code that has been introduced to infer purely the frequencies of oscillation modes (Brewer et al. 2007). A uniform prior probability distribution function is used for the MCMC method. We find the methods do equally well at determining the correct oscillation frequencies, although the Bayesian method is able to highlight the possibility of a misidentification due to aliasing, which can be useful. In general, we suggest that the least computationally intensive method is preferable.
  • The globular cluster 47 Tucanae is well studied but it has many characteristics that are unexplained, including a significant rise in the velocity dispersion profile at large radii, indicating the exciting possibility of two distinct kinematic populations. In this Letter we employ a Bayesian approach to the analysis of the largest available spectral dataset of 47 Tucanae to determine whether this apparently two-component population is real. Assuming the two models were equally likely before taking the data into account, we find that the evidence favours the two-component population model by a factor of ~3x10^7. Several possible explanations for this result are explored, namely the evaporation of low-mass stars, a hierarchical merger, extant remnants of two initially segregated populations, and multiple star formation epochs. We find the most compelling explanation for the two-component velocity distribution is that 47 Tuc formed as two separate populations arising from the same proto-cluster cloud which merged <7.3 +/- 1.5 Gyr ago. This may also explain the extreme rotation, low mass-to-light ratio and mixed stellar populations of this cluster.
  • We demonstrate that the principle of maximum relative entropy (ME), used judiciously, can ease the specification of priors in model selection problems. The resulting effect is that models that make sharp predictions are disfavoured, weakening the usual Bayesian "Occam's Razor". This is illustrated with a simple example involving what Jaynes called a "sure thing" hypothesis. Jaynes' resolution of the situation involved introducing a large number of alternative "sure thing" hypotheses that were possible before we observed the data. However, in more complex situations, it may not be possible to explicitly enumerate large numbers of alternatives. The entropic priors formalism produces the desired result without modifying the hypothesis space or requiring explicit enumeration of alternatives; all that is required is a good model for the prior predictive distribution for the data. This idea is illustrated with a simple rigged-lottery example, and we outline how this idea may help to resolve a recent debate amongst cosmologists: is dark energy a cosmological constant, or has it evolved with time in some way? And how shall we decide, when the data are in?
  • The measured properties of stellar oscillations can provide powerful constraints on the internal structure and composition of stars. To begin this process, oscillation frequencies must be extracted from the observational data, typically time series of the star's brightness or radial velocity. In this paper, a probabilistic model is introduced for inferring the frequencies and amplitudes of stellar oscillation modes from data, assuming that there is some periodic character to the oscillations, but that they may not be exactly sinusoidal. Effectively we fit damped oscillations to the time series, and hence the mode lifetime is also recovered. While this approach is computationally demanding for large time series (> 1500 points), it should at least allow improved analysis of observations of solar-like oscillations in subgiant and red giant stars, as well as sparse observations of semiregular stars, where the number of points in the time series is often low. The method is demonstrated on simulated data and then applied to radial velocity measurements of the red giant star xi Hydrae, yielding a mode lifetime between 0.41 and 2.65 days with 95% posterior probability. The large frequency separation between modes is ambiguous, however we argue that the most plausible value is 6.3 microHz, based on the radial velocity data and the star's position in the HR diagram.