---
abstract: 'Recent additions to the population of Long-duration Gamma Ray Burst (LGRB) host galaxies with measured metallicities and host masses allow us to investigate how the distributions of both these properties change with redshift. We form a sample out to $z \lesssim 2.5$ which we show does not have strong redshift dependent populations biases in mass and metallicity measurements. Using this sample, we find a surprising lack of evolution in the LGRB metallicity distribution across different redshifts and in particular the fraction of LGRB hosts with relatively high-metallicity, that is those with 12+log(O/H) $\geq 8.4$, remains essentially constant out to $z=2.5$. This result is at odds with the evolution in the mass metallicity relation of typical galaxies, which become progressively more metal poor with increasing redshift. By converting the measured LGRB host masses and redshifts to expected metallicities using redshift appropriate mass-metallicity relations, we further find that the increase in LGRB host galaxy mass distribution with redshift seen in the [@Perley_shoals_masses] SHOALS sample is consistent with that needed to preserve a non-evolving LGRB metallicity distribution. However, the estimated LGRB host metallicity distribution is at least a quarter dex higher at all redshifts than the measured metallicity distribution. This corresponds to about a factor of two in raw metallicity and resolves much of the difference between the LGRB host metallicity cutoffs determined by [@diff_rate_letter] and [@Perley_shoals_masses]. As LGRB hosts do not follow the general mass metallicity relations, there is no substitute for actually measuring their metallicities.'
author:
- 'J. F. Graham$^{\hyperref[jfg]{1}}$'
- 'P. Schady$^{\hyperref[ps]{2},\hyperref[ops]{3}}$'
- 'A. S. Fruchter$^{\hyperref[af]{4}}$'
bibliography:
- 'XS\_paper.bib'
title: A Surprising Lack of LGRB Metallicity Evolution with Redshift
---

Introduction
============

Upon collecting the first samples of the galaxies hosting Long-soft Gamma-Ray Bursts (LGRBs) it was apparent that LGRBs occur in blue, highly starforming, and often irregular galaxies with a preponderance that clearly separated them from the general galaxy population [@Fruchter1999; @Fruchter; @LeFlochblue; @LeFlochblue2002; @Christensen; @LeFloch2006; @Savaglio]. The seminal work of [@Fruchter] compared the hosts of LGRBs with those of Core-Collapse Supernovae (CCSNe) found in the Great Observatories Origins Deep Survey (GOODS) and found that while half of the GOODs CCSNe occurred in grand design spirals (with the other half in irregulars), only one out of the 18 LGRB host galaxies of a comparable redshift distribution was in a grand design spiral. This comparison with SNe allowed [@Fruchter] to establish that this difference was beyond that expected from a sample of galaxies drawn randomly according to their rate of star formation.

As the Initial Mass Function (IMF) of blue irregular and spiral galaxies are thought to be largely similar [@Bastian], massive stellar progenitors should be just as available per unit star-formation in both galaxy types. However, the much smaller size of blue irregulars would suggest, due to the galaxy mass-metallicity relation [@Tremonti2004], that blue irregular galaxies are typically metal poor in comparison with grand design spirals. Thus [@Fruchter] postulated that LGRB formation is affected by the metallicity of their environments.

[@Stanek2007] showed that the very nearest LGRB hosts all have low metallicity when compared to similar magnitude galaxies in the Sloan Digital Sky Survey (SDSS). Furthermore, [@Kewley2007] found the LGRB host sample to be comparable to extremely metal-poor galaxies in luminosity-metallicity relation, star-formation rate (SFR), and internal extinction. [@Modjaz2008] dramatically strengthened this result by taking advantage of the fact that a broad-lined Type Ic (Ic-bl) supernova has been found underlying the light of nearly [@Thone2014] every LGRB in which a deep spectroscopic search was performed [@Cano2014; @HjorthBloom2012book; @Hjorth2013]. The fact that LGRBs nearly always are associated with a Type Ic-bl SNe would suggest that LGRB progenitors probably have similar masses to those of regular Type Ic-bl SNe, thus largely eliminating the possibility that the observed LGRB metallicity bias is somehow a byproduct of a difference in the initial stellar mass functions. [@Modjaz2008] showed that Ic-bl SNe with associated LGRBs are observed to occur in host galaxies with much lower metallicities than the hosts of Type Ic-bl SNe without associated LGRBs or the bulk of the star-forming galaxies in the SDSS. More recently [@Modjaz2019] has shown that Ic-bl in the local universe typically have low host metallicities essentially identical to LGRBs. (The [-@Modjaz2008] sample had a large number of SN found in directed surveys of nearby massive galaxies that may have produced this biased result.) However, beginning with LGRB 051022 [@conference_proceedings], some LGRBs were found to be located in host galaxies with a high metallicity (near-solar and above) but this accounted for only a small fraction of the LGRB population. The dramatic metallicity difference between both the star-formation weighted SDSS and non-engine driven SNe verses LGRB samples (including normal Type Ic, c.f. [@Modjaz2019] suggests a metallicity dependent step in either the formation of the gamma-ray jet or in its ability to escape the progenitor which has either burned or lost its outer hydrogen and helium layers [@Woosley1993; @Woosley; @Langer].

To understand how LGRBs seem to have a metallicity aversion despite the existence of counterexamples, [@stats_paper] compared the metallicity distribution of the hosts of LGRBs with that of the hosts of several similar indicators of star-formation: LGRBs, Type Ic-bl, and Type II SNe as well as with the metallicity distribution of star-formation in the general galaxy population of the local universe. [@stats_paper] found that three quarters of the LGRB host population have metallicities below 12+log(O/H) $<$ 8.6 (in the @KobulnickyKewley KK04 metallicity scale), while less than a tenth of local star-formation is at similarly low metallicities. However, the supernovae were statistically consistent with the metallicity distribution of star-formation in the general galaxy population. While the LGRB sample did extend to higher redshifts than the other populations the observed metallicity difference was far too great to be a product of metallicity evolution. [@stats_paper] concluded that a low metallicity environment must be a fundamental component of the evolutionary process that forms LGRBs.

[@diff_rate_letter] expanded on the analysis of [@stats_paper] by comparing the metallicity distribution of LGRB host galaxies to the that of star forming galaxies in the local universe. By effectively dividing one distribution by the other, [@diff_rate_letter] was able to directly determine the relative rate of LGRB formation as a function of metallicity in the low-redshift universe. They found a dramatic cutoff in the LGRB formation rate per unit star-formation above a metallicity of $ {\rm log(O/H)}+12 \approx 8.3 $ (in the @KobulnickyKewley scale), with LGRBs forming between ten and fifty times more frequently per unit star-formation below this cutoff than above.

[@xshooter_survey] performed a detailed analysis of 96 LGRB host galaxies with ESO Very Large Telescope (VLT) X-Shooter emission-line spectroscopy, providing the largest spectroscopic sample of LGRB host galaxies and comprising most of the publicly available data at the time. [@xshooter_survey] finds that at z $<$ 1 $\sim$20% of their LGRB host galaxies have super-solar metallicities a result comparable with [@stats_paper]. [@xshooter_survey] concludes that the properties of LGRB hosts can be explained by the tendency of LGRB events to avoid metal-rich environments.

[@Vergani2015] estimated the host stellar masses of the 14 z $<$ 1 BAT6 [@BAT6] host galaxies via spectral energy distribution (SED) fitting and found that those LGRBs tend to avoid massive galaxies in preference for faint low-mass star-forming galaxies typically below galaxy survey completeness limits. [@Vergani2015] estimates that with a metallicity threshold in LGRB production (of between $\frac{1}{3}$ to $\frac{1}{2}$ solar) the typical galaxy mass distribution would then reproduce that of the LGRB host galaxy population (i.e. primarily a reduction in the high-mass end of the distribution).

In a similar analysis, [@Perley_shoals_masses] used Spitzer rest-frame near-IR (NIR) luminosity observations to calculate masses for 82 LGRB host galaxies from the Swift GRB Host Galaxy Legacy Survey (SHOALS) and also use the distribution of these masses to estimate a metallicity threshold. However [@Perley_shoals_masses] estimates the metallicity threshold to be much higher at “approximately the solar value." They also find that dust-obscured LGRBs dominate the massive host population while little dust is seen in low-mass hosts and that host metallicity has little impact on LGRB production at z $>$ 1.5 while preventing most LGRB events at lower redshifts.

Here (in [first@refmzd,@]{}) we will fully exploit the new larger emission-line metallicity LGRB host galaxy sample of [@xshooter_survey] (in concert with the @stats_paper sample) to examine how the LGRB metallicity distribution changes with redshift. First however (in [first@refzd,@]{}) we will analyze and address the redshift biases of the different LGRB populations as this is necessary to validate our samples. Also (in [first@refemzd,@]{}), in order to test the validity in the general approach of using galaxy mass to estimate LGRB host metallicities, we will compare our observed LGRB metallicity distributions (as a function of redshift) with the expected metallicity distribution for galaxies with the mass and redshift the LGRB population. Our results are summarized in [first@refResults\_Summary,@]{}, and in [first@refDiscussion,@]{} we discuss some possible explanations for what we see.

Methods
=======

Sample selection
----------------

### Host Metallicities {#Host_Metallicities}

The vast majority of LGRB host galaxy emission-line metallicity measurements are contained in either the [@stats_paper] sample or the X-Shooter observations compiled in [@xshooter_survey]. The objects of the later sample are heavily dominated by observations of [@TOUGH]: The Optically Unbiased Gamma-Ray Burst Host Survey (TOUGHS) during the time period when TOUGHS was ongoing. TOUGHS is a homogeneous sample of 69 [*Swift*]{} GRB hosts selected via their bursts high-energy properties and locations on the sky and not dependent on the optical properties of the galaxies observed. [@xshooter_survey] was able to obtain hosts metallically measurements for about 3 times as many objects as the previous sample of [@stats_paper] yielding a combined sample (after removing duplicates and constantly recalculating the metallicities) of 45 objects (see [first@refxsd\_data\_table,@]{}). Furthermore X-Shooter’s integrated IR spectroscopic channel extends the redshift overage of the LGRB host metallically sample out to [*z*]{} = 2.47[^1]. In combination [@xshooter_survey] and [@stats_paper] provide a sample of sufficient size and redshift range to allow division into different redshift bins as necessary to study the evolution of the LGRB metallically distribution with redshift as we will do here.

Two objects overlap between the samples (LGRBs 050824 and 051022) whose measured metallicity values differ by 0.23 and 0.31 dex between the [@stats_paper] and [@xshooter_survey] estimates respectively. In the combined sample the duplication has been removed and the flux measurements from the [@xshooter_survey] spectroscopy used. \[dupout\] We standardize on the [@xshooter_survey] spectroscopy because they publish errors on their line flux values whereas the LGRB 050824 line fluxes of [@Sollerman2007] (used in @stats_paper) and the LGRB 051022 line fluxes of [@Levesque2] do not. Furthermore the [@stats_paper] metallically for LGRB 051022 was determined from equivalent width observations [@conference_proceedings], not line flux values, which while an established technique [@KobulnickyPhillips], introduces an difference in method that we can easily avoid here. Note that the metallicity values and relative measured line fluxes for the host of LGRB 051022 have previously been noted as being significantly different between the various observations mentioned above, potentially due to as yet unresolved differences in the metallicity across the galaxy [@obs_paper]. We have removed LGRB 020819B from our combined sample due to the revised host galaxy association of [@Perley020819B] and the poor metallicity constraint on the now correctly associated host galaxy.

### Host Masses

While neither the [@stats_paper] or [@xshooter_survey] provide host galaxy masses or even have the required IR observations required for such mass measurements, the [@Perley_shoals_masses] SHOALS sample does. Unfortunately the [@Perley_shoals_masses] SHOALS sample has a paucity of objects at low redshift (only 3 at z $<$ 0.5) so we supplement it with the [@Svensson] population which is predominately at z $<$ 1 and also has mass values based on deep IR observations. Two objects overlap between the samples (LGRBs 060218 and 080319B) whose log masses differ by 0.24 and -0.43 between the [@Svensson] and [@Perley_shoals_masses] estimates respectively. In our combined sample the duplication has been removed and the [@Perley_shoals_masses] values used.

Metallicity Determination {#Metallicity_Determination}
-------------------------

Here we use metallicities determined via the R$_{23}$ diagnostic in the [@KobulnickyKewley] (KK04) scale. The R$_{23}$ method is the primary metallicity diagnostic for galaxies at $z>0.3$ (especially those where the faint \[O III\] 4363 [Å]{} line is not measurable). The R$_{23}$ diagnostic is based on the electron temperature sensitivity of the oxygen spectral lines, achieved via using the ratio of the oxygen line strength to a spectral feature independent of metallicity. R$_{23}$ requires measurement of the 3727 [Å]{} \[O II\], 5007 [Å]{} \[O III\], and H$\beta$ lines.\[metal\_lines\] However as the Oxygen line strength initially increases with and then (due to infrared fine-structure lines inducing a cooling effect) decreases with increasing metallicity this method alone is only sufficient to determine a pair of degenerate upper and lower branch metallicity values. Therefore the R$_{23}$ diagnostic is typically coupled with a second metallicity diagnostic to resolve this degeneracy. Typically, and specifically for all the objects in this paper, this is done using the \[N II\] / H$\alpha$ diagnostic requiring spectral coverage of the 6584 [Å]{} \[N II\] to H$\alpha$ line ratio (or its limit). While the \[N II\] / H$\alpha$ diagnostic is not nearly as precise as R$_{23}$ it is sufficient to exclude one of the R$_{23}$ branches except when the branches are near their intersection point where the metallicity values of the two branches converge anyway.

Due to differences between metallicity diagnostics and their various calibrations, a comparison of metallicity values requires that they be determined using as consistent a method as possible. Therefore we recalculate the [@xshooter_survey] metallicities, from their published flux values, to give R$_{23}$ metallicity values in the KK04 scale, using the exact same code as used to determine the metallicities given in [@stats_paper]. The measured metallicity values used in this work are given in [first@refxsd\_data\_table,@]{}.

Specifically to calculate metallicities we, as in [@stats_paper], employ an improved version of the idl code outlined in [@kd2002] which has been updated to the KK04 scale developed in [@KobulnickyKewley]. In order to correlate the flux of a line belonging to an individual atomic ionization level with the total abundance of that element it is necessary to know what fraction of the element is ionized to the level in question. This is achieved by measuring the flux ratio between the \[O II\] and \[O III\] line strength, giving the relative population in the O II and O III ionization states, and fitting the metallicity for that specific ionization state ratio. In the classical application of this diagnostic, an R$_{23}$ value would be calculated from the measured line ratios (using $R_{23} = {I_{3727} + I_{4959} + I_{5007} \over I_{H\beta}}$) and then compared along an \[O III\] to \[O II\] line ratio contour against the best calibration data available. This classical application however treats ionization as a parameter independent of metallicity and ignores the feedback the latter has on the former. [@kd2002] solve this issue by using iterative fitting to dynamically factor the effects of the metallicity on the ionization parameter.[^2]

Distribution Analysis
---------------------

One of the most powerful tools for understanding the behavior of GRBs (and SNe) is to study the distribution of such events with respect to a physical property. [@Fruchter] compared the location distribution of LGRB and ccSNe events on their host galaxies with the distribution of the blue light in their hosts. The result was that, while core collapse supernovae follow the blue light distribution of their host galaxies, LGRBs showed a strong preference for occurring in the brightest regions of their hosts. This suggested that, while ccSNe are unbiased tracers of the available star-formation, LGRBs likely favor very massive progenitors which are concentrated in the most star forming regions of their host galaxies. [@Stanek2007] compared the metallicity distribution of LGRBs and SDSS galaxies to show that nearby LGRB hosts have low metallicities when compared to similar magnitude Sloan galaxies.

These methods employ normalized cumulative evenly spaced step-functions to track the distributions of the objects. This approach works well for objects such as LGRBs and SNe whose detection is proportionate to their event rate. Galaxy samples however have massive Malmquist biases and the individual galaxies are themselves dissimilar. To allow for direct meaningful comparison between the metallicity distribution of LGRBs and galaxies [@stats_paper] first converted the SDSS to a volume limited sample with a tight redshift cut and then weighted the galaxies by their star-formation rate. The result was a weighted step-function for the galaxy population with a varying step height. The LGRBs showed a strong preference for low metallicities while the SNe populations tracked the star-formation weighted volume limited galaxy sample.

Here we are tasked with the need to compare a variety of different LGRB populations (composted of LGRB samples with different measured physical properties) to exclude redshift dependent selection biases from contaminating our further analysis. Normalized cumulative distribution plots would ordinarily be ideal for such a task except that the differing physical properties have different redshift ranges where they can be observed and different rates of observation (e.g. metallicity measurement requires spectroscopy of certain lines thus having redshift limitations and spectroscopy is an expensive use of telescope time). To examine the extent to which the samples we consider in this paper suffer from different selection effects we therefore employ a cumulative distribution plot with a manual weighting for each population so as to scale the populations to an arbitrary level at a designated redshift. In this work, we will adopt [*z*]{} of 2.5 for such a designated redshift as it is the approximate end of the redshift range for which we have metallicity measurements. For populations that do not reach the designated redshift we scale the weighting to achieve the best congruence with the other populations. We also adjust the weightings of all the populations as needed to favor a common congruence.

This is a manual process, as the goal is to produce a distribution plot where deviation of congruence is reflective of redshift dependent selection biases. While a program to estimate a scaling values that minimizes the area between two curves could be used instead, the advantage of doing the scaling by hand it that when the samples agree to a point and then diverge this can be shown in a physically meaningful way. This human touch allows for choosing scaling values that work sensibly, and where a best fit area minimizing value is not ideal for comparison, the author can adjust accordingly. The the graphical manually scaled approach allows us to know where biases are present in our data, and after achieving an understanding of their causes we can estimate their effects on our analysis.

One critical limitation of this process is it requires having redshift data and is therefore insensitive to biases in measuring the redshifts of our targets. To attempt to correct for this we also include a similar scaling of a theoretical LGRB distribution using the results of [@form_rate_letter]. Since we cannot exclude a redshift bias in the [@form_rate_letter] results (i.e. inducing an error in the metallicity evolution history of the universe) this is not a perfect solution (see Footnote ).

We then also use normalized cumulative distribution plots with a uniform step height to track the metallicity distribution of LGRB hosts within various redshift bins. This ability to break the sample into different redshift bins is enabled by the enlarged LGRB host metallicity galaxy population, however this analytical method has been used previously.

Analysis of Sample Redshift Distributions {#zd}
=========================================

Before we can explore the metallicity distribution of LGRBs as a function of redshift we need to account for completeness of our sample population. Given the nature of this sample as a completion of observations from many different observing programs, each with different sample criteria, luminosity biases, available per object observing time, and science goals, an a priori assessment is not practical. We can however annualize the effect of redshift on the completeness of the differing LGRB populations. To achieve this we cumulatively plot the redshifts of the different LGRB populations. In a typical cumulative distributions plot we would normalize the populations so as to allow for comparison of populations with different numbers of objects. Here however we are faced with some samples with a redshift range that ends far before others (and the end of the range plotted). We also have other samples with additional selection effects apparent only at high redshifts. Therefore, instead of normalizing the distributions to unity we scale each population by a unique arbitrary factor so as to produce distributions consistent with each other. As we will later focus on analyzing the LGRB metallicity distribution we thus chose to scale our populations to the [@xshooter_survey] metallicity distribution (thus using the larger of our metallicity samples as a baseline).

The degree of scaling is not of particular interest as it merely indicates the relative number of objects in the populations (out to their redshift limit) which tracks general trends in the degree of observational followup (i.e. $\sim$$\frac{1}{5}$ of LGRBs with spectroscopic redshifts have measured metallicities). Thus were a population of LGRBs to exist with exactly the same distribution as [@xshooter_survey] but with half the number of objects it would be given a scaling factor of 2 (as @xshooter_survey has an a priori scaling factor of 1).

What is of interest in this analysis are any differences in the distributional shape between the different populations. Differences in slope indicate redshift dependent biases between the populations, sharp changes within a population’s slope reveal discontinuities in that population’s rate of observation with redshift, and gradual changes show the differences in that population’s rate of observation due to the expanding number of objects out to that redshift balanced by their increasing difficulty of observation. Thus by comparing populations of galaxies with different observed properties we can thus identify redshift biases in how samples of those properties are collected and measured.

To investigate the potential of redshift dependent sample biases on our metallicity distributions we therefore compare the following populations for the described reasons:

-   We begin by plotting the redshift distributions of the LGRB host galaxy populations for which we have host metallicity measurements. Since [@xshooter_survey] has approximately three times as many objects, we use this as the numeric baseline and scale the sample of [@stats_paper] by a factor of 0.7 to match.

-   To address concerns about a metallicity dependent redshift bias we also plot the subset of [@xshooter_survey] hosts with metallicities above solar. As this is only about a third of the total [@xshooter_survey] host population, it is scaled by a factor of three. We also plot the subset of [@xshooter_survey] hosts with metallicities above $ {\rm log(O/H)}+12 > 8.4 $ (KK04 scale) so as to sample only objects clearly above the $ {\rm log(O/H)}+12 \approx 8.3 $ metallicity cutoff noted in [@diff_rate_letter]. Similar high metallicity subsets of the [@stats_paper] sample is omitted due to its small size of only two and four objects (after the removal of LGRB 020819B).

-   To address concerns about a bias in which objects have the lines needed for metallicity measurement we plot the entire [@xshooter_survey] host population including the objects without a metallicity. Since metallicity measurement requires a specific set of lines whereas redshift measurement requires only a single identified line (in practice any two lines is used to identify both the lines and the redshift) this provides an immediate crosscheck on observational biases in line measurement. As including [@xshooter_survey] objects with redshift but not metallicity makes an approximate 50% increase in the sample size (at z $<$ 2.5 before the slope noticeably changes) we scale it down by a factor of $\frac{2}{3}$. As the slope of this, and some other distributions, noticeably changes at z $\approx$ 2.5, and since z $\approx$ 2.5 is the limit of the redshift range for which we have measured metallicities, we adopt this redshift, along with the matching ordinate of this distribution (a value of $\sim$60), as the reference point for scaling the remaining distributions.

-   Next we compare it with the general burst population by plotting all known LGRB host galaxy redshifts as conveniently complied in the GRB table of Jochen Greiner[^3] (excluding for this and all other samples those objects with no or only photometric redshifts), as of UTC noon March 15^th^ 2019. As this sample is undoubtably subject to a variety of complex selection effects, its use provides a reasonable assessment of the degree that such unmitigated effects have on our analysis. Again and subsequently the sample is scaled to match the other distributions.

-   To address biases in host redshift measurement as a function of redshift itself, we plot the [@Perley_shoals_masses] SHOALS and [@BAT6] BAT6 samples, which claim to be unbiased in their selections. We also plot the Optically Unbiased Gamma-Ray Burst Host Survey (TOUGHS) sample updated using all currently known spectroscopically determined redshift values for objects from that sample. TOUGHS is an attempt to provide a host sample which is not biased by host absorption of the optical afterglow of the LGRB. Of the 69 [*Swift*]{} GRB hosts we find 58 of them have exact redshift values. We note that one of the missing redshifts is due to a bright foreground star and can thus be excluded from the sample without introducing any biases, giving the TOUGHS redshift sample an 85% effective completeness.

-   To also sample bias in host galaxy mass measurement we plot the subset of [@Perley_shoals_masses] SHOALS galaxies with mass values (excluding limits) as well as the sample of [@Svensson].

We also consider a theoretical curve for the LGRB event rate. [@form_rate_letter] estimated the LGRB progenitor rate using the [@diff_rate_letter] results in concert with SNe statistics via an approach patterned loosely off the Drake equation. Beginning with the cosmic star-formation history, [@form_rate_letter] took the expected number of broad-line Type Ic events that are in low metallicity host environments as potential LGRB progenitor candidates. They then adjusted this number by adding the contribution of broad-line Type Ic SNe in high metallicity host environments at a much reduced weighting of $\sim$$\frac{1}{30}$ (the @diff_rate_letter estimate on the relative suppression of LGRB formation in high metallicity environments). A comparison of this estimate of potential LGRB progenitor candidates to the observed LGRB rate corrected for instrumental selection effects (estimated by @Lien and @Graff), provided a combined estimate of the fraction of broad-line Type Ic SNe residing in metal poor environments that produce an LGRB and the fraction of such LGRBs that are beamed in our direction. Thus [@form_rate_letter] estimated that, in a low metallically environment, an aligned LGRB occurs out of approximately every 4000 $\pm$ 2000 broad-lined Type Ic Supernovae. Therefore if one assumes a semi-nominal beaming factor of 100 then 1 out of $\sim$40 low metallicity Ic-bl SNe give rise to an LGRB.

Using the process described above, we derive an expected LGRB event rate as follows: Beginning with the cosmic star-formation rate history of [@hb] and the [@form_rate_letter] estimates of the metallicity distribution of the universe as a function of redshift we obtain an estimate of the amount of star-formation above and below the [@diff_rate_letter] metallicity cutoff. The expected number of LGRBs formed is thus estimated after applying the [@diff_rate_letter] estimate of the effect of metallicity on the LGRB formulation rate per unit of available star-formation. The result is an expected LGRB event rate as a function of redshift which can then be scaled in the same manner as the observed LGRB populations described previously.

![\[redshift\_distribution\] The redshift distribution of various LGRB samples scaled as labeled such that the distributions are approximately 60 at redshift 2.5 which provides reasonable agreement across the lower redshift range. The purpose of this plot is to compare the redshift distributions of different LGRB samples and find any discrepancies beyond that different samples have a different total number of objects. Note that the @stats_paper (GF13) sample (thick black line in the inset plot) has a lower rate of observations beyond [*z*]{} of $\sim$0.5 because an IR spectrum is required with a different instrument in addition to the optical spectrum. This is not seen in the [@xshooter_survey] sample because X-shooter obtains optical and IR spectra in unison. However a gap is seen in the X-shooter metallicity sample (both the total sample and its high metallicity sub-sample) from 1.7 $<$ [*z*]{} $<$ 2.1 due to observational difficulties in obtaining all the lines needed for metallicity measurement (see text). As measuring the redshift does not require observing specific lines this gap is not seen in the [@xshooter_survey] redshift sample. We also compare these LGRB samples with our predicted LGRB rate estimate from @form_rate_letter (thick grey line) and find it to be in good agreement with the samples at [*z*]{} $<$ 2.5 and with the [@Perley_shoals_masses] SHOALS sample in particular at higher redshifts. KS test results for the lines in this figure are shown in [first@refLGRB\_num\_stat\_KS\_table,@]{} in the appendix. Note that the super solar metallicity LGRB sample follows the same distribution as the general LGRB sample, which suggests both that the metallicity of the LGRB hosts does not bias the likelihood of their metallicity being measured and that evolution LGRB host metallicity has a negligible effect up to z $\sim$ 2 which is consistent with the results of [first@refmzd,@]{}.](LGRB_num_stat_single.pdf){width=".49\textwidth"}

Rather surprisingly, as shown in [first@refredshift\_distribution,@]{}, we find that there does not appear to be any particularly significant differences in the redshift distributions of the different LGRB samples aside from the following:

1.  [@stats_paper] sample shows a considerably reduced rate of LGRB observation at redshifts high enough ([*z*]{} $\gtrsim$ 0.5) to require a separate IR spectrograph to observe some of the lines required for determining a metallicity. As X-Shooter contains an integrated IR spectrograph, the [@xshooter_survey] sample is not subject to this effect.

2.  The [@xshooter_survey] metallicity sample has a gap from 1.7 $\lesssim$ [*z*]{} $\lesssim$ 2.1 which is due to a confluence of observational limitations. The \[O II\] 3727 [Å]{} is redshifted to the optical IR transition at about 1 micron, the 4861 [Å]{} H$\beta$ and 4959 & 5007 [Å]{} \[O III\] lines are redshifted to a region of poor sky transmittance between J and H bands, and 6563 [Å]{} H$\alpha$ is redshifted into a similar low transmittance region between the H and K bands. We also find a smaller gap from 1.0 $\lesssim$ [*z*]{} $\lesssim$ 1.2 due to similar effects. Both the full metallicity sample and high metallicity sub-sample from [@xshooter_survey] are affected by these redshift gaps since both of these samples share the same redshift distributions as expected since the cause of this gap is not dependent on the metallicity of the objects. However this gap in the [@xshooter_survey] metallicity sample is not seen in the [@xshooter_survey] redshift sample as any distinct combination of emission lines is sufficient to identify the redshift. After correcting for this gap (i.e. artificially scaling the post gap metallicity sample lines back up to the other distributions) the metallicity populations continue to track the other distributions for the (limited) remainder of their redshift ranges. Strangely we also find similar gaps in the TOUGHS redshift sample from 1.06 $\lesssim$ [*z*]{} $\lesssim$ 1.26 and 1.56 $\lesssim$ [*z*]{} $\lesssim$ 1.88 with an approximate respective 2 and 4 sigma significance above the mean z $<$ 2.5 redshift spacing. Given the construction of the TOUGHS sample these gaps are unexpected and puzzling. It is conceivable that this gaps are a result of the same difficulties in observing certain lines as in the metallicity samples, however as any two lines are sufficient for determining a redshift it remains odd that this would be the explanation here.

3.  The samples diverge at [*z*]{} $\gtrsim$ 2.5 due to different completeness rates for high redshift objects. As this is beyond the redshift range of our host metallicity sample, it does not impact our subsequently metallicity distribution analysis. It is worth noting that the [@Perley_shoals_masses] SHOALS sample does not show a change of slope in these regions unlike the other samples and instead agrees quite closely with our predicted LGRB event rate curve from the [@form_rate_letter] formulation. Since the BAT6 sample is flux limited, as they go higher in redshift, their sensitively to the lower end of the GRB luminosity function decreases. This results in an underrepresentation of high redshift objects, which is consistent with the underrepresentation in the sample of all LGRBs with spectroscopically measured redshifts (private communications). Given that the BAT6 sample tracks the Greiner table sample of all known LGRB redshifts after the [*z*]{} $\sim$ 2.5 diverge point with the other samples, this suggests that the “variety of complex selection effects” in the full LGRB redshift sample is dominated by the same flux limited selection effect as the BAT6 sample. The difference in slope between the [@xshooter_survey] redshift sample and the BAT6 and Greiner table samples reflects the increasing fractional usage of absorption line redshift measurements at high redshifts while [@xshooter_survey] is strictly a sample of objects with emission lines.

While the enumerated effects noted above are of some interest they appear relatively minor and should not introduce any significant biases in the overall focus of this paper: the comparison of how the LGRB host metallicity distribution varies as a function of redshift. However, if the LGRB host metallicity distribution where to extend past [*z*]{} $\sim$ 2.5 then biases introduced via effect 3 would require special attention.

KS Analysis of Redshift Distributions
-------------------------------------

To analyze the differences in the redshift distributions of our samples more rigorously we calculate Kolmogorov–Smirnov (KS) probabilities comparing all of our samples with each other in [first@refLGRB\_num\_stat\_KS\_table,@]{}. To address the issues noted above we introduce some additional subsets of our samples as follows. (1) We subdivide the [@stats_paper] sample into objects with z $<$ 0.5 and z $>$ 0.5 so as to assess the fit of the sample with and without the application of a separate IR spectrograph. (2) We subdivide the [@xshooter_survey] metallicity sample and the $ {\rm log(O/H)}+12 > 8.4 $ subset into objects with z $<$ 2 and z $>$ 2 so as to allow us to assess the fit of the sample without the gap at z $\approx$ 2. For the same reason, we also add a z $<$ 2 [@xshooter_survey] super solar metallicity sample but can not add a matching super solar metallicity z $>$ 2 sample as we have fewer than 4 such objects. (3) For all samples that extend to z $>$ 2.5 we add a subset of values with z $<$ 2.5 to compare only those regions before the z $>$ 2.5 divergence.

To compare with the our [@form_rate_letter] based theoretical curve for the LGRB event rate, we create a simulated population of about 3000 objects using an appropriately weighted random generation approach. Specifically we create a redshift array corresponding to million year increments since [*z*]{} = 4. We then calculate an LGRB rate estimate for each redshift normalized such that the maximum value at any redshift is 1. Then we exclude bins where the rate estimate is lower than a random number, unique for each redshift, uniformly distributed in the 0 to 1 range. The result is a set of redshifts with the same distribution as expected for the theoretical LGRB event rate. This simulated population is then treated like any other population for the KS analysis.

Calculating KS values for comparison has the notable advantage that the values do not need to be scaled but can be compared directly (therefore the scaling factors from [first@refredshift\_distribution,@]{} are not used in the KS analysis). Critical to our KS analysis is that samples must be matched across a common redshift range. To achieve this, for any two samples being compared, we take the sample with the smallest redshift range, set a redshift cutoff at 0.05 [*z*]{} higher than the highest redshift in that sample, and remove all objects (in the other sample) with redshifts above this cutoff. (This additional 0.05 [*z*]{} redshift grace allows us to utilize both samples in full if their maximum redshifts are similar, otherwise one sample would always have its highest redshift object removed.) Samples are compared without a lower redshift cut, unless a lower redshift range is specified for the sample, in which case the same process is used but in reverse (again with a 0.05 [*z*]{} grace). Since some samples are redshift subsets of others, and the redshift ranges are matched, some comparisons will be of a set of objects with itself, those are thus marked as having a KS probability of “1" (values of “1.0000" are the result of rounding). Some comparisons have fewer than the 4 objects in each sample needed for the KS test and are marked as NaN. The KS values calculated for the populations shown in [first@refredshift\_distribution,@]{} are given in [first@refLGRB\_num\_stat\_KS\_table,@]{} in the appendix.

This consistency of redshift distributions between different LGRB samples, aside from the perviously enumerated effects, suggests that there are no unknown significant deviations in the redshift completeness of our sample (at least that correlate with redshift) and that we have a good understanding of the causes for the deviations that are present. The consistency with our theoretical curve further suggests that the observed populations are unbiased and that there are unlikely to be effects caused by systematic biasing in population of all LGRB with spectroscopically measured redshifts.\[rate\_feedback\_bias\][^4]

Metallicity Distribution as a Function of Redshift {#mzd}
==================================================

![image](Measured_2_pane.pdf){width="100.00000%"}

We begin, in [first@refmeasured,@]{} left, with a standard normalized cumulative metallicity distribution plot of LGRBs with measured host metallicities divided across five redshift bins with a width of 0.5 [*z*]{}. This gives a series of 5 distributions for the [@xshooter_survey] and 2 for the [@stats_paper] samples (since all objects in the latter sample are [*z*]{} $<$ 1). A distribution for both the @stats_paper & @xshooter_survey samples across all redshifts is also provided for reference. The [@xshooter_survey] [*z*]{} $<$ 0.5 and both the [@stats_paper] 0 $<$ [*z*]{} $<$ 0.5 and 0.5 $<$ [*z*]{} $<$ 1 bins seem to deviate slightly towards a more metal poor distribution than the remaining [*z*]{} $>$ 0.5 [@xshooter_survey] populations, however the statistical significance of this is tenuous. The [*z*]{} $>$ 2.0 [@xshooter_survey] population also appears to be a little more metal rich than the 0.5 $<$ [*z*]{} $<$ 2.0 [@xshooter_survey] populations but this is not statistically significant and is counter intuitive, as due to both the typically smaller masses of star-forming galaxies and the less time available for metal enrichment, one would expect the metallicity of any typical galaxy sample to decrease with redshift. In [first@refmeasured,@]{} right we combine the [@stats_paper] and [@xshooter_survey] observations into a single combined sample, while removing duplicates (as described in [first@refHost\_Metallicities,@]{}), which we use subsequently.

The overall result is a markedly constant metallicity distribution across the different redshift bins, indicative of far less metallicity evolution than is present in the typical star-forming galaxy population across the same redshift range [@Zahid2013]. Since LGRBs are formed in star-forming galaxies this discrepancy is perplexing.

We note that while we addressed redshift biases in [first@refzd,@]{} it is not possible to account for all the biases that could potentially be affecting the selection of which objects were observed with spectroscopy. In particular luminosity biases, i.e. selecting only galaxies bright enough for spectroscopy in a reasonable amount of telescope time, would presumably be prevalent. However the ratio of LGRB host galaxies observed at low, intermediate, and super solar metallicities seems to remain relatively consistent, particularly at [*z*]{} $<$ 2, (see [first@refmeasured,@]{}, [first@refhist\_table,@]{}, and the blue, purple and dark green lines in [first@refredshift\_distribution,@]{}) whereas the general expectation for luminosity biases would be to observe an increasingly large fraction of higher metallicity galaxies with redshift. A more contrived scenario, where the lower metallicity LGRB hosts are being selected out via a luminosity bias and the higher metallicity LGRB hosts become intrinsically less common with redshift yielding both populations to drop off at the same rate and thus maintain a constant ratio, remains possible but seems unlikely.

Ideally we would next compare the metallicity distribution of LGRB hosts with a sample of typical star-forming galaxies at the same redshifts selected in a star-formation weighted manner (i.e. the sample methodology of the [@stats_paper] SDSS population but at higher redshifts). Unfortunately, a suitable galaxy sample does not exist. The SDSS metallicity sample only extends (with a large sample size) out to [*z*]{} $<$ 0.3 and even out to that redshift range there are completeness issues with faint galaxies. While using the [*z*]{} = $\sim$0 SDSS population and subtracting the expected metallicity shift from the mass metallicity relation would provide a crude metallicity distribution, this would not provide a suitable enough estimate for the star-formation weighting. Therefore our ability to quantify the expected metallicity distribution evolution for the LGRB hosts from the typical star-forming galaxy population is lacking. Still, the absence of any apparent evolution can be reasonably excluded from being due to mass metallicity relation evolution across the redshift range in question.

Although we cannot create a suitable comparison sample of star-forming galaxies (i.e. galaxies of the same redshift distribution selected in a star-formation weighted manner), we can compare our sample of LGRB host metallicities with a sample of typical metallicities for galaxies with the masses and redshifts of an actual LGRB host galaxy population. In [first@refzd,@]{} we already assessed the redshift distribution of our LGRB host galaxy mass samples and found them to be consistent with that of our host metallicity samples.

\[1\][&gt;m[\#1]{}]{}

[L[0.3cm]{}m[6.7cm]{}L[2.2cm]{}L[2.2cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}]{} line & & 0.0 $<$ z $<$ 1.0 & 1.2 $<$ z $<$ 1.7[^5] & 2.1 $<$ z $<$ 2.5\
1 & Number of All LGRBs with Redshifts[^6] & 155 & 78 & 55\
2& LGRBs with Measured Metallicites & 32 & 14 & 8\
3& LGRBs with Metallicites Z $>$ 8.4 & 17 & 9 & 7\
4& Measured Metallicites / All LGRBs & 0.206 $\pm$ 0.040 & 0.179 $\pm$ 0.052 & 0.145 $\pm$ 0.055\
5& Metallicites Z $>$ 8.4 / All LGRBs & 0.110 $\pm$ 0.039 & 0.115 $\pm$ 0.041 & 0.127 $\pm$ 0.051\
6 & Dark Burst Adj. Z $>$ 8.4 / All LGRBs & 0.087 $\pm$ 0.031 & 0.081 $\pm$ 0.028 & 0.078 $\pm$ 0.031\

The Fraction of High Metallicity LGRBs {#Z_frac}
--------------------------------------

While the agreement of the cumulative distributions reported in the previous section is impressive, there are likely selection effects for which we can not fully exclude, for example the cutoff in absolute luminosity below which we cannot practically obtain a host galaxy spectrum differer for each of the redshift bins

To investigate this, we consider the cutoff in the LGRB formation rate per unit star-formation above a metallicity of $ {\rm log(O/H)}+12 \approx 8.3 $. Here we look at the fraction of hosts that lie above this cutoff as a function of redshift. In the first three lines of [first@refcalc\_table,@]{} we present the number of all LGRBs with redshifts (as complied in the GRB table of Jochen Greiner), the number of LGRBs with measured metallicities in our combined sample of bursts from [@stats_paper] and [@xshooter_survey] sample and the number of LGRBs with metallicities of $ {\rm log(O/H)}+12 > 8.4 $ in this sample for three redshift bins: $0<z<1$, $1.2<z<1.7$ and $2.1<z<2.5$. As discussed in [first@refzd,@]{}, the redshift range of the middle bin (and starting the last bin at [*z*]{} of 2.1) are forced on us by observational effects that greatly reduce the efficiency of the metallicity observations immediately above a redshift of one and around a redshift of two.

In Line 4 of [first@refcalc\_table,@]{}, we give the fraction of LGRBs with redshifts which also have metallicity measurements in our sample. As one would expect, the fraction declines continuously with increasing readshift, from about one-fifth in the first redshift bin to about one-tenth in the last. However, in Line 5 we give the fraction of all GRBs which have a measured metallicity in our sample of $ {\rm log(O/H)}+12 > 8.4 $. Strikingly, this fraction [*does not decline*]{} with redshift.

However, [@xshooter_survey] realized that their sample, which was a combination of several small surveys, had an overabundance of “dusty” GRBs, that is burst with $A^{GRB}_{V} > 1$. Comparing their sample with more representative surveys, they determined this overabunce as a function of redshift (typically a factor of $\sim$30%) anc corrected their sample for this effect. In Line 6 we have recalculated the ratios in Line 5 after reducing the number of bursts in our combined sample from [@xshooter_survey] with $ {\rm log(O/H)}+12 > 8.4 $ by the appropriate overabundance factor. (We have not adjusted the part of our sample from [@diff_rate_letter], because, as discussed by those authors, that sample had a typical number of dusty bursts). Although the ratios all go down somewhat, the primary result remains, the fraction of bursts with metallicities $ {\rm log(O/H)}+12 > 8.4 $ remains essentially constant independent of redshift.

Expected Metallicity Distribution From Mass & Redshift {#emzd}
------------------------------------------------------

In order to further explore potential selection effects, we use the mass-metallicity relation to estimate the metallicity distribution from the comparatively less biased sample of host galaxy masses. This metallicity distribution is only an estimate since it reflects only the typical galaxy metallicity expected for a galaxy of a given LGRB host mass at its specific redshift. However, the mass metallicity relation itself varies with redshift. Therefore, we estimate the mass metallicity relation for the redshift of the galaxy in question by interpolating from the mass metallicity relations measured at different redshifts. While [@Mannucci] claim a fundamental mass, metallicity, & star-formation rate relation that remains independent of redshift, we found (for the local universe) this to be mostly a mass metallicity relation, with a small but statistically significant star-formation rate perturbation, that is not independent of redshift. The applicably of the [@Mannucci] relation beyond the local universe is dubious at best with [@Wuyts] and [@Sanders2014] finding no SFR dependance on the mass-metallicity relation, and [@Yates2012; @Yates2014] finding a slight positive correlation for high mass objects, all contrary to the [@Mannucci] claim of a strong anti-correlation. As this clearly invalidates the fundamental relation being invariant with redshift, we therefore do not use the [@Mannucci] relation here.

While [@Zahid2013] provide a series of mass metallicity relation fits across the redshift range of interest, we apply our own 2-dimensional fit to the [@Zahid2013] Figure 1 data so such that we can estimate the metallicity for a galaxy of any given mass and redshift. Care was taken to avoid over-fitting the [@Zahid2013] data and a number of fitting procedures were trialed with fitting a minimum curvature spline surface using the MIN\_CURVE\_SURF procedure adopted. Our estimated metallicity results for a continuous range of galaxy masses are plotted against the individual redshift fits of [@Zahid2013] in [first@refZahid\_polyfit,@]{}.

![\[Zahid\_polyfit\] The mass metallicity relation fits for different redshifts of [@Zahid2013] Figure 1 (thick dashed lines) with our estimated metallicity results for a continuous range of galaxy masses and matching redshift bins (thin continuous lines) overplotted. The fitting is deliberately kept approximate to avoid over-fitting.](Zahid2013_fitting.pdf){width=".49\textwidth"}

We therefore apply this methodology to estimate the expected metallicities for the [@Perley_shoals_masses] SHOALS sample. We show the estimated metallicity distribution of this sample in [first@refmeasured\_and\_estimated,@]{} right, using the same redshift binning as in [first@refmeasured,@]{}. For comparison we show a simplified version of our measured LGRB host metallicities on the left side of this figure ([first@refmeasured\_and\_estimated,@]{}). The upper half of the expected metallicity distributions shows a lack of metallicity evolution with redshift consistent with that seen in the measured metallicity distributions. Since for the same given mass, the expected metallicity is lower at higher redshift, to therefore maintain a consistent metallicity distribution the LGRB mass distribution would have to increase with redshift. [@Perley_shoals_masses] finds that this is indeed the case. To illustrate this we plot the combined [@Perley_shoals_masses] and [@Svensson] mass distributions with the same redshift binning and colors in an inset of [first@refmeasured\_and\_estimated,@]{}. While an increase in observed host galaxy masses with redshift could potentially be due to Malmquist bias it seems unlikely that such a bias would exactly match that needed to correct for mass metallicity evolution so as to maintain a consistent metallicity distribution. Moreover, sample of LGRBs in [@Perley_shoals_masses] is unbiased in its selection and therefore their observed mass distribution increase is not caused by observational biases in their sample (we show this explicitly in [first@refshoals\_mass\_step\_plot\_5,@]{}).

![image](Measured_and_estimated.pdf){width="100.00000%"}

Comparing between the right and left sides of [first@refmeasured\_and\_estimated,@]{}, the estimated metallicity distributions have higher metallicities for a given redshift than the measured metallicity distributions. We overplot these metallicity distributions (simplified to show only the full 0 $<$ [*z*]{} $<$ 2.5 redshift range) in [first@refmeasured\_vs\_estimated,@]{}. This distributional offset of, on average, approximately a quarter dex is roughly constant across the distributions interquartile range. Therefore, the LGRB host galaxy population is systematically lower in metallicity than typical galaxies of comparable mass and redshift. This suggests that the LGRBs are biased towards the lowest metallicities within any galaxy population and can not be correctly modeled using the general mass metallicity relation.

In [first@refmetal\_comp\_table,@]{} we explicitly compare the 29 objects for which we have both measured and estimated metallicity values. We find a mean difference between the estimated and measured metallicities of 0.23 dex with a median difference of 0.30 dex but with a standard deviation on the difference of 0.46 dex. In raw (i.e. non-log) metallicities we find a median ratio of 0.496 between the measured and estimated metallicities. Hence we conclude that while the estimated metallicities are typically higher than the measured values the offset is too random to be useful for correcting the estimated metallicities to match the measured values.

![\[measured\_vs\_estimated\] Measured (black) and estimated (grey) metallicities from [first@refmeasured\_and\_estimated,@]{} left and right respectively (i.e. the black lines in each side showing the metallicities across the entire [*z*]{} $<$ 2.5 redshift range). A green box with a width of 0.25 dex is overplotted; this corresponds to a difference factor of 1.8 in raw metal content. This resolves much of the difference between the LGRB formation metallicity cutoff of about a third solar in [@diff_rate_letter] with the cutoff value of approximately solar claimed in [@Perley_shoals_masses] in favor of the former. As LGRB hosts do not follow the general mass metallicity relation, there is no substitute for actually measuring their metallicities!](Measured_vs_estimated.pdf){width=".49\textwidth"}

Selection Effects in the Mass & Expected Metallicity Distributions
------------------------------------------------------------------

![\[shoals\_mass\_step\_plot\_5\] Cumulative distribution of [@Perley_shoals_masses] SHOALS measured LGRB host masses binned by redshift. Mass upper limits are shown as dashed lines, mass measurements are shown as solid lines. We also plot the mass measurements without the limits, while tracking the number of limits in the normalization, causing the distributions do not extend down to zero. These two approaches define the maximum and minimum range possible for the distributions. A shaded region between them indicates where, due to the upper limits, the true distribution must lie. Where the shaded region is bounded by lines (dotted or solid) the true distribution is constrained between those bounds. If the color fades out to the left, the distribution could, in principle, extend to an arbitrarily low mass.](shoals_w_limits_mass_step_plot_5_v2.pdf){width=".49\textwidth"}

Key to understanding the validity of [first@refmeasured\_and\_estimated,@]{} is the completeness of the samples. While this is difficult for metallicity measurements (i.e. [first@refmeasured\_and\_estimated,@]{} left) due to the sample being a completion of many different observing programs, it is possible for the estimated metallicities if we use a mass sample with suitably unbiased selection criteria such as those used in the [@Perley_shoals_masses] SHOALS sample.

However the [@Perley_shoals_masses] SHOALS mass sample is not perfectly complete. Seven out of 119 objects are missing clear specific redshift values and some objects with redshifts have only upper limits on their host galaxy mass values. The later however we can address by constraining the maximum and minimum possible distributions. Ideally the upper limit values would all be below the data values, however (while most of the SHOALS upper limit values are below most of the SHOALS mass values) this is not true in all cases. The maximum possible distribution is set by plotting the data with measured mass values and mass upper limits together. We indicate which values are limits by using a dashed line. The minimum possible distribution is set by assuming all the upper limit values are below the measured values. As there are no lower bounds on the upper limits, these are not plotted however we do count the number of such objects and normalize the distributions accordingly. This results in distributions that do not extend all the way to zero but instead stop where the limits are unconstrained. Where both sides are constrained, we shade the region between the maximum and minimum possible distributions, as the true distribution must lie between these bounds. When the minimum distribution is not constrained we use a gradient shading where the color fades out to the left as the distribution could, in principle, rise at an arbitrarily low mass. The resulting plot, [first@refshoals\_mass\_step\_plot\_5,@]{}, is similar to [@Perley_shoals_masses] Figure 4 except for the more detailed plotting system described above. We also use the same color scheme as in our other figures and we explicitly use log mass on the abscissa.

Of particular note in [first@refshoals\_mass\_step\_plot\_5,@]{} is that the host galaxy mass values continue to increase with redshift. This is in agreement with the behavior of our combined host mass sample plotted in [first@refmeasured\_and\_estimated,@]{} inset and shows that the trend of increasing host galaxy masses with redshift is not due to selection and measurement biases.

For the estimated metallicities, upper limit mass values create upper limit metallicity estimate values. Similarly, for the estimated metallicity values, the upper limits are generally below the measured values. In [first@refshoals\_metal\_est\_step\_plot\_5,@]{} we plot the estimated metallicity cumulative distribution redshift bins of the [@Perley_shoals_masses] SHOALS sample in the same manner as [first@refshoals\_mass\_step\_plot\_5,@]{}. We discard the z $<$ 0.5 bin from SHOALS due to it having too few objects to be useful and replace it with z $<$ 0.5 bin from [first@refmeasured\_and\_estimated,@]{} right (as the sample biases within the lowest redshift bin are likely to be minimal).

![\[shoals\_metal\_est\_step\_plot\_5\] Cumulative distribution of estimated metallicities from the [@Perley_shoals_masses] SHOALS mass and redshift values binned by redshift. Estimated metallicity upper limits are shown as dashed lines, estimated metallicities are shown as solid lines. As in [first@refshoals\_mass\_step\_plot\_5,@]{}, a shaded region indicates where, due to the upper limits, the true distribution must lie. If the color fades out to the left, the distribution could, in principle, extend to an arbitrarily low metallicity. Where the shaded region is bounded by lines (dotted or solid) the true distribution goes between the bounds. Due to the limited number of objects in the SHOALS z $<$ 0.5 bin we omit plotting this bin and instead replot the combined z $<$ 0.5 bin from [first@refmeasured\_and\_estimated,@]{} inset (purple dotted line). For reference and comparison with our larger estimated metallicity sample from [first@refmeasured\_and\_estimated,@]{} right we also replot the combined z $<$ 2.5 distribution from there (dotted black line). KS test results for the upper half of the lines in this figure are shown in [first@refshoals\_w\_limits\_metal\_est\_step\_plot\_5\_KS\_table\_up\_half,@]{} in the appendix. Fortunately all the upper limits are contained in the lower half of the distributions and thus do not disrupt this analysis.](shoals_w_limits_metal_est_step_plot_5.pdf){width=".49\textwidth"}

In [first@refshoals\_metal\_est\_step\_plot\_5,@]{}, while not as apparent as in [first@refmeasured\_and\_estimated,@]{}, we still see evidence of a constant metallicity distribution, at least across upper half of the distributions where the redshift bins are relatively complete. (Compare the KS results given in [first@refshoals\_w\_limits\_metal\_est\_step\_plot\_5\_KS\_table\_up\_half,@]{} for the upper half of [first@refshoals\_metal\_est\_step\_plot\_5,@]{} with those given in [first@refmetal\_est\_comb\_step\_plot\_5\_KS\_table\_up\_half,@]{} for the upper half of [first@refmeasured\_and\_estimated,@]{} right.)

Results Summary {#Results_Summary}
===============

We find an absence of large differences in the LGRB redshift distribution out to [*z*]{} of 2.5 between different samples studying different physical properties of bursts. The minor exceptions are that the [@stats_paper] LGRB metallicity sample shows an expected bias against LGRB metallicities where a separate IR instrument is required to observe the reddest required lines. This bias is not repeated in the [@xshooter_survey] X-Shooter survey since X-Shooter can observe all required spectral lines for determining metallicity out to [*z*]{} = 2.5, however a gap in the X-Shooter metallicity redshift coverage is seen between approximately 1.7 $<$ [*z*]{} $<$ 2.1 due to some of the required lines falling out of observable spectral regions. We also find that the observed LGRB redshift distribution agrees well with the distribution predicted in [@form_rate_letter] and that the [@Perley_shoals_masses] SHOALS redshift distribution in particular matches predictions at redshifts above [*z*]{} of 2.5 where the redshift distributions of the different LGRB samples (which extend to these high redshifts) diverge.

Of particular note, while we cannot account for all the biases that went into the selection of LGRB hosts for spectroscopy, we find that the ratio of low, intermediate, and super solar LGRB hosts does not change dramatically across our sample. In particular host luminosity biases would expectedly over observe higher metallicity, presumably brighter, objects at higher redshifts. Given the unconstrained nature of the LGRB host metallicity sample it is likely subject to innumerable complex and subtle selection biases that are not practical to quantify, however we do not see evidence that selection biases are driving our results.

We then proceed to look for evolution in the metallicity distribution as a function of redshift and see surprisingly little. There appears to be curious consistency in the metallicity distribution across different redshifts. This is at odds with the general evolution in the mass metallicity relation, which becomes progressively more metal poor with increasing redshift. To explore this further with a sample more a priori controlled in selection effects we turn to simulated metallicities.

As the average mass, redshift, and metallicity are related (by an evolving mass metallicity relation) we can thus use any two properties to estimate the third. By converting the measured LGRB host masses and redshifts from [@Perley_shoals_masses] to expected metallicities, using a fitting of the mass-metallicity-redshift relation of typical galaxies from [@Zahid2013], we further find that the LGRB host galaxy mass distribution increase with redshift seen in the [@Perley_shoals_masses] SHOALS sample is consistent with that needed to preserve the LGRB metallicity distribution because the mass metallicity relation decreases with redshift. Furthermore we find that these estimated LGRB host metallicities consistently overestimate the actual measured host metallicities by approximately a quarter dex. This corresponds to about a factor of two in raw metallicity and resolves much of the difference between the LGRB formation metallicity cutoff of about a third solar in [@diff_rate_letter] with the cutoff value of just under solar claimed in [@Perley_shoals_masses] in favor of the former. As LGRB hosts do not follow the general mass metallicity relation, there is no substitute for actually measuring their metallicities! While one cannot use the mass-metallicity relation for estimating LGRB metallicities for the simple reason that the majority of LGRB host galaxies have metallicities below that expected from the relation, the difficulties in getting spectra for frequently low mass galaxies at high redshift are considerable and likely will prohibit obtaining the type of ideal unbiased spectroscopic sample that this work requires. It may be possible to use cosmological multi-galaxy simulations to approach the problem, however great care would be required in both ensuring that the population of high redshift low metallicity galaxies is correctly rendered (given the limited observational constraints on this part of the galaxy sample) and that the inevitable extrapolation with increasing redshift is sufficiently constraining as to be useful (i.e. that there are not so many free parameters to arrive at a wide multitude of possible high redshift galaxy metallicity distributions). Still the possibility this could be practical suggests it should be attempted.

Speculative Discussion of Possible Causes {#Discussion}
=========================================

The absence of evolution in the LGRB metallicity distribution is quite puzzling and does not seem to conform to our general expectations of galaxy evolution. While we cannot fully constrain the impact of selection effects on the sample of host galaxies for which we have spectroscopy, that the absence of evolution is also seen in (the upper half of the distributions of) metallicities estimated from host galaxy masses and redshifts, of which very complete samples exist, makes it unlikely that the observed lack of evolution is the product of selection biases. Nor would the product of selection biases have reason to particularly favor a metallicity distribution that remains constant with redshift. Moreover while we cannot fully account for how selection effects are impacting our measured metallicity results, we find that the redshift evolution in the metallicity distributions estimated from host galaxy masses taken from the unbiased SHOALS sample give results that are consistent with our directly measured metallicity distributions. Therefore we proceed assuming the observed constant metallicity distribution is true and address its origins and implications.

The simplest explanation of the known LGRB preference for low metallicity environments [@stats_paper; @diff_rate_letter; @Perley_shoals_masses; @Levesque051022; @Levesque2] is that this effect is caused by a difference in the LGRB formation rate per unit star-formation at different metallicities (c.f. @diff_rate_letter). However, this explanation would not produce an LGRB metallicity distribution with no redshift evolution, as seen here, since the underlying star-formation from which the LGRBs are formed does evolve and thus would be reflected in the LGRB metallicity distribution.

One possible explanation might be that the high metallicity LGRB hosts are not representative of the general galaxy population and may have recently been low metallicity galaxies that have undergone a sudden burst of enrichment. This could also explain the existence of high metallicity LGRBs as the gas that formed the progenitor may have been segregated from this enrichment process and thus allowing the LGRB to form in a low metallicity environment.

The recent discovery of host association confusion leading to the spurious high metallicity host measurement of LGRB 020819B [@Perley020819B] and potentially also LGRB 050826 (C. Th[ö]{}ne private communication) demands a closer vetting of the high metallicity LGRB host population. Perhaps then claims of high metallicity LGRB hosts being dominated by merger induced starbursts could be validated and the disproportionate (with respect to the underlaying star-formation) association of high metallicity LGRB hosts with dynamical systems shown. At the moment this remains speculative as, while the high metallicity LGRB 051022 is clearly such a system [@conference_proceedings; @obs_paper], an extensive study of a well vetted representative population will be needed to establish this trend beyond mere anecdotal cases.

Were merger induced starbursts (of low metallicity galaxies) the cause of the high metallicity LGRB host population then the rate of such mergers would likely not depend on the fraction of high metallicity galaxies and their high metallicity star-formation. Therefore the general galaxy metallicity distribution (and its evolution) would largely be irrelevant, as it is thus not producing LGRBs, and therefore the LGRB metallicity distribution (at least for all but the low metallicity end) would be a function of the distribution in the metallicity enrichment timescale and the timescale distribution between LGRB progenitor gas segregation and the LGRB explosion. Essentially this reduces the problem to a race between how fast the host galaxy metallicity can increase and how long the LGRB can wait to explode. Such a race condition would be expected to produce a static LGRB metallicity distribution.

While LGRB progenitors are certainly massive stars it remains an open question of whether they are the most massive and thus if, in a starburst scenario, they are the first stars to explode. stars would actually be problematic as we need to enrich the host galaxy ISM without enriching the LGRB progenitor itself. Assuming it is possible to enrich the host galaxy ISM in the interval between when the gas that will form the LGRB progenitor becomes segregated from that of the host to when the LGRB progenitors lifespan ends in an LGRB event, this would explain both how the high (host) metallicity LGRBs form and why the LGRB host galaxy metallicity distribution doesn’t evolve.

Unfortunately, the required understanding of rapid, perhaps collisionally induced, starburst metallicity enrichment is lacking. The limitations of rapid enrichment are not observationally constrained and the simulations not yet sufficient to address the issue directly. A detailed study of high metallicity LGRB host galaxies to compare their properties in detail against a matching typical star forming galaxy population (i.e. investigating anecdotal claims of merger over representation) and extending our study of the LGRB host metallicity distribution out to redshifts where the metallicity of typical star forming galaxy population is consistent with or lower than the typical LGRB population (perhaps at z $\sim$ 4) is essential to continuing this investigation.

While some difference in the LGRB metallicity distribution would still be expected because the average initial (i.e. pre merger enrichment) metallicites of the future LGBR host galaxies would still be expected to vary slightly (due to normal metallicity enrichment in these sub typical metallicity galaxies), this effect is likely to be small as long as the (star-formation weighted) post merger (rapidly enriched) mean host galaxy metallicity is much higher than the typical LGRB metallicity formation range. A better understanding of the metallicity evolution for the sub typical metallicity galaxy population is needed, but conceptually it is not hard to view galaxies which have failed to keep pace with the typical galaxy evolution and enrichment as being non-evolved / primordial galaxies. At a high enough redshift even galaxies following the typical galaxy evolution track will eventually have to be metal poor enough so as to be in within the typical low metallicity range conducive to LGRB formation. However this redshift is (likely far) beyond the redshift range of the [@xshooter_survey] host galaxy metallicity sample (0 $\lesssim$ [*z*]{} $\lesssim$ 2.5). We may already have some very limited evidence of this effect in the behavior of the [*z*]{} $>$ 2.5 line in [first@refmeasured\_and\_estimated,@]{} right however as this is beyond the redshift range of the [@Zahid2013] galaxy populations this could also simply be caused by uncertainty in the requisite extrapolation. It is worth noting that the highest redshift galaxy population in [@Zahid2013], that of [@Erb2006] at a redshift of [*z*]{} = 2.26, still expects a mean metallicity of only log(O/H)+12 $\approx$ 8.5 (after conversion into the KK04 scale) for a billon solar mass galaxy at that redshift whereas [@diff_rate_letter] found the metallicity cutoff to be log(O/H)+12 $\approx$ 8.3 for the LGRB formation per unit star-formation rate. Even if such an extrapolation of the @Zahid2013 fit could be trusted outside of its observed redshift range, it would still be unwise to draw too heavily on inferring host metallicity behavior from host masses as one of the significant results of this paper is that the former are not a typical representation of the latter. We must stress again that there is no substitute for actually measuring galaxy metallicities.

We note however that this explanation is at odds with some recent theoretical [@Bustamante2018; @Torrey2019] and observational [@Wilson2018] work suggesting merger induced decreases in gas-phase metallicity. However it has been observed in LGRB 980425 that at least this, and probably many, LGRB hosts are subject to very recent inflows of low-metallicity gas in localized regions [@inflow980425]. These inflows could be providing primordial gas from which LGRB progenitors are formed even when the typical HII metallicity of the galaxy is too high. High resolution spectroscopy of the LGRB 980425 progenitor region does not show a lower metallicity than typical for the galaxy [@Christensen980425], despite the galaxy having a favorable face on geometry, (nor do similar observations of LGRB 111005A however this galaxy was edge on — @111005Tanga) so this possibility is less than compelling. Much more work is needed to probe the effect of mergers on the galaxy’s metallicity change over time and across a full range of different initial metallicities. To be relevant to transient population rates such work would also need to apply a star-formation weighted analysis (i.e. look at the average effect of mergers in terms of star-formation and not just on typical numerous small galaxies) and consider galaxies beyond when they appear as classical merging systems. In general merger induced star-formation likely contributes significantly to the metallicity enrichment over cosmic time and thus any such merger induced metallicity decreases are likely temporary. Still this discussion is rather speculative and a much better understanding of galaxies is needed to understand LGRB rates.

There may be a simpler, and more direct (though still tentative) explanation. [@Hakobyan2014] found evidence that the relative rate of Type Ibc to Type II SNe is significantly higher in merging galaxies than in undisturbed star-forming galaxies. As the merger rate (particularly the major merger rate) increases with redshift [@Lotz2011; @Snyder2017] the formation of Type Ic SNe (and thus potentially LGRBs) may be enhanced as well. How mergers produce this change in the type of SN formed is not known. While there is now some growing evidence that the stellar initial mass function may vary [@Conroy2013; @Navarro2015], we have no evidence that this is the cause. Most recently, [@Schneider2018] have argued that the 30 Doradus starbust in the Large Magellanic Cloud has more massive (15 to 200 $M_\sun$) stars than would be expected from the Galactic IMF. However, if this change is due to metallicity, it might help explain why LGRBs prefer low-metallicity galaxies, but would not make them more likely in high-metallicity galaxies at high redshift.

Conclusions
===========

The ratio of low, intermediate (i.e. below and above the @diff_rate_letter log(O/H)+12 $\approx$ 8.3 metallicity cutoff), and super solar LGRB hosts does not change dramatically across our sample as would be expected for luminosity biases in host spectroscopy. [In particular, LGRBs with host metallicities $log(O/H)+12 >8.4$ remain a constant fraction of the entire known LGRB population between redshifts of $z=0$ and $z=2.5$ even as the fraction of LGRBs with metallicities drops steeply.]{} The measured metallicity distribution of the LGRB host galaxy population does not seem to evolve with redshift as would be expected given the cosmological metallicity enrichment of the universe, in particular the lower average metallicity of star-forming environments at high redshift. [At the same time, the metallicity of typical galaxies with the same mass and redshift as the LGRB hosts is systematically approximately twice that of the measured metallicities, independent of redshift. The LGRB host galaxy mass distribution slowly increases with redshift as might be expected to maintain a constant metallicity distribution.]{}

While we cannot fully exclude the possibility of Malmquist bias contributing to our results, we have analyzed in detail possible redshift biases between our samples and find no such unexplained effects. We also would not expect Malmquist bias to reproduce either consistent observed metallicity distributions or the mass increase with redshift needed to exactly maintain consistent estimated metallicity distributions. Malmquist bias certainly would not give us a constant fraction of GRBs with metallicities above $log(O/H)+12 > 8.4$ (see [first@refZ\_frac,@]{}). Were Malmquist effects biasing us towards lower metallicity for a given mass (due to lower UV stellar opacities resulting in higher equivalent widths)[^7] then the constant metallicity distribution we observe would require a true metallicity distribution that increases with redshift contrary to typical galaxy evolution trends. Therefore we conclude that something more complicated is occurring than the simple relative rate difference in LGRB formation as a function of metallicity proposed in [@diff_rate_letter].

One potential explanation is that the LGRB events seen in high metallicity environments do not actually originate from high metallicity progenitors. Instead these events may originate from low metallicity star formation and the metallicity of their environments is otherwise enriched (e.g. the enrichment happening after the progenitor was formed). Alternatetively, there is the possible that conditions in galaxies at higher redshifts are changing in ways that make the production of LGRBs more likely at high, or apparently high, metallicity. The latter could be through the localized infall of low-metallicity gas, but there could be more fundamental changes in the nature of star formation in galaxies at high redshift, such as a change in the IMF, which could itself be due to processes such as mergers, which at low-redshifts have been shown to change the ratio of SNe types formed [@Hakobyan2014]. However, our result that the LGRB host metallicity distribution remains largely unchanged as we go to higher redshifts, when we expect quite the opposite, is quite possibly an important clue to the nature of massive star formation at high redshifts.

Ideally we would extend our analysis of the LGRB host metallicity distribution until the mass metallicity relation of typical galaxies descended into the typical low metallicity, $log(O/H)+12 < 8.3$, LGRB metallicity range. However, actually measuring galaxy metallicities in emission beyond [*z*]{} $>$ 2 becomes increasing difficult due to the required spectral lines being redshifted out of the observable range. X-shooter with the K band blocking filter in place is limited to observations at [*z*]{} $<$ 2.15, and without it, observations are only practical out to [*z*]{} $<$ 2.6 which is also the limit of what can be reasonably expected from the ground. JWST will be able to brute force these observations at high redshifts however a more efficient approach would be to use absorption metallicities at such higher redshifts. Fortuitously, LGRB host galaxies themselves are uniquely suited to absorption metallicity measurement as the GRB afterglow itself provides a bright background source clean of intrinsic spectral features (as present in QSOs) and LGRB hosts are also star-forming galaxies with typically robust emission lines. Absorption metallicities however are practically limited to galaxies at [*z*]{} $>$ 1.6 due to requiring observations of the Ly$\alpha$ line. The lack of much overlap between these redshift ranges has deterred a direct comparison of measured values leaving great uncertainty in their respective cross-calibration. Once such a cross-calibration between emission and absorption metallicities (similar to the cross-calibration between different emission line diagnostics of @KewleyEllison) is achieved, extending our analysis out to a higher redshifts in absorption will allow us to directly probe the critical region where the mass metallicity relation of the typical galaxy population transits the optimal metallicity range for LGRB formation. Such analysis is critical to understand how metallicity shapes the formation process of the LGRBs seen in high metallicity host galaxies and thus how LGRBs form in general.

More generally we find that even though estimating the metallicity of LGRB hosts from their mass and redshift broadly follows observed trends, the resulting distribution is strongly biased to higher metallicities than the observations. Even a specific LGRB-calibrated mass-metallicity relation is not practical since there is no universal correspondence between LGRB host mass and metallicity, regardless of redshift, at the low metallicity end of the population. To say it again: as LGRB hosts do not follow the general mass metallicity relation and thus there is no substitute for actually measuring their metallicities!

We thank Thomas Kr[ü]{}hler for many useful discussions and assorted assistance. His omission as a coauthor is due solely to his personal preference since leaving academia. His presence in astronomy is missed and we wish him well in his new career.

We thank the BAT6 team for a detailed explanation of their [*z*]{} $\gtrsim$ 2.5 selection effects.

John Graham acknowledges support through the National Science Foundation of China (NSFC) under grant 11750110418.

APPENDIX A {#appendix-a .unnumbered}
==========

Data and KS Tables {#data-and-ks-tables .unnumbered}
==================

Here we provide a data table of our combined LGRB sample ([first@refxsd\_data\_table,@]{}) and KS test result tables for Figures \[redshift\_distribution\] ([first@refLGRB\_num\_stat\_KS\_table,@]{}) and \[measured\_and\_estimated\]. [first@refmeasured\_and\_estimated,@]{} has KS test results for the left (measured host metallicity – [first@refcomb\_step\_plot\_5\_KS\_table,@]{}), inset (host mass – [first@refmass\_comb\_step\_plot\_5\_KS\_table,@]{}), and right (estimated host metallicity – [first@refmetal\_est\_comb\_step\_plot\_5\_KS\_table,@]{}) plots as well as another KS test ([first@refmetal\_est\_comb\_step\_plot\_5\_KS\_table\_up\_half,@]{} and [first@refshoals\_w\_limits\_metal\_est\_step\_plot\_5\_KS\_table\_up\_half,@]{}) on only the upper half of the values in each redshift bin of [first@refmeasured\_and\_estimated,@]{} left and [first@refshoals\_metal\_est\_step\_plot\_5,@]{} respectively. These KS test result tables are computed (for each figure) by calculating the KS probabilities of every line in the figure against every other line.

[first@refLGRB\_num\_stat\_KS\_table,@]{} shows that the redshift distribution of the different observed LGRB populations are in reasonable agreement with each other except as noted in section \[enumerated\_pop\_differences\]. By further dividing the populations (into subpopulations not separately shown in \[redshift\_distribution\]) we can validate that these exceptions are due the reasons claimed in the text. Specifically we divide the [@stats_paper] sample into objects with redshift above and below z = 0.5 and find that both of these subpopulations are much more consistent with the other lines, while the combined population is not, due to a lower observing rate at [*z*]{} $>$ 0.5 where a separate IR spectrograph is required. We also divide the [@xshooter_survey] metallicity into objects with redshift above and below [*z*]{} = 2 and again find that both of these subpopulations are much more consistent that the combined population, due to a gap in the [@xshooter_survey] metallicity sample from 1.7 $\lesssim$ [*z*]{} $\lesssim$ 2.1 caused by a line measurement difficulty. (Note that the sample redshift matching process results in these this redshift gap being trimmed from the comparison samples as well.) Finally for those samples who’s redshift range exceed [*z*]{} $<$ 2.5 we create a [*z*]{} $<$ 2.5 subpopulation so as to compare them without being subject to the gamma-ray flux limited selection effects present at higher redshifts and find that these populations are indeed more consistent at lower redshifts.

[first@refcomb\_step\_plot\_5\_KS\_table,@]{} shows that the different LGRB redshift bins indeed have the same metallicity distribution as appears in [first@refredshift\_distribution,@]{} left. [first@refmass\_comb\_step\_plot\_5\_KS\_table,@]{} shows however that there is a strong difference in the host mass distribution of the different LGRB redshift bins (see [first@refredshift\_distribution,@]{} inset). It is thus surprising that when these mass and redshift values are used to estimate a host metallicity values for these objects the LGRB redshift bins have a much more consistent metallicity distribution ([first@refmetal\_est\_comb\_step\_plot\_5\_KS\_table,@]{}), particularly on the upper half of the distributions ([first@refmetal\_est\_comb\_step\_plot\_5\_KS\_table\_up\_half,@]{}). To exclude possible biases in the host mass distribution, in [first@refshoals\_w\_limits\_metal\_est\_step\_plot\_5\_KS\_table\_up\_half,@]{}, we repeat this analysis, on the upper half of the distributions, using only the [@Perley_shoals_masses] sample while counting objects with only upper mass limits in the normalization (since all the upper mass limits are contained in the lower half of the distributions they do not disrupt this analysis) with comparable results.

\[1\][&gt;m[\#1]{}]{}

[m[1.9cm]{}L[1.0cm]{}L[1.8cm]{}L[0.9cm]{}]{}

\[1\][&gt;m[\#1]{}]{}

/

GRAHAM ET AL.

[m[4.1cm]{}|L[1.2cm]{}L[1.5cm]{}L[1.5cm]{}L[1.5cm]{}L[1.2cm]{}L[1.2cm]{}L[1.2cm]{}L[1.2cm]{}L[1.2cm]{}L[1.2cm]{}L[1.2cm]{}L[1.2cm]{}L[1.2cm]{}]{}

[Computed Kolmogorov–Smirnov (KS) probabilities comparing the lines in the [first@refredshift\_distribution,@]{} redshift distributions (and some additional subsets thereof). This was affected by, for each paring, removing the objects of each line outside the redshift range of the other (with a grace of 0.05 $z$) and then running a normal KS test on the remaining values. NaN values indicate KS test failure due to having fewer than 4 objects in a redshift matched comparison sample. Values of “1" are exact and indicate a sample which, due to redshift range matching cuts, is being evaluated with itself, values of “1.0000" are the result of rounding. Note: The KS values in this table are not dependent on the line scaling factors used in [first@refredshift\_distribution,@]{}.]{}

[m[4.1cm]{}|L[1.5cm]{}L[1.5cm]{}L[1.5cm]{}L[1.5cm]{}L[1.5cm]{}L[1.5cm]{}L[1.5cm]{}L[1.5cm]{}L[1.5cm]{}L[1.5cm]{}]{}

[The number of objects from the [first@refredshift\_distribution,@]{} samples. Note the irregular and overlapping bins from 1.2 $<$ [*z*]{} $<$ 1.7 and 2.1 $<$ [*z*]{} $<$ 2.5 to avoid the redshift gaps (from 1.0 $\lesssim$ [*z*]{} $\lesssim$ 1.2 and 1.7 $\lesssim$ [*z*]{} $\lesssim$ 2.1) in the [@xshooter_survey] metallicity sample. Also note that the number of simulated objects in the GS16 [@form_rate_letter] Prediction is arbitrary, however the ratio of the number of objects between the different redshift bins is meaningful.]{}

\[1\][&gt;m[\#1]{}]{}

[m[2.8cm]{}|L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}]{}

[Computed Kolmogorov–Smirnov probabilities comparing the lines in the [first@refmeasured\_and\_estimated,@]{} left measured host metallicity distributions.]{}

[m[2.8cm]{}|L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}]{}

[Computed Kolmogorov–Smirnov probabilities comparing the lines in the [first@refmeasured\_and\_estimated,@]{} inset mass distributions.]{}

[m[2.8cm]{}|L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}]{}

[Computed Kolmogorov–Smirnov probabilities comparing the lines in the [first@refmeasured\_and\_estimated,@]{} right estimated metallicity distributions. The metallicities are estimated based on the mass metallicity relation for their redshifts.]{}

[m[2.8cm]{}|L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}]{}

[Computed KS probabilities comparing the upper half of the lines in [first@refmeasured\_and\_estimated,@]{} right estimated metallicity distributions. This was affected by removing the lower half of the metallicity values of each line and then running a normal KS test on the remaining values.]{}

[m[2.8cm]{}|L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}L[1.8cm]{}]{}

[Computed KS probabilities comparing the upper half of the lines in the [first@refshoals\_metal\_est\_step\_plot\_5,@]{} estimated metallicity distributions. This was affected by removing the lower half of the metallicity values of each line and then running a normal KS test on the remaining values. Fortunately all the upper limits are contained in the lower half of the distributions and thus do not disrupt this analysis.]{}

\[1\][&gt;m[\#1]{}]{}

[m[1.9cm]{}L[1.8cm]{}L[1.8cm]{}L[2.1cm]{}L[2.4cm]{}L[0.9cm]{}L[1.1cm]{}]{}

[^1]: This is discounting some higher redshift objects in [@xshooter_survey] due to use of the \[Ne III\] method for breaking R$_{23}$ metallically degeneracy which should never be applied to LGRB hosts [@stats_paper].

[^2]: For a more detailed description of our metallicity calculation methodology we refer the reader to [@stats_paper]. For a more detailed description of the advantages and accuracy of the iterative fitting approach we refer the reader to [@kd2002]. For readers who wish to calculate their own metallicities we refer them to the excellent newer metallicity code of [@new_metal_code] which is capable of determining metallicities using a range of different diagnostics and scales (note that this code is not used in this paper due solely to our desire to retain full constancy with @stats_paper). For the solar metallicity value in the KK04 scale we refer the reader to the [@solar] estimated of log(O/H)+12 = 8.69 $\pm$ 0.05 based on solar 6300 [Å]{} \[O I\] line measurement. It should be noted that while the emission line diagnostics can be cross calibrated due to the large number of H II regions upon which multiple diagnostics can be applied [@KewleyEllison] this is not true of the density-sensitive 6300 [Å]{} \[O I\] line measurement where the line strength is insufficient for widespread application. Thus any absolute reference to the solar value should be considered very approximate and detailed scientific comparisons to emission line metallicities in terms of solar fractions should be avoided. For conversions to other metallicity scales and a discussion of associated issues we refer the reader to the transforms of [@KewleyEllison]. For a general introduction to the R$_{23}$ diagnostic we refer the reader to [@Pagel1979; @Pagel1980].

[^3]: <http://www.mpe.mpg.de/~jcg/grbgen.html>

[^4]: \[rate\_feedback\_bias\_footnote\]It should be noted that we cannot completely exclude a bias in LGRB detectability with redshift within the theoretical curve, since the theoretical curve is based on an estimate of the evolution in the metallicity distribution of star-formation across the universe as a function of redshift, which is in turn based on observational estimates of the LGRB rate as a function of redshift. While these estimates are not fully decoupled, we believe it unlikely (but possible) that a LGRB detectability bias would match one of the metallicity evolution cases evaluated in [@form_rate_letter] Table 3. In particular none of these models shows a change in shape at [*z*]{} $\sim$ 2.5 as seen in many of the [first@refzd,@]{} populations.

[^5]: Irregular bin spacing to avoid redshifts gaps in measured metallicites

[^6]: Errors on object numbers assumed to be square root of the number of objects.

[^7]: High metallicity creates a greater UV opacity in the atmospheres of the galaxies massive stars, reducing the ionizing photon flux, and thus the amount of ionized gas. Also higher metallicity galaxies can support more dust which also reduces the UV photon density. As higher equivalent widths makes it more likely we can measure a metallicity, we may be biasing ourselves towards lower metallicity at a given luminosity.
