Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Evidence for an intermediate-mass black hole from a gravitationally lensed gamma-ray burst

## Abstract

If gamma-ray bursts are at cosmological distances, they must be gravitationally lensed occasionally1,2. The detection of lensed images with millisecond-to-second time delays provides evidence for intermediate-mass black holes, a population that has been difficult to observe. Several studies have searched for these delays in gamma-ray burst light curves, which would indicate an intervening gravitational lens3,4,5,6. Among the ~104 gamma-ray bursts observed, there have been a handful of claimed lensing detections7, but none have been statistically robust. Here we present a Bayesian analysis identifying gravitational lensing in the light curve of GRB 950830. The inferred lens mass Ml depends on the unknown lens redshift zl, and is given by $$(1+z_{\rm{l}})M_{\rm{l}} = 5.{5}_{-0.9}^{+1.7}\times 1{0}^{4}\,M_{\odot}$$ (90% credibility), which we interpret as evidence for an intermediate-mass black hole. The most probable configuration, with a lens redshift zl ≈ 1 and a gamma-ray burst redshift zs ≈ 2, yields a present-day number density of about $$2.{3}_{-1.6}^{+4.9}\times 1{0}^{3}\,{\text{Mpc}}^{-3}$$ (90% credibility) with a dimensionless energy density $${{{\varOmega }}}_{{\rm{IMBH}}}\approx 4.{6}_{-3.3}^{+9.8}\times 1{0}^{-4}$$. The false alarm probability for this detection is ~0.6% with trial factors. While it is possible that GRB 950830 was lensed by a globular cluster, it is unlikely as we infer a cosmic density inconsistent with predictions for globular clusters ΩGC ≈ 8 × 10−6 at 99.8% credibility. If a significant intermediate-mass black hole population exists, it could provide the seeds for the growth of supermassive black holes in the early Universe.

## Main

The evidence for a cosmological population of intermediate-mass black holes (IMBHs) is mounting. They have long been posited to reside in the cores of globular clusters. Dynamical friction in stellar clusters causes the most massive stars to sink to the bottom of the cluster’s gravitational potential. Since 2004, simulations have indicated that, for small compact clusters, stellar mergers happen within the lifetime of giant stars8. Critically, these mergers occur before the stars go supernova and disturb the system, leading to a runaway collision and the formation of an ~103M megastar. These short-lived monsters could seed IMBHs, which subsequently grow through accretion and mergers. Yet direct observational signatures of their existence are elusive.

Their large mass puts the majority of IMBH mergers outside the sensitivity range of the current generation of gravitational-wave detectors. The Advanced Laser Interferometer Gravitational-wave Observatory (LIGO)9 and Virgo10 are sensitive to mergers with a total merger-product mass of 400 M. Furthermore, IMBHs are too small to be observed using the same techniques employed to detect supermassive black holes in galactic nuclei. They are either not massive enough or live in a state of starvation, unable to accrete enough gas to power quasar-like emission.

Astronomers are converging on the population of IMBHs from both ends of the black hole mass spectrum. Compact object mergers detected by LIGO–Virgo are uncovering a population of black holes edging closer to the range traditionally reserved for IMBHs11, including the recent discovery of a 150 M merger product12. From the other end, the lower limit on supermassive black holes in the nuclei of dwarf galaxies is descending13. There have been recent findings of compact objects with mass [104–105] M residing in galactic cores14,15. Observations of a tidal disruption event from the evisceration of a star by a black hole’s tidal field suggest an IMBH resides in a star cluster on the outskirts of a barred lenticular galaxy16. In this Letter, we provide evidence for an IMBH using gravitational lensing. Gravitational lensing is one of the few ways to directly constrain IMBH population statistics by providing an estimate for the number density of IMBHs.

In strong gravitational lensing, photon paths from a background source are distorted due to curved spacetime, producing multiple images. The relative fluxes and the difference between arrival times for each image can be used to infer the gravitational structure of the lens. In the case of a compact lens, the mass can be directly determined up to a redshift factor. The fraction of distant sources that experience multiple imaging is directly proportional to the dimensionless energy density of compact lenses, Ωlens ≡ ρlens/ρc (ref. 17), where ρlens is the energy density of lenses and ρc is the critical energy density required for a flat Universe. This fraction is independent of the lens mass, Ml. Strong lensing is accompanied by an overall magnification, typically a factor of a few in flux. This allows us to probe more distant sources, or sources that would otherwise be too faint to detect.

Gamma-ray bursts (GRBs) are extremely luminous bursts of γ-rays, with peak energies of 100–300 keV. They are thought to be generated by the rapid infall of material onto a nascent stellar-mass black hole, formed through either a collapsar supernova or a compact object merger. Some of the accreting material is launched in ultrarelativistic, bipolar jets along the rotation axis. A fraction of this outflow is converted into electromagnetic radiation, which is Lorentz-boosted into γ-rays. The cosmological nature of GRBs is well established by both the isotropy of observed events18 and redshift measurements of their optical afterglow19. A cosmological origin implies that at least some fraction of the GRB population must be strongly lensed1.

Gamma-ray detectors, unlike those used for optical or infrared astronomy, have comparatively poor angular resolution, but good temporal resolution. Thus, we do not expect to resolve a gravitationally lensed image pair in γ-rays. However, a time delay between the two images, resulting from the differences in geometric path and relative differences in gravitational field strength, can be observed. The photons that travel a longer distance arrive first, as the shorter path traverses deeper into the gravitational potential well of the lens where time dilation is stronger. The gravitationally retarded image is dimmer than the first image. The observational signature of such an event is thus an initial γ-ray pulse followed by a duplicate ‘echo’. The duration of the time delay between the burst and the echo is predominantly determined by the mass of the gravitational lens, but also by the alignment of the γ-ray source with respect to the observer-lens line of sight. For a point-mass lens20,21,22

$$(1+{z}_{\text{l}})M_1=\frac{{c}^{3}{{\Delta }}t}{2G}{\left(\frac{r-1}{\sqrt{r}}+\mathrm{ln}\,r\right)}^{-1}.$$
(1)

Here Δt is the time delay, r is the ratio of the fluxes, zl is the lens redshift and (1 + zl)Ml is the redshifted lens mass. By measuring Δt and r we can infer the redshifted mass (1 + zl)Ml.

The total number of observed GRBs is of order 104. We analyse the BATSE dataset as it is the largest available single dataset at ~2,700 bursts. We include both long and short GRBs in our study. For a burst and echo to occur within the same BATSE light curve, we require a time delay of 240 s. The minimum detectable time delay is determined by the width of the γ-ray pulse; if the delay time is too short, the two images merge into one. For long GRBs, the minimum detectable time delay is ~1 s, and for short bursts, it is ~40 ms. This range of time delays corresponds to a lens mass range of approximately 102–107M (refs. 21,23).

We identify preliminary lensing candidates with an autocorrelation analysis7,24. We utilize the four available broadband energy channels of BATSE burst data independently. The equivalence principle dictates that all wavelengths of light are equally affected by gravitational fields. This implies two constraints: the time delay is independent of the photon energy and the gravitational magnification of each image is identical for every wavelength. Once we have identified candidates, we employ Bayesian model selection to determine the Bayesian odds comparing the lensing hypothesis to the no-lensing hypothesis. Our unified framework simultaneously provides the detection significance while estimating the lensing parameters, which we use to infer the lens mass. To model GRB pulses, we employ the fast-rise exponential-decay (FRED) model25. Details are provided in Methods.

We uncover one statistically significant gravitational lensing candidate: GRB 950830 (BATSE trigger 3770)—a short γ-ray burst. The light curve for this burst is shown in Fig. 1 with the reconstructed curve of the best-fit model plotted in black. The black curve is created by taking the mean of the curves drawn by each of the 60,000 posterior sample sets at each time bin. We find that each individual pulse is best fit by a variation of the FRED pulse model plus a sine-Gaussian function. We analyse the four available energy channels independently and find that the lensing hypothesis is preferred in each channel with ln(Bayes factor) (ln(BF)) between 0.5 and 7.0. Adding the ln(BF) values from each of the channels, we find the total ln(BF) = 12.9 (log10BF = 5.6) in favour of lensing, indicating strong statistical support for the lensing hypothesis. A ln(BF) value of eight is considered ‘strong evidence’ in support of one model over the other26. Detailed fits are shown in Extended Data Figs. 16, including an example of a ’double’ burst that is not a lens (Extended Data Figs. 7 and 8).

Assuming a point-mass deflector, the marginalized posterior distributions for time delay and magnification ratio of this lensing event in Fig. 2 can be used in conjunction with equation (1) to infer a redshifted lens mass of (Fig. 3)

$$(1+{z}_{\text{l}}){M}_{\text{l}} \approx 5.{5}_{-0.9}^{+1.7}\times 1{0}^{4}\,M_{\odot}.$$
(2)

There are three astrophysical objects in this mass range, which might serve as a lens: globular clusters, dark matter halos and black holes. A gravitational lens is well approximated as a point mass if most of its mass is contained within the region bound by the two lensed images where they bisect the cosmological plane of the lens. Taking instead an isothermal mass distribution as the gravitational lens, and integrating over all zl, zs, where zs is the source redshift, we find a lens velocity dispersion of ~4 km s−1. From simulations, we can associate this dispersion with an Navarro–Frenk–White profile of mass ~105M (S. Wyithe, personal communication). Globular clusters follow a similar mass–velocity dispersion scaling27. In either framework then, either a singular point mass or a self-gravitating isothermal sphere, we have a consistent measurement for the mass.

Dark-matter halos are numerous, and their number density can be calculated using the Press–Schechter formalism. However, each has a negligible contribution to lensing cross-section, as Navarro–Frenk–White mass distributions typically have cores that are not sufficiently massive to produce multiple images. Globular clusters are compact enough to produce multiple images, but there are not many of them. Assuming that the Milky Way’s ~200 globular clusters are typical, and that the Milky Way formed from an overdensity of approximately 20 Mpc3, then the number density of globular clusters is approximately 10 Mpc−3, giving $${{{\varOmega }}}_{{\rm{GC}}}\left(1{0}^{5}\,{M}_{\odot }\right) \approx 8\times 1{0}^{-6}$$—significantly lower than the mean density implied by GRB 950830.

Following ref. 17, we use the optical depth τ to estimate the cosmological density, $${{\varOmega }} \approx \tau \left(\langle{z}_{s}\rangle\right)$$. Assuming that BATSE γ-ray bursts have a mean redshift of two, the IMBH energy density is

$${{{\varOmega }}}_{{\rm{IMBH}}}\left(M \approx 1{0}^{4}{-}10^{5}\,M_{\odot },\langle{z}_{{\rm{s}}}\rangle \approx 2\right)\approx 4.{6}_{-3.3}^{+9.8}\times 1{0}^{-4}.$$
(3)

The present-day number density of IMBHs is

$${n}_{{\rm{IMBH}}}\left(M \approx 1{0}^{4}{-}10^{5}\,M_{\odot }\right)\approx 2.{3}_{-1.6}^{+4.9}\times 1{0}^{3}\,{{\rm{Mpc}}}^{-3}$$
(4)

(90% credibility), where we have assumed a lens redshift of zl ≈ 1. The uncertainty is from Poisson counting statistics. Thus, there should be approximately $$4.{6}_{-3.2}^{+9.8}\times 1{0}^{4}$$ in the neighbourhood of the Milky Way. There are approximately 108 stellar-mass black holes in the Milky Way28. Assuming all stellar-mass black holes are bound to galaxies, which have a number density ngal ≈ 0.04 Mpc−3, then the number density of stellar-mass black holes is nstellar ≈ 107 Mpc−3. Our result for the IMBH density is consistent with the stellar-mass black hole density assuming that number density scales as ~M−1. Note that the mean redshift of Swift short GRBs is $$\langle{z}_{{\rm{s}}}\rangle\approx 0.8$$. If the GRBs in the BATSE sample had the same mean, then the inferred cosmological density ΩIMBH would increase by about an order of magnitude. Extended Data Figs. 9 and 10 give results at different source and lens redshifts.

Our estimate for ΩIMBH is consistent with the null result of other GRB lens searches6,29, which are sensitive to different lens masses. The Fermi and Konus–Wind catalogues are similar in size to the BATSE GRB catalogue, and there is ~50% probability that these contain another GRB that is gravitationally lensed by an IMBH. In addition, due to the relatively flat GRB luminosity function23, the uncertainty in nIMBH derived from a single lensing event is more significant than the potential magnification bias.

If this detection represents the first determination of the space density of IMBHs, then it may shed light on open questions in astrophysics. How are the supermassive black holes that power quasars so massive at high redshift? Are IMBHs gravitationally bound to galaxies? Do they have observational signatures in electromagnetic or gravitational radiation? What is their relationship to the globular cluster population? Are they the remnants of direct collapse of 104–106M dark matter or baryonic clouds in the early Universe? The identification of additional lensing candidates in the GRB catalogues will confirm this result, and allow a more precise determination of ΩIMBH.

## Methods

We start with a general overview of GRB lensing to place our research within the context of the wider field. From there, we describe our selection method for finding gravitationally lensed GRB candidates. We then discuss the statistics of photon counting in γ-ray astronomy. We construct a Bayesian framework with a model for the lensing signal and γ-ray background. We go on to discuss the validity and robustness of our results. We include calculations to determine the optical depth to lensing for a source population at mean redshift $$\langle{z}_{{\rm{s}}}\rangle$$, and provide evidence against the alternative hypothesis, that GRB 950830 was lensed by a globular cluster. We derive the uncertainty on our estimate for the number density of IMBH nIMBH. We also include an estimate of the false alarm probability, both with and without trial factors. Finally, we include a candidate identified by the autocorrelation detection algorithm but strongly rejected by our Bayesian analysis for illustrative purposes.

### A brief literature review

Gravitational lensing studies of γ-ray bursts typically come in one of two flavours. There are autocorrelation studies, which search for echoes of the γ-ray burst within the same light curve. Then there are cross-correlation studies, which compare the light curve similarity of two separate GRB triggers on a per-bin basis. These are typically accompanied by positional coincidence statistics, which check whether the GRBs have consistent source locations. Our study is of the first flavour.

Traditional strong gravitational lensing refers to the multiple imaging of, for example, quasars due to galactic-mass gravitational lenses. Also known as macrolensing, fiducial image separations are on the order of arcseconds, with inter-image time delays of days to years depending on the lens geometry and source-lens alignment. Millilensing (or mesolensing) is loosely defined as gravitational lensing due to million solar mass objects30, and produces time delays of the order of seconds. The conversion between mass and time delay is

$${{\Delta }}t\approx 50\left({M}_{{\rm{l}}}/1{0}^{6}\,{M}_{\odot }\right)\,\text{seconds}\,$$
(5)

for a Schwarzschild potential21. In essence, millilensing fills the mass range between traditional strong lensing and microlensing whereby stars acting either alone or in unison in galaxies31,32,33 produce multiple images with roughly microsecond time delays. At the more extreme end, nanolensing34 (~10−6–10−1M), picolensing (~10−1–10−7M) and femtolensing35 (~10−16–10−13M) describe deflections and interference effects due to planetary and subplanetary mass gravitational lenses.

Autocorrelation probes millilensing echoes from ~102–106M gravitational lenses. The minimum lens mass is determined by the temporal resolution of the instrument in addition to the variability timescale and duration of the burst. The upper mass limit is determined by the instrumental cutoff of data recording after the event trigger. Numerous autocorrelation searches of the BATSE database have been done using the summed 64 ms light curves7,36,37. Autocorrelation has been used on the Fermi GBM and Swift BAT catalogues6, with a null result for lenses masses of 101–103M.

Cross-correlation studies probe time delays equal to the difference in arrival time of the two bursts. The observation of the second image is inhibited by Earth occultation. This sets a minimum observable time delay, since γ-ray observatories typically have ~90 min orbital periods. Recent work on the Fermi GBM response shows how the observation conditions of a γ-ray burst significantly affect the inferred spectrum38. The effects of detector angular response, energy response, atmospheric scattering, accumulated particle precipitation, cosmic background and galactic sources, such as the Sun or Crab Pulsar, complicate cross-correlation studies. No-lensing studies have looked for GRB lensing across multiple observatories due to the inherent difficulties comparing light curves from instruments with different energy responses. Cross-correlation studies of the BATSE database are also numerous39,40, in addition to Fermi GBM41. A study of Konus–Wind GRBs searching for time delays of roughly hours to ~25 years (lens masses of 108–1013M) was further augmented by the inclusion of spectral analysis29. Another lens identification technique involves correlation of the cumulative light curve in three spectral dimensions42. Correlation-free approaches include a model-agnostic statistical method, which does take into account Poisson statistics3 and Fourier analysis methods4. For a comprehensive review of the gravitational lensing of transient events, see refs. 29,43.

### Candidate selection

The BATSE catalogue contains 2,704 triggered γ-ray bursts. Of these, 2,629 have discsc bfits (64 ms) light curves available for download. Furthermore, higher-time-resolution observations are available for 2,446 of these γ-ray bursts, with 2,435 existing as pre-binned tte bfits (5 ms) light curves. We carry out a preliminary autocorrelation search (described below) on both the discsc bfits and tte bfits pre-binned light curves. Candidate detections are followed up with further analysis. In total, we carry out autocorrelation on 2,679 unique γ-ray bursts.

Signal (auto)correlation can be used to measure the time delay of temporally overlapping signals of a gravitationally lensed system24. We define the autocorrelation function (ACF) as

$$C(\updelta t)=\frac{\mathop{\sum }\nolimits_{j = 0}^{n}I({t}_{j}+\updelta t)I({t}_{j})}{\mathop{\sum }\nolimits_{k = 0}^{N}I{({t}_{k})}^{2}},$$
(6)

where the sum in the numerator is taken over the bins where the two signals overlap, and the sum in the denominator is taken over the entire input signal7,24. Here I(tj) is the count rate at time bin tj, N is the total number of bins and n the total number of overlapping bin, where j and k index these bins in the summations.

We fit a third-order Savitzky–Golay filter Ft) to the ACF. The dispersion σ between the ACF and the fit Ft) is

$${\sigma }^{2}=\frac{1}{N}\mathop{\sum }\limits_{j=0}^{N}{[C(\updelta {t}_{j})-F(\updelta {t}_{j})]}^{2},$$
(7)

where N is the total number of bins. We identify 3σ outliers as gravitational-lensing candidates6,7. Furthermore, we autocorrelate each of the four BATSE LAD energy channels, and perform the same filtering process. Gravitational lensing is achromatic for point sources, so we expect that each channel of a candidate lens GRB should autocorrelate with the same time delay. We check that candidates yield lensing signals in both the summed light curve and individual energy channels.

### Photon counting

Photon counting is a Poisson process. High-energy satellites such as BATSE accumulate photons at a series of discrete times, t1, t2, ... tn. For BATSE, these photons are collected with a sampling frequency of 500 kHz. In most cases, hardware limitations require that the BATSE photon arrival times (time-tagged events; TTEs) are downsampled before transmission to Earth. Only the shortest, moderately bright bursts are completely contained within the TTE photon-list data. Fortunately, this is the case for GRB 950830. For bursts not completely encoded in a TTE list, the counts are averaged into 64 ms bins before transmission, typically recorded for ~240 s after triggering. We ignore the fact that BATSE has a small dead time (of about one clock cycle) after each count as this is only becomes import for very bright bursts that saturate the detector.

If we consider a single time stamp ti, the likelihood of observing Ni photons is given by Poisson counting statistics

$${\mathcal{L}}({N}_{i}| \theta )=\frac{{\lambda }_{\theta ,i}^{{N}_{i}}{{\rm{e}}}^{-{\lambda }_{\theta ,i}}}{{N}_{i}!}.$$
(8)

The expected number of photons, λθ is

$${\lambda }_{\theta ,i}=\updelta {t}_{i}\ R({t}_{i}\theta ).$$
(9)

Here δti is the sampling time and R(tiθ) is the photon rate (in units of photons per unit time) evaluated at time ti and given model parameters θ. The sampling time, δti, is subscripted with index i to account for the cases where the time resolution in the available data changes during an event. The rate can be written as a sum of signal S (from the GRB) and background B

$$R({t}_{i}| \theta )=B+S({t}_{i}| \theta ).$$
(10)

To first order, the background is constant, but the signal varies with time according to model parameters θ.

The likelihood of observing $${\bf{N}}={N}_{1},{N}_{2},...$$ photons at times t1, t2, ... is given simply by taking the product of the likelihood functions evaluated at different times

$${\mathcal{L}}({\bf{N}}| \theta )=\prod _{i}{\mathcal{L}}({N}_{i}| \theta ).$$
(11)

It is easier, though, to work with the ln likelihood, which is

$${\mathrm{ln}}\,{\mathcal{L}}({\bf{N}}| \theta )=\sum _{i}{\mathrm{ln}}\,{\mathcal{L}}({N}_{i}| \theta )$$
(12)
$$\begin{array}{l} = \sum _{i}{N}_{i}{\mathrm{ln}}\,\left(\updelta {t}_{i}B+\updelta {t}_{i}S({t}_{i}| \theta )\right) \\ \quad -\left(\updelta {t}_{i}B+\updelta {t}_{i}S({t}_{i}| \theta )\right)-{\mathrm{log}}\,({N}_{i}!).\end{array}$$
(13)

### Bayesian inference

There are two goals of Bayesian inference. The first is to derive posterior distributions p(θd) for our model parameters, which enables us to determine their credible intervals. The second goal is to calculate the Bayesian evidence $${\mathcal{Z}}$$ for a set of models to do model selection. The Bayes theorem

$$p(\theta | d)=\frac{{\mathcal{L}}(d| \theta )\pi (\theta )}{{\mathcal{Z}}},$$
(14)

relates the posterior probability density p(θd) of model parameters θ given the observed data d, to a likelihood function $${\mathcal{L}}(d| \theta )$$ and prior probability density π(θ). The likelihood function is a mathematical description of the probability of observing the data with the given model parameters. The priors are probability distributions for what we expect these parameters to be, which, in our case, are informed by the BATSE GRB population. The evidence, also called the marginal likelihood, is a normalization factor that gives information about the quality of the fit of the model to the data averaged over parameter space, viz

$${\mathcal{Z}}=\int {\mathcal{L}}(d| \theta )\pi (\theta ){\rm{d}}\theta .$$
(15)

We define different models for

$$S({t}_{i}| \theta ,M),$$
(16)

which we use to do Bayesian inference. The null model M = Mnull states that there is no lensing. The lens model M = Ml states that there is lensing. We adopt the FRED pulse model, which is ubiquitous in GRB pulse modelling:

$$S(t| A,\tau ,\xi ,{{\varDelta }})=A\exp \left[-\xi \left(\frac{t-{{\varDelta }}}{\tau }+\frac{\tau }{t-{{\varDelta }}}\right)\right].$$
(17)

Here A is a vertical y-scale factor, τ is a duration scaling parameter, Δ is the time delay and ξ is an asymmetry parameter, which can be used to adjust the skewness of the pulse. A more generalized form of this model has additional exponents, γ, ν, allowing for flatter/sharper peaks, viz

$$S(t| A,\tau ,\xi ,{{\varDelta }},\gamma ,\nu )=A\exp \left[-{\xi }^{\gamma }{\left(\frac{t-{{\varDelta }}}{\tau }\right)}^{\gamma }-{\xi }^{\nu }{\left(\frac{\tau }{t-{{\varDelta }}}\right)}^{\nu }\right].$$
(18)

We call this the extended FRED model, or FRED-X for short. An analytic normalization exists for both the FRED and FRED-X models, which decouples the maximum height of the pulses from every parameter except A, such that A is the maximum amplitude of the pulse. Structured pulses can be modelled as either multiple overlapping pulses, or by accounting for the residual structure with another parameterization. Thus, a single channel FRED light curve requires 4n + 1 parameters, where the +1 corresponds to the constant background parameter B. For bursts with many pulses, our model is:

$${S}_{\text{tot}}=\sum _{j}S(t| {{{\varDelta }}}_{j},{A}_{j},{\tau }_{j},{\xi }_{j}).$$
(19)

Our prior enforces

$${{{\varDelta }}}_{j+1}>{{{\varDelta }}}_{j}.$$
(20)

to ensure that we are not fitting the same pulse configuration in different permutations.

The FRED model has proved a popular phenomenological fit due to its simplicity and a posteriori applicability to certain GRB progenitor models. Some authors have noted (and we confirm here) that there is a systematic residual structure, visible after subtracting the best-fit FRED and FRED-X models from a GRB light curve, indicating an imperfect fit44. We model these residuals using a sine-Gaussian wave packet

$$\,{\text{res}}\,(t)={A}_{\text{res}}\exp \left[-{\left(\frac{t-{{{\varDelta }}}_{\text{res}}}{{\tau }_{\text{res}}}\right)}^{2}\right]\cos \left(\omega t+\varphi \right),$$
(21)

where ω and φ are fitted constants, as it is ubiquitous in physics and provides an adequate fit to the residual structure. The residual is part of our signal model, so we fit it simultaneously to any FRED pulses:

$$S(t| \theta )=S(t| {\theta }_{{\rm{fred}}})+\,{\text{res}}\,(t| {\theta }_{\text{res}}).$$
(22)

The lens model is similar to the null model, but with two extra parameters used to describe the delayed signal:

$${S}_{\text{lens}}({\theta }_{\text{lens}})=S(t| {\theta }_{\text{null}})+{r}^{-1}\times S(t+{{\Delta }}t| {\theta }_{\text{null}})$$
(23)

where the lens parameter vector θlens subsumes the null parameter vector θnull in addition to the time delay, Δt, and magnification ratio, r. The parameter r reduces the amplitude of the delayed signal while the parameter Δt describes the size of the delay. Thus, the lens model requires 4n + 3 parameters, where nlens is typically about half nnull.

To determine which model is favoured, we calculate the Bayesian evidence for each model:

$${{\mathcal{Z}}}_{\text{null}}=\int {\rm{d}}{\theta }_{\text{null}}\ {{\mathcal{L}}}_{\text{null}}({\bf{N}},{\theta }_{\text{null}})\pi ({\theta }_{\text{null}}),$$
(24)
$${{\mathcal{Z}}}_{\text{lens}}=\int {\rm{d}}{\theta }_{\text{lens}}\ {{\mathcal{L}}}_{\text{lens}}({\bf{N}},{\theta }_{\text{lens}})\pi ({\theta }_{\text{lens}}).$$
(25)

Here π denotes a prior distribution and N is the vector of photon counts. Once we have each evidence, we obtain the ln(BF)

$$\mathrm{ln}\,(\,\text{BF}\,)=\mathrm{ln}\,{{\mathcal{Z}}}_{\text{null}}-\mathrm{ln}\,{{\mathcal{Z}}}_{\text{lens}}.$$
(26)

The BF is a statistically rigorous measure of which model the data prefer. A ln(BF)  8 is considered ‘strong evidence’ in support of one model over the other26.

To perform parameter estimation and evidence calculations, we use the Bilby Bayesian inference library45. We employ nested sampling46,47, taking advantage of the multi-ellipsoid bounding method48, with dynamically updated sampling points49. Results tend to be unimodal, but we use multi-ellipsoid bounding regardless due to its flexibility and speed in the case of multimodal results. Some parameters recover bimodal distributions, particularly in pulse start times Δj, due to the pre-binning of the BFITS datatype analysed.

### Priors

The priors are tabulated in Table 1. We use log-uniform priors on parameters, which typically vary by orders of magnitude and uniform priors for other parameters. The prior ranges are informed by the BATSE GRB population. We fit models to a large selection of isolated, individual pulses to develop intuition for the practical bounds of the priors. A more sophisticated analysis would employ hierarchical inference to infer the shape of the prior distributions, but we leave this for future work. The priors for quantities related to time (Δ, Δres, Δt) are taken to be uniform. The prior range depends on the particular trigger being investigated, as the GRB population is (bimodal) log-normal in duration over many orders of magnitude. Thus the priors must be chosen appropriately for a region of time that will contain all the pulses. Care is taken with the time delay prior to ensure that the extra pulses due to lensing are not occurring outside the light curve under investigation. In addition, the prior forces the second pulse to occur after the first pulse.

### Results and interpretations

For GRB 950830, we find that lensing is strongly preferred over two-pulse models. The two pulses in Fig. 1 are so alike that the data prefer a fit with a single set of pulse parameters. Thus, a single pulse seen twice with delay time Δt and reduced in brightness by some scaling factor r is the preferred model compared with a more complex model with two completely independent pulses. We interpret this result as evidence that GRB 950830 was strongly lensed.

A lensed FRED-X model with a sine-Gaussian residual is the preferred model (see equations (18) and (21) for the signal model). There is only a single pulse, which is later repeated, so j {1}. The fits to the light curve for each channel are shown in Extended Data Figs. 14. The median fits of the FRED-X pulses and sine-Gaussian pulses are plotted individually, and the sum of both is shown in the third panel of each figure. There are also 100 individual posterior draws for each model to show the breadth and multi-modality of the fits. Compared with the corresponding two-pulse model, the lens model is favoured by ln(BF) = 12.9. We find that other lens models are similarly favoured. No matter which pulse model we implement, the lensing hypothesis is always favoured. The simplest model comparison comparing a single lensed FRED pulse to a null model with two independent FRED pulses has the largest BF with ln(BF) = 24.5.

A model with more parameters is naturally penalized in Bayesian model selection by virtue of the larger region of prior volume explored when calculating the Bayesian evidence26. We therefore ask: is the lens model favoured because an additional pulse simply adds such a great volume to our prior space? We investigate the effect of prior volume on the model selection to assure ourselves that we have not arrived at a spurious result. The extra parameters in the FRED-X model are γ and ν. We test priors on γ and ν in the ranges, (10−1, 101), (10−2, 102) and (10−3, 103) in both uniform and log-uniform spaces. We also include a narrow Gaussian prior centred on the values found in previous analysis (typically between 1/4 and 4). In all, we study seven different prior volumes for two models in each of the four channels. The effect on the resultant model selection is minimal. Looking at the corresponding pairs of null and lens models which have the same priors, we find the ln(BF) changes by ~1–2.

Channel 3 (green) exhibits the greatest variation in its BF, likely due to having the highest signal-to-noise ratio. For channel 4 (blue), the inclusion of a sine-Gaussian residual makes the two-pulse (null) model marginally preferred (ln(BF) ≈ 1) over a lens model. The ln(BF) values in favour of lensing are ~2–5 per channel, depending on the prior. The total BF quoted in the main body of the paper assumes log-uniform priors for γ and ν on (10−1, 101). In any case, the two parameters used to infer the lens mass are largely independent of the model or choice of priors. We find that our result is independent of the nested sampling package, for example, Dynesty50 and Nestle (http://kylebarbary.com/nestle/), used to run the analysis.

As a sanity check, we apply our analysis not only to the pre-binned tte_bfits data, but we also take the photon arrival time data (tte_list) and run the analysis again on the counts incident at each triggered detector. There are three: detectors 5, 6 and 7. We bin the count data to 0.005 ms bins to match the pre-binned light curve and repeat our analysis. We find that there is no change to the model section. While individual Bayesian evidence factors and therefore model comparison BF fluctuate when considering different data, the lensing model is consistently preferred in each channel for each triggered detector.

We also analyse the hardness of GRB 950830. The hardness duration of GRB 950830 and the rest of the BATSE GRB population with published T90’s is shown in Extended Data Fig. 5. The hardness H32 is defined as background counts in channel 3 (110–320 keV, green) to the counts in channel 2 (60–110 keV, yellow). We estimate the background by taking the mean of the bins outside the trigger region of the burst light curve. We find that the hardness of pulse A (2.09 ± 0.10) and pulse B (1.83 ± 0.11) of GRB 950830 agree within statistical errors. We expect two lensed pulses to exhibit the same hardness as lensing is achromatic for point sources. The slightly different duration between the two pulses (160 ms, 130 ms) is due to the lower amplitude of the second pulse (pulse B). We apply a two-component Gaussian mixture model to segregate long and short γ-ray bursts. The duration and hardness of GRB 950830 are typical of a short γ-ray burst. We have included the autocorrelation of the light curve of GRB 950830 in Extended Data Fig. 6.

To improve our analysis, we could a priori constrain the magnification ratio and time delay to be the same parameter in each of the spectral channels. The eight parameters in the lens model—two from each channel—are reduced to just two shared between the four energy channels. However, analysing the channels separately provides an independent check that the magnification ratios and time delays are consistent, in accordance with the equivalence principle (cf. Fig. 3 and Extended Data Fig. 8). Below, we revisit this topic, analysing the data with multiple channels simultaneously. Doing this four-channel nested sampling analysis on the FRED-X model with a sine-Gaussian residual becomes prohibitively expensive. Since we believe that this will only increase the Bayesian evidence in favour of lensing, and as our result is already quite strong (ln(BF) = 12.9), we leave this analysis for future work.

Furthermore, we could include a spectral model to relate the pulse fits in the four channels, reducing the number of free parameters in our model. The canonical GRB spectra model—the Band function—is a time-averaged spectra51, which would not suit our purposes of a time-evolving spectra. Addition of a spectral model requires the analysis of four time series simultaneously, which is computationally challenging. We leave this as a goal for future work.

Another future goal is to use hierarchical inference to infer the prior distributions for FRED-X parameters using the full catalogue of GRBs, the vast majority of which do not contain a lens. This would yield priors consistent with the population properties of GRBs. Again, we expect this to only strengthen the evidence in favour of lensing. Finally, we do not fully utilize the available high-resolution (TTE-list data), since this requires analysis of an 800,000 unit time series. This analysis is prohibitively expensive for the many-parameter models. We are able to run a simple FRED model equation (17), and found that lensing was similarly favoured in all channels when running the analysis with the pre-binned BFITS data.

We have thus far assumed that we expect each image of a gravitationally lensed GRB will be statistically consistent. We have not discussed the many potential causes for anisotropy between the images. Gamma-ray bursts are highly beamed due to the ultrarelativistic velocities (γ ≈ 103–104) of their progenitor outflow. This results in the viewing angle onto the emission surface becoming important, since the radiation is beamed within an angle of θ ≈ γ−1. The difference in viewing angle onto the source scales with the mass of the lens—the more massive the lens, the stronger the deflection, the greater the original angular separation of the lines of sight onto the source. Assuming a homogeneous emission surface, both lines of sight onto the source should be viewing the same region for masses Ml 1012M. For larger masses, the deflection angle becomes great enough such that the observer is viewing two emission regions that may not be in casual contact, thus the gravitationally lensed images need not be identical. For smaller lens masses, anisotropy in the GRB emission surface can result in the images having inherent differences. Finally, as discussed earlier, the detector orientation and energy response can have a significant effect on the inferred energy spectrum, potentially resulting in a false negative identification of a gravitationally lensed pair of γ-ray bursts.

### Method limitations

Our method provides advantages over model-agnostic approaches such as correlation, which do not include all available information, for example, Poisson counting statistics. Bayesian inference provides a natural framework to make quantitative statistical statements about preferred models. Our methodology provides a metric for detection significance, and successfully rejects dubious candidates, which trigger an autocorrelation detection (see ‘A rejected candidate’). Of course, the results of Bayesian inference are only as good as the choice of model and priors. We try a variety of pulse models and prior ranges to ensure our results are robust, and find that the statistically identical pulse model is consistently preferred. This does not preclude the existence of a better pulse model. We have shown that the gravitational lens candidate GRB 950830 is robustly detected using both traditional GRB lensing techniques and our Bayesian inference method.

Finally, we point out that any method relying on self-similarity can produce false positive lensing candidates if identical repeating pulses are a feature of some γ-ray bursts. However, we regard the ‘intrinsic self-similarity’ hypothesis as unlikely as the vast majority of GRBs are not seen to repeat, and we cannot think of a physical mechanism that would cause a subpopulation of short GRBs to emit identical pulses.

### Estimate of optical depth

A rough estimate for the optical depth to strong gravitational lensing is

$$\tau =\frac{{N}_{\text{lens}}}{{N}_{\text{GRB}}},$$
(27)

where Nlens is the number of multiply imaged GRBs and NGRB is the total number of GRBs in our dataset. We find Nlens = 1 lensed GRB in a dataset of NGRB = 2,679, so the lens probability is $$P(\tau ) \approx \tau =3.{7}_{-2.6}^{+7.8}\times 1{0}^{-4}$$ (90% credibility), where we have used a Jeffreys prior. We may relate the energy density of lenses to the optical depth, $${{{\varOmega }}}_{{\rm{l}}} \approx \tau (\langle{z}_{{\rm{s}}}\rangle)$$ (ref. 17), where $$\langle{z}_{{\rm{s}}}\rangle$$ is the mean redshift of sources in the sample.

For a point mass and a point lens, the angular Einstein radius of the lens is

$${\theta }_{{\rm{E}}}^{2}=\frac{4G{M}_{{\rm{l}}}}{{c}^{2}}\frac{{d}_{{\rm{A}}}({z}_{{\rm{l}}},{z}_{{\rm{s}}})}{{d}_{{\rm{A}}}({z}_{{\rm{l}}}){d}_{{\rm{A}}}({z}_{{\rm{s}}})}.$$
(28)

Here G is the gravitational constant, c the speed of light and Ml the mass of the gravitational lens. The angular diameter distances are defined as $${d}_{{\rm{A}}}({z}_{{\rm{l}}},{z}_{{\rm{s}}})=\left(\chi ({z}_{{\rm{s}}})-\chi ({z}_{{\rm{l}}})\right)/(1+{z}_{{\rm{s}}})$$, with proper comoving distance

$$\chi ({z}_{{\rm{l}}},{z}_{{\rm{s}}})=\frac{c}{{H}_{0}}\int_{{z}_{{\rm{l}}}}^{{z}_{{\rm{s}}}}\frac{{\rm{d}}z}{\sqrt{{{{\varOmega }}}_{{{\varLambda }}}+{{{\varOmega }}}_{{\rm{m}}}{(1+z)}^{3}}}.$$
(29)

We take ΩΛ = 0.714 and Ωm = 0.286, where ΩΛ and Ωm are the cosmic densities in dark energy and matter, respectively, with present-day Hubble constant H0 = 69.6 km s−1 Mpc−1. The angular impact parameter β of the true position of the source to the lens can be parameterized in units of the Einstein radius, y ≡ β/θE. Such a configuration creates two images, with time delay given by

$${{\Delta }}t({M}_{{\rm{l}}},{z}_{{\rm{l}}},y)=(1+{z}_{{\rm{l}}})\frac{4G{M}_{{\rm{l}}}}{{c}^{3}}f(y),$$
(30)

where

$$f(y)=\left(\frac{y}{2}\sqrt{{y}^{2}+4}+{\mathrm{ln}}\,\frac{\sqrt{{y}^{2}+4}+y}{\sqrt{{y}^{2}+4}-y}.\right)$$
(31)

A source with angular impact parameter β has an effective lensing cross-section of

$$\begin{array}{lll}\int \sigma &=&\mathop{\int}\nolimits_{{\beta }_{\text{min}}}^{{\beta }_{\max }}2\uppi \beta \ {\rm{d}}\beta \\ &=&\uppi {\theta }_{{\rm{E}}}^{2}\mathop{\int}\nolimits_{{y}_{\text{min}}}^{{y}_{\max }}2y\ {\rm{d}}y\\ &=&\frac{4\uppi G{M}_{{\rm{l}}}}{{c}^{2}}\frac{{d}_{{\rm{A}}}({z}_{{\rm{l}}},{z}_{{\rm{s}}})}{{d}_{{\rm{A}}}({z}_{{\rm{l}}}){d}_{{\rm{A}}}({z}_{{\rm{s}}})}\mathop{\int}\nolimits_{{y}_{\text{min}}}^{{y}_{\text{max}}}2y\ {\rm{d}}y.\end{array}$$
(32)

Thus, ymin and ymax turn the cross-section into an annulus. The minimum impact parameter is set by the time delay between the arrival times of the two images. If the time delay is too short, the images will appear as single γ-ray burst. For a point lens, we may calculate the minimum time delay for a lens of mass Ml at redshift zl by inverting equation (30)

$${y}_{\text{min}}({{\Delta }}{t}_{\text{min}},{M}_{{\rm{l}}},{z}_{{\rm{l}}})={f}^{-1}\left(\frac{{c}^{3}{{\Delta }}{t}_{\text{min}}}{(1+{z}_{{\rm{l}}})4G{M}_{{\rm{l}}}}\right),$$
(33)

since f(y) is monotonic increasing in y. We take Δtmin = 10 ms. The latter-arriving image is dimmer than the first image but must still be above the detectable flux for the detector, μ2φpeak > φ0, where μ2 is the magnification of the dimmer image. This restricts the maximum possible impact parameter23:

$${y}_{\text{max}}({\varphi }_{\text{peak}})={\left(1+\frac{{\varphi }_{\text{peak}}}{{\varphi }_{0}}\right)}^{1/4}-{\left(1+\frac{{\varphi }_{\text{peak}}}{{\varphi }_{0}}\right)}^{-1/4},$$
(34)

where φpeak/φ0 is the peak counts divided by the trigger threshold at that time. We estimate ymax with medians of the φpeak/φ0 for the peak flux on 64 ms, 256 ms and 1,024 ms integrations from the BATSE Cmax table (https://go.nature.com/3qv0fDn), which are 1.5, 2.2 and 2.5, respectively. The final cross-section is then

$$\sigma ({\bf{x}})=\frac{4\uppi G{M}_{{\rm{l}}}}{{c}^{2}}\frac{{d}_{{\rm{A}}}({z}_{{\rm{l}}}){d}_{{\rm{A}}}({z}_{{\rm{l}}},{z}_{{\rm{s}}})}{{d}_{{\rm{A}}}({z}_{{\rm{s}}})}\left({y}_{\,\text{max}}^{2}-{y}_{\text{min}\,}^{2}\right){{\varTheta }}\left({y}_{\text{max}}-{y}_{\text{min}}\right)$$
(35)

where $${\bf{x}}\equiv ({M}_{{\rm{l}}},{z}_{{\rm{l}}},{z}_{{\rm{s}}},{\varphi }_{\text{peak}},{\varphi }_{0},{{\Delta }}{t}_{\text{min}})$$ and Θ is the Heaviside step function.

The optical depth is the number density n(zl) of lenses at redshift zl, multiplied by the effective lensing cross-section of each lens σ(x), integrated over z (0, zs):

$$\tau ({\bf{x}})=\frac{1}{{\rm{d}}{{\varOmega }}}\int_{0}^{{z}_{{\rm{s}}}}{\rm{d}}V({z}_{{\rm{l}}})n({z}_{{\rm{l}}})\int {\rm{d}}\sigma ({\bf{x}}).$$
(36)

We assume a constant comoving density of lenses

$${n}_{{\rm{l}}}({z}_{{\rm{l}}})={n}_{0}{(1+{z}_{{\rm{l}}})}^{3}.$$
(37)

The number density of lenses can be related to their energy density Ωl through

$${n}_{0}=\frac{{\rho }_{{\rm{c}}}{{{\varOmega }}}_{{\rm{l}}}}{{M}_{{\rm{l}}}}=\frac{3{H}_{0}^{2}{{{\varOmega }}}_{{\rm{l}}}}{8\uppi G{M}_{{\rm{l}}}}.$$
(38)

With comoving volume element

$$\begin{array}{lll}{\rm{d}}V(z)&=&{\chi }^{2}(z)\frac{{\rm{d}}\chi (z)}{{\rm{d}}z}\ {\rm{d}}z\ {\rm{d}}{{\varOmega }}\\ &=&{\chi }^{2}(z)\frac{c}{{H}_{0}}\frac{{\rm{d}}z\ {\rm{d}}{{\varOmega }}}{\sqrt{{{{\varOmega }}}_{{{\varLambda }}}+{{{\Omega }}}_{m}{(1+z)}^{3}}},\end{array}$$
(39)

we have

$$\begin{array}{lll}\tau ({\bf{x}})&=&\frac{3{H}_{0}{{{\varOmega }}}_{{\rm{l}}}}{2c\chi ({z}_{{\rm{s}}})}\mathop{\int}\nolimits_{0}^{{z}_{{\rm{s}}}}{\rm{d}}{z}_{{\rm{l}}}\frac{(1+{z}_{{\rm{l}}})\chi ({z}_{{\rm{l}}})}{\sqrt{{{{\varOmega }}}_{{{\varLambda }}}+{{{\varOmega }}}_{{\rm{m}}}{(1+{z}_{{\rm{l}}})}^{3}}}[\chi ({z}_{{\rm{s}}})-\chi ({z}_{{\rm{l}}})]\\ &&\times \left[{y}_{\,\text{max}\,}^{2}({\varphi }_{\text{peak}},{\varphi }_{0})-{y}_{\,\text{min}\,}^{2}({{\Delta }}{t}_{\text{min}},{M}_{{\rm{l}}},{z}_{{\rm{l}}})\right].\end{array}$$
(40)

With an estimated lens probability of P(τ) ≈ τ ≈ 3.7 × 10−4, we infer the lens density by inversion of equation (40). The result of this integral is shown in Extended Data Fig. 9 for several mean source redshifts $$\langle{z}_{{\rm{s}}}\rangle$$ each with the three permutations of φpeak/φ0 from the BATSE Cmax table.

The seven BATSE bursts with known redshifts are GRB 970508 with z = 0.835, GRB 970828 with z = 0.958, GRB 971214 with z = 3.412, GRB 980425 with z = 0.0085, GRB 980703 with z = 0.967, GRB 990123with z = 1.600 and GRB 990510 with z = 1.619, with mean $$\langle{z}\rangle$$ = 1.34. The average spectroscopic redshift of Swift γ-ray bursts is $$\langle{z}\rangle$$ = 2.2 (ref. 52). We are unable to accurately estimate the redshift of GRB 950830 or the BATSE catalogue in general due to the inherent degeneracy between the effects of cosmological redshift and relativistic beaming on a γ-ray burst light curve. We argue that a mean BATSE GRB redshift of $$\langle{z}_{{\rm{s}}}\rangle$$ ≈ 2 is appropriate based on the redshifts of known BATSE bursts and the spectroscopically determined redshifts of other GRB catalogues. We include the derived energy densities for a number of redshifts in Extended Data Fig. 10 for comparison. The lens densities are calculated from the source redshifts and optical depth through equation (40). With the inferred lens densities Ωl, we may exclude our calculated globular cluster density ΩGC ≈ 8 × 10−6 based on Poisson statistics. Observing one gravitational lens in ~2,679 light curves is very unlikely for such a low cosmological density.

The present-day number density is given by

$${n}_{{\rm{IMBH}}}({z}_{{\rm{l}}},{z}_{{\rm{s}}})=\frac{{{{\varOmega }}}_{{\rm{IMBH}}}({z}_{{\rm{s}}})\ {\rho }_{{\rm{c}}}}{{M}_{{\rm{IMBH}}}({z}_{{\rm{l}}})},$$
(41)

where ρc is the critical energy density of the Universe and MIMBH(zl) is the mass of the lens. With $${{{\varOmega }}}_{{\rm{IMBH}}}(\langle{z}_{{\rm{s}}}\rangle \approx 2)=4.{6}_{-3.3}^{+9.8}\times 1{0}^{-4}$$ and $$(1+{z}_{{\rm{l}}}){M}_{{\rm{IMBH}}}=5.{5}_{-0.9}^{+1.7}\times 1{0}^{4}\ M_{\odot}\Rightarrow \, {M}_{{\rm{IMBH}}}({z}_{{\rm{l}}} \approx 1) \approx 2.{8}_{-0.9}^{+1.7}\times 1{0}^{4}\, M_{\odot}$$ yields $${n}_{{\rm{IMBH}}}=2.{3}_{-1.6}^{+4.9}\times 1{0}^{3}\,{{\rm{Mpc}}}^{-3}$$ through equation (38). Where zl ≈ 1 comes from a gravitational lens being most likely to occur halfway between the observer and source. Uncertainty on the density of IMBHs arises from the fact that Nlens is Poisson distributed. We calculate the uncertainty on nl assuming zl = 0, as we do not know where the lens is, only that its most probable redshift is zl ≈ 1. We ignore the uncertainty due to the lens mass as it is much more precisely determined. To calculate the uncertainty on nIMBH, we assume that the likelihood of the data given nIMBH follows an N = 1 Poisson distribution. Employing a Jeffreys’ prior

$$\pi ({n}_{{\rm{IMBH}}}\propto {n}_{{\rm{IMBH}}}^{-1/2}),$$
(42)

we obtain a 90% credible interval of nIMBH = 0.7 × 103–7.2 × 103 Mpc−3.

### Magnification bias

It is possible that magnification bias may affect the estimate of the expected probability of lensing events. The possibility of magnification bias is discussed in ref. 23, but the details are updated here from ref. 53. For magnification bias to be greater than a few percent, the cumulative number counts dN of the physical parameter P by which the events are detected needs to have α > 2, where dNPα. In the case of GRBs, P is the peak flux over the trigger energy range. For BATSE, the number counts as a function of peak flux are given in Fig. 653. Estimating the value of α from these plots gives α ≈ 1.1. The trigger flux for GRB 950830 falls near the faint end of the distribution at 2.81 ± 0.12 photons cm−2 s−1 in the 50–300 keV energy range over integration times of 64 ms, 256 ms and 1,024 ms.

### The lens is unlikely to be a globular cluster

Let us assume that all globular clusters have the same mass as the discovered deflector. The globular cluster mass function has a turnover at ~2 × 105M (ref. 54), so this approximation is not necessarily a bad one, especially given the uncertainty in the inferred lens mass. The Milky Way formed from an overdensity on a scale of approximately 20 Mpc3. If the 200 globular clusters in the Milky Way is an average number count for a given cosmic volume, then the number density of globular clusters is approximately n ≈ 10 Mpc−3. Thus with n ≈ 10 Mpc−3, M ≈ 105M:

$$\begin{array}{lll}{{{\varOmega }}}_{{\rm{GC}}}&=&\rho \frac{8\uppi G}{3{H}_{0}^{2}},\qquad \rho =nM\\ &\approx &8\times 1{0}^{-6}\end{array}$$

This is too low to be consistent with our inferred value of Ω ≈ 4 × 10−4, suggesting that the lens is not a globular cluster. Assuming a mean source redshift of $$\langle{z}_{{\rm{s}}}\rangle \approx 2$$ in the BATSE catalogue, we exclude a globular cluster lens at 99.85% credibility. See Extended Data Fig. 10 for exclusion credibilities for different mean redshifts. The mean of BATSE γ-ray bursts with known redshift $$\langle{z}\rangle$$ = 1.34 gives an exclusion credibility of 99.97%, with Ωl = 1.43 × 10−3.

### Combining data from different channels

In the analysis presented above, we analyse each channel independently. This enables us to carry out posterior checks (Fig. 2) while controlling computational costs. However, to estimate the significance of the lensing signal, we combine the results from each channel together, increasing the resolving power to obtain a single BF for the lensing versus no-lensing hypotheses. There are several steps. First, we take the posterior samples used to calculate the credible intervals for delay time Δt and magnification ratio r in Fig. 2 and use a kernel density estimator to obtain an analytic description of the posterior distribution for each channel i:

$$p({{\Delta }}t,r| {d}_{i}).$$
(43)

This step is necessary to obtain smooth functions that can be multiplied together. Next, we invoke Bayes’ theorem to convert the kernel density estimators to likelihoods distributions for each channel:

$${\mathcal{L}}({d}_{i}| {{\Delta }}t,r)=\frac{{{\mathcal{Z}}}_{i}}{\pi ({{\Delta }}t,r)}p({{\Delta }}t,r| {d}_{i}).$$
(44)

If the two pulses are created by a lens, then the delay time Δt and magnification ratio r are the same for each channel. Thus, the total evidence for the lensing hypothesis is given by the product of likelihoods for each data channel, marginalized over (Δt, r):

$${{\mathcal{Z}}}_{\text{lens,tot}}=\int {\rm{d}}{{\Delta }}t\int {\rm{d}}r\ \pi ({{\Delta }}t,r)\prod _{i}{\mathcal{L}}({d}_{i}| {{\Delta }}t,r)$$
(45)
$$=\int {\rm{d}}{{\Delta }}t\int {\rm{d}}r\ \pi ({{\Delta }}t,r)\prod _{i}\left(\frac{{{\mathcal{Z}}}_{\text{lens, i}}}{\pi ({{\Delta }}t,r)}{p}_{i}({{\Delta }}t,r| {d}_{i})\right).$$
(46)

In contrast, if the two pulses are not created from a lens, there is no reason for the delay time and magnification ratio to be the same for each channel, and so the total evidence for the null hypothesis is given simply by the product of the evidence values for each channel:

$${{\mathcal{Z}}}_{\,\text{null}}^{\text{tot}\,}=\prod _{i}{{\mathcal{Z}}}_{\text{null, i}}$$
(47)

Evaluating equations (45) and (47), we obtain a total ln(BF) = 12.93 in favour of the lensing hypothesis.

### False alarm probability

In Bayesian statistics, we carry out model selection using the posterior odds26

$${{\mathcal{O}}}_{\,\text{null}}^{\text{lens}\,}=\frac{{{\mathcal{Z}}}_{\text{lens}}}{{{\mathcal{Z}}}_{\text{null}}}\frac{{\pi }_{\text{lens}}}{{\pi }_{\text{null}}},$$
(48)

where $${{\mathcal{Z}}}_{\text{lens}}/{{\mathcal{Z}}}_{\text{null}}=\text{BF}\,$$ is the BF from equation (26). The prior odds, πlens/πnull, expresses the relative probability assigned a priori to the hypothesis of lensing over a null model. If we assign an equal prior probability to both hypotheses, then

$${{\mathcal{O}}}_{\,\text{null}}^{\text{lens}\,}=\frac{{{\mathcal{Z}}}_{\text{lens}}}{{{\mathcal{Z}}}_{\text{null}}}$$
(49)
$$=\frac{{p}_{\text{lens}}}{1-{p}_{\text{lens}}},$$
(50)

and so the false alarm probability is

$$\begin{array}{lll}1-{p}_{\text{lens}}&=&\frac{1}{1+\,\text{BF}\,}\\ &=&\frac{1}{1+{{\rm{e}}}^{12.9}}\\ &=&2.5\times 1{0}^{-6}\end{array}$$

A more conservative approach is to assign prior odds equal to the reciprocal of the total number of bursts searched (or equivalently, equal to the optical depth), which gives us:

$$\begin{array}{lll}{{\mathcal{O}}}_{\,\text{null}}^{\text{lens}\,}&=&\frac{{{\mathcal{Z}}}_{\text{lens}}}{{{\mathcal{Z}}}_{\text{null}}}\frac{{\pi }_{\text{lens}}}{{\pi }_{\text{null}}}\\ &=&\frac{\,\text{BF}\,}{2,679},\end{array}$$

which gives a false alarm probability of

$$\begin{array}{lll}1-{p}_{\text{lens}}&=&\frac{1}{1+\,\text{BF}\,/2,679}\\ &=&\frac{1}{1+{{\rm{e}}}^{12.9}/2,679}\\ &=&6.5\times 1{0}^{-3}.\end{array}$$

We see that the strong preference for the lensing hypothesis persists even taking into account trial factors.

### A rejected candidate

For illustrative purposes, we also include one gravitational lensing candidate identified by the autocorrelation algorithm, which our Bayesian framework strongly rejects. The light curve for GRB 911031 is shown in Extended Data Fig. 7 as the sum of the four BATSE large-area detector broadband energy channels and separately for each channel in the first and third panels, respectively. Each colour indicates a different energy channel: red. 20–60 keV; yellow, 60–110 keV; green, 110–320 keV; blue, 320–2,000 keV. The light curve has the sort of repeating pulse structure that one might naively mistake for lensing. The time delay is even similar in each energy channel. The second and fourth panels show the correlogram (autocorrelation) of the summed and spectral light curves respectively.

The results of autocorrelation indicate very strongly that there is some similar structure in the two pulses. However, the pulse modelling prefers a two-pulse model in every channel because the two pulses are not precise duplicates. Not only are the pulse shapes (τ, ξ) different between the two pulses but also the time delays and magnification ratios (Δt, r) inferred through parameter estimation are inconsistent. Extended Data Fig. 8 shows the gravitational lens parameter posterior distributions for lens model fit to GRB 911031. Gravitational lensing for point sources is achromatic, so the time delay and magnification ratio posteriors for each channel should be overlapping for a gravitational lensing candidate. The clear correlation between energy, magnification and time delay immediately suggests that these are two independent pulses of a GRB and not a gravitational lensing echo. The ln(BF) values in favour of a two-pulse model are 229.0, 301.7, 374.0 and 15.4 for channels 1, 2, 3 and and 4, respectively. We can therefore firmly rule out the lensing interpretation for this burst.

## Data availability

The BATSE data catalogue is available from the NASA data archive at https://heasarc.gsfc.nasa.gov/FTP/compton/data/batse/trigger. We use the ‘discsc’, ‘tte’ and ‘tte_list’ datatypes in our search. The data used in our analysis of GRB 950830 can be found at https://heasarc.gsfc.nasa.gov/FTP/compton/data/batse/trigger/03601_03800/03770_burst/tte_bfits_3770.fits.gz and https://heasarc.gsfc.nasa.gov/FTP/compton/data/batse/trigger/03601_03800/03770_burst/tte_list_3770.fits.gz. Source data are provided with this paper.

## Code availability

The analysis code PyGRB55 has been written in Python56 by J.P. and is freely available at https://github.com/JamesPaynter/PyGRB under the BSD 3-Clause License. PyGRB is built around Monash University’s Bilby nested sampling wrapper, with additional FITS I/O functionality provided by AstroPy57. The software uses the NumPy58 and SciPy59 computational libraries. Plotting makes use of the Matplotlib60 and corner61 libraries62.

## References

1. 1.

Paczynski, B. Gamma-ray bursters at cosmological distances. Astrophys. J. Lett. 308, L43–L46 (1986).

2. 2.

Paczynski, B. Gravitational microlensing and gamma-ray bursts. Astrophys. J. Lett. 317, L51–L55 (1987).

3. 3.

Wambsganss, J. A method to distinguish two gamma-ray bursts with similar time profiles. Astrophys. J. 406, 29–35 (1993).

4. 4.

Nowak, M. A. & Grossman, S. A. Can we identify lensed gamma-ray bursts? Astrophys. J. 435, 557–572 (1994).

5. 5.

Muñoz, J. B., Kovetz, E. D., Dai, L. & Kamionkowski, M. Lensing of fast radio bursts as a probe of compact dark matter. Phys. Rev. Lett. 117, 091301 (2016).

6. 6.

Ji, L., Kovetz, E. D. & Kamionkowski, M. Strong lensing of gamma ray bursts as a probe of compact dark matter. Phys. Rev. D 98, 123523 (2018).

7. 7.

Hirose, Y., Umemura, M., Yonehara, A. & Sato, J. Imprint of gravitational lensing by population III stars in gamma-ray burst light curves. Astrophys. J. 650, 252–260 (2006).

8. 8.

Portegies Zwart, S. F., Baumgardt, H., Hut, P., Makino, J. & McMillan, S. L. W. Formation of massive black holes through runaway collisions in dense young star clusters. Nature 428, 724–726 (2004).

9. 9.

Aasi, J. et al. Advanced LIGO. Class. Quantum Grav. 32, 074001 (2015).

10. 10.

Acernese, F. et al. Advanced Virgo: a 2nd generation interferometric gravitational wave detector. Class. Quantum Grav. 32, 024001 (2015).

11. 11.

Abbott, B. P. et al. Binary black hole population properties inferred from the first and second observing runs of advanced LIGO and advanced Virgo. Astrophys. J. 882, L24 (2019).

12. 12.

Abbott, B. P. et al. GW190521: a binary black hole merger with a total mass of 150 M. Phys. Rev. Lett. 125, 101102 (2020).

13. 13.

King, A. GSN 069—a tidal disruption near miss. Mon. Not. R. Astron. Soc. 493, L120–L123 (2020).

14. 14.

Oka, T., Tsujimoto, S., Iwata, Y., Nomura, M. & Takekawa, S. Millimetre-wave emission from an intermediate-mass black hole candidate in the Milky Way. Nat. Astron. 1, 709–712 (2017).

15. 15.

Takekawa, S., Oka, T., Iwata, Y., Tsujimoto, S. & Nomura, M. The fifth candidate for an intermediate-mass black hole in the Galactic Center. Astrophys. J. 890, 167 (2020).

16. 16.

Lin, D. et al. A luminous X-ray outburst from an intermediate-mass black hole in an off-centre star cluster. Nat. Astron. 2, 656–661 (2018).

17. 17.

Press, W. H. & Gunn, J. E. Method for detecting a cosmological density of condensed objects. Astrophys. J. 185, 397–412 (1973).

18. 18.

Fishman, G. J., Meegan, C. A., Wilson, R. B., Paciesas, W. S. & Pendleton, G. N. The BATSE experiment on the Compton Gamma Ray Observatory: status and some early results. In NASA Conference Publication Vol. 3137, 26–34 (NASA, 1992).

19. 19.

Costa, E. et al. Discovery of an X-ray afterglow associated with the γ-ray burst of 28 February 1997. Nature 387, 783–785 (1997).

20. 20.

Narayan, R. & Wallington, S. Determination of lens parameters from gravitationally lensed gamma-ray bursts. Astrophys. J. 399, 368–372 (1992).

21. 21.

Mao, S. Gravitational lensing, time delay, and gamma-ray bursts. Astrophys. J. Lett. 389, L41–L44 (1992).

22. 22.

Krauss, L. M. & Small, T. A. A new approach to gravitational microlensing—time delays and the galactic mass distribution. Astrophys. J. 378, 22–29 (1991).

23. 23.

Blaes, O. M. & Webster, R. L. Using gamma-ray bursts to detect a cosmological density of compact objects. Astrophys. J. Lett. 391, L63–L66 (1992).

24. 24.

Geiger, B. & Schneider, P. The light-curve reconstruction method for measuring the time delay of gravitational lens systems. Mon. Not. R. Astron. Soc. 282, 530–546 (1996).

25. 25.

Norris, J. P. et al. Attributes of pulses in long bright gamma-ray bursts. Astrophys. J. 459, 393–412 (1996).

26. 26.

Thrane, E. & Talbot, C. An introduction to Bayesian inference in gravitational-wave astronomy: parameter estimation, model selection, and hierarchical models. Pub. Astron. Soc. Aust. 36, E010 (2019).

27. 27.

Baumgardt, H. & Hilker, M. A catalogue of masses, structural parameters, and velocity dispersion profiles of 112 Milky Way globular clusters. Mon. Not. R. Astron. Soc. 478, 1520–1557 (2018).

28. 28.

Elbert, O. D., Bullock, J. S. & Kaplinghat, M. Counting black holes: the cosmic stellar remnant population and implications for LIGO. Mon. Not. R. Astron. Soc. 473, 1186–1194 (2018).

29. 29.

Hurley, K. et al. A search for gravitationally lensed gamma-ray bursts in the data of the interplanetary network and konus-wind. Astrophys. J. 871, 121 (2019).

30. 30.

Marani, G. F., Nemiroff, R. J., Norris, J. P., Hurley, K. & Bonnell, J. T. Gravitationally lensed gamma-ray bursts as probes of dark compact objects. Astrophys. J. Lett. 512, L13–L16 (1999).

31. 31.

Williams, L. L. R. & Wijers, R. A. M. J. Distortion of gamma-ray burst light curves by gravitational microlensing. Mon. Not. R. Astron. Soc. 286, L11–L16 (1997).

32. 32.

Wyithe, J. S. B. & Turner, E. L. Gravitational microlensing of gamma-ray bursts at medium optical depth. Mon. Not. R. Astron. Soc. 319, 1163–1168 (2000).

33. 33.

Lewis, G. F. Gravitational microlensing time delays at high optical depth: image parities and the temporal properties of fast radio bursts. Mon. Not. R. Astron. Soc. 497, 1583–1589 (2020).

34. 34.

Walker, M. A. & Lewis, G. F. Nanolensing of gamma-ray bursts. Astrophys. J. 589, 844–860 (2003).

35. 35.

Gould, A. Femtolensing of gamma-ray bursters. Astrophys. J. Lett. 386, L5–L7 (1992).

36. 36.

Nemiroff, R. J. et al. Searching gamma-ray bursts for gravitational lensing echoes—implications for compact dark matter. Astrophys. J. 414, 36–40 (1993).

37. 37.

Ougolnikov., O. S. A search for possible mesolensing of cosmic gamma-ray bursts: II. Double and triple bursts in the BATSE catalog. Cosmic Res. 41, 141–146 (2003).

38. 38.

Biltzinger, B., Kunzweiler, F., Greiner, J., Toelge, K. & MichaelBurgess, J. A physical background model for the Fermi Gamma-ray Burst Monitor. Astron. Astrophys. 640, A8 (2020).

39. 39.

Nemiroff, R. J. et al. Gamma-ray burst lensing limits on cosmological parameters. AIP Conf. Proc. 526, 663 (2000).

40. 40.

Li, C. & Li, L. Search for strong gravitational lensing effect in the current GRB data of BATSE. Sci. Chin. Phys. Mech. Astron. 57, 1592–1599 (2014).

41. 41.

Davidson, R., Bhat, P. N. & Li, G. Are there gravitationally lensed gamma-ray bursts detected by GBM? AIP Conf. Proc. 1358, 17 (2011).

42. 42.

Bagoly, Z. & Veres, P. Achromatic search for gravitational lensing in Fermi data. AIP Conf. Proc. 1279, 293 (2010).

43. 43.

Oguri, M. Strong gravitational lensing of explosive transients. Rep. Prog. Phys. 82, 126901 (2019).

44. 44.

Hakkila, J., Horváth, I., Hofesmann, E. & Lesage, S. Properties of short gamma-ray burst pulses from a BATSE TTE GRB pulse catalog. Astrophys. J. 855, 101 (2018).

45. 45.

Ashton, G. et al. Bilby: a user-friendly bayesian inference library for gravitational-wave astronomy. Astrophys. J. Suppl. Ser. 241, 27 (2019).

46. 46.

Skilling, J. Nested sampling. AIP Conf. Proc. 735, 395 (2004).

47. 47.

Skilling, J. Nested sampling for general Bayesian computation. Bayesian Anal. 1, 833–859 (2006).

48. 48.

Feroz, F., Hobson, M. P. & Bridges, M. MULTINEST: an efficient and robust Bayesian inference tool for cosmology and particle physics. Mon. Not. R. Astron. Soc. 398, 1601–1614 (2009).

49. 49.

Higson, E., Handley, W., Hobson, M. & Lasenby, A. Dynamic nested sampling: an improved algorithm for parameter estimation and evidence calculation. Stat. Comput. 29, 891–913 (2019).

50. 50.

Speagle, J. S. DYNESTY: a dynamic nested sampling package for estimating Bayesian posteriors and evidences. Mon. Not. R. Astron. Soc. 493, 3132–3158 (2020).

51. 51.

Band, D. et al. BATSE observations of gamma-ray burst spectra. I. Spectral diversity. Astrophys. J. 413, 281–292 (1993).

52. 52.

Xiao, L. & Schaefer, B. E. Redshift catalog for Swift long gamma-ray bursts. Astrophys. J. 731, 103 (2011).

53. 53.

Paciesas, W. S. et al. The fourth BATSE gamma-ray burst catalog (revised). Astrophys. J. Suppl. 122, 465–495 (1999).

54. 54.

Jordán, A. et al. The ACS Virgo Cluster Survey. XII. The luminosity function of globular clusters in early-type galaxies. Astrophys. J. Suppl. 171, 101–145 (2007).

55. 55.

Paynter, J. R. Pygrb: a pure Python gamma-ray burst analysis package. J. Open Source Softw. 5, 2536 (2020).

56. 56.

Van Rossum, G. & Drake, F. L. Python 3 Reference Manual (CreateSpace, 2009).

57. 57.

Collaboration, A. et al. Astropy: a community Python package for astronomy. Astron. Astrophys. 558, A33 (2013).

58. 58.

van der Walt, S., Colbert, S. C. & Varoquaux, G. The numpy array: a structure for efficient numerical computation. Comput. Sci. Eng. 13, 22–30 (2011).

59. 59.

Virtanen, P. et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat. Methods 17, 261–272 (2020).

60. 60.

Hunter., J. D. Matplotlib: a 2D graphics environment. Comput. Sci. Eng. 9, 90–95 (2007).

61. 61.

Foreman-Mackey, D. corner.py: scatterplot matrices in Python. J. Open Source Softw. 1, 24 (2016).

62. 62.

Meade, B., Lafayette, L., Sauter, G. & Tosello, D. Spartan HPC-Cloud Hybrid: Delivering Performance and Flexibility (Univ. Melbourne, 2017); https://doi.org/10.4225/49/58ead90dceaaa

## Acknowledgements

E.T. is supported through Australian Research Council grant no. CE170100004 and no. FT150100281. The analysis software was run on The University of Melbourne’s Spartan HPC system. This research has made use of data provided by the High Energy Astrophysics Science Archive Research Center (HEASARC), which is a service of the Astrophysics Science Division at NASA/GSFC and the High Energy Astrophysics Division of the Smithsonian Astrophysical Observatory. J.P. acknowledges S. Wyithe, M. Trenti and A. Melatos for constructive comments in analysing and interpreting the data and results. J.P. also thanks C. Shrader for assistance in understanding the BATSE instrumentation, and J. M. Burgess for constructive feedback on PyGRB and the proper analysis of gamma-ray data.

## Author information

Authors

### Contributions

R.W. contributed to the initial planning of the project with later additions from J.P. and E.T. J.P. contributed the data analysis through the pulse-fitting software package PyGRB under the guidance of E.T. The manuscript was drafted by J.P. and E.T. J.P. and R.W. contributed the gravitational lensing calculations while E.T. contributed the Bayesian framework. J.P. and E.T. responded to questions and comments from the referees. All authors discussed the results and commented on the manuscript.

### Corresponding authors

Correspondence to James Paynter or Rachel Webster.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

Peer review information Nature Astronomy thanks Zsolt Bagoly, Kevin Hurley, Masamune Oguri and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Extended data

### Extended Data Fig. 1 The individual pulses that make up channel 1 (red: 20-60 keV) of Figure 2.

a, The solid red lines are the median of 60,000 FRED-X pulses sampled from the posterior distributions. 200 of these curves are sampled and shown in black. b, The same as a) for the sine-Gaussian residual. c, The sum of the medians of the pulses in a and b. Source data

### Extended Data Fig. 2 The individual pulses that make up channel 2 (yellow: 60-110 keV) of Figure 2.

a, The solid yellow lines are the median of ~ 60, 000 FRED-X pulses sampled from the posterior distributions. 200 of these curves are sampled and shown in black. b, The same as a) for the sine-Gaussian residual. c, The sum of the medians of the pulses in a and b. Source data

### Extended Data Fig. 3 The individual pulses that make up channel 2 (green: 110-320 keV) of Figure 2.

a, The solid green lines are the median of ~ 60, 000 FRED-X pulses sampled from the posterior distributions. 200 of these curves are sampled and shown in black. b, The same as a) for the sine-Gaussian residual. c, The sum of the medians of the pulses in a and b. Source data

### Extended Data Fig. 4 The individual pulses that make up channel 2 (blue: 320-2,000 keV) of Figure 2.

a, The solid blue lines are the median of ~ 60,000 FRED-X pulses sampled from the posterior distributions. 200 of these curves are sampled and shown in black. b, The same as a) for the sine-Gaussian residual. c, The sum of the medians of the pulses in a and b. Source data

### Extended Data Fig. 5 The Hardness-Duration plot of BATSE GRBs.

The T90 durations are taken from the BATSE data tables: https://gammaray.nsstc.nasa.gov/batse/grb/catalog/4b/index.html. We calculate the hardness ratios for each of the GRBs with a listed T90. The short γ-ray burst population is shown in purple, and the long GRB population in red. Iso-likelihood contours of a two-component Gaussian mixture model are plotted in grey. The plotted uncertainties in the hardness ratio are defined by 1- σ statistical errors on the number of counts in the numerator and denominator. Source data

### Extended Data Fig. 6 The autocorrelation of the light curve of GRB 950830.

a, The sum of the four energy channels, ~ 20-2,000 keV. b, The autocorrelation function of the summed light curve, where the autocorrelation is defined in equation (6). The black dotted line is a fit to the light curve with a 3rd order Savitzky-Golay smoothing filter with a 101 bin smoothing window. The vertical red dotted line is the point of maximum deviation between the ACF and the Savitzky-Golay smoothing filter at δt= 0.390 seconds. The blue shaded regions delineate regions of 1 − σ, 3 − σ, and 5 − σ away from the Savitzky-Golay fit. The dispersion between the autocorrelation function and the fit, σ2, is defined in equation (7). c, The autocorrelation function for each of the 4 BATSE large area detector broadband energy channels. Each colour indicates a different energy channel, red: 20-60 keV, yellow: 60-110 keV, green: 110-320 keV, blue: 320-2,000 keV. The shaded regions delineate 3-σ deviance from the Savitzky-Golay fits, which are omitted for clarity. Source data

### Extended Data Fig. 7 The autocorrelation of the light curve of GRB 911031.

a, The sum of the four energy channels, 20-2,000 MeV. b, The autocorrelation function of the summed light curve, where the autocorrelation is defined in equation (6). The dotted line is a fit to the light curve with a 3rd order Savitzky-Golay smoothing filter with a 101 bin smoothing window. The blue shaded regions delineate regions of 1 − σ, 3 − σ, and 5 − σ away from the Savitzky-Golay fit. The dispersion between the autocorrelation function and the fit, σ2, is defined in equation (7). c, The light curve for each of the 4 BATSE large area detector broadband energy channels. Each colour indicates a different energy channel, red: 20-60 keV, yellow: 60-110 keV, green: 110-320 keV, blue: 320-2,000 keV. d, The autocorrelation function for each light curve channel. The shaded regions delineate 3 − σ deviance from the Savitzky-Golay fits, which are omitted for clarity. Source data

### Extended Data Fig. 8 The gravitational lens parameter posterior distributions for a model fit to GRB 911031 for each of the 4 BATSE large area detector broadband energy channels.

Each colour indicates a different energy channel, red: 20-60 keV, yellow: 60-110 keV, green: 110-320 keV, blue: 320-2,000 keV. Contours contain 39.3%. 86.4%, and 98.9% of the probability density. The light curve of GRB 911031 is shown in Extended Data Fig. 7. Source data

### Extended Data Fig. 9 Optical depth as a function of source redshift zs.

We estimate the optical depth for mean source redshifts zs=0.1: blue, zs: orange, zs=1.0: green, zs=1.34: black, zs=2.0: red, zs=5.0: purple based on Eq. (38). The median Cmax/Cmin values of 1.5, 2.2, and 2.5 taken as the magnification limit cutoff (Eq.(32)) are shown as solid, dash-dot, and dashed curves respectively. The solid black horizontal line is the estimate lens probability based on seeing one event in 2,679 light curves. The dotted black vertical line is the estimated globular cluster density, Ωgc. The dash-dot vertical black line is the naive estimate for the density Ωlens ~ τ. The calculated lens densities for each redshift are summarized in Extended Data Fig. 10. Source data

### Extended Data Fig. 10 The inferred lens densities Ωl for mean source redshift zs.

A median peak counts ratio $$\tilde{C}=2.5$$ from the BATSE $${{\rm{C}}}_{\max }/{{\rm{C}}}_{\min }$$ table for 1,024ms integration times is assumed. The peak count ratios are defined through $${\rm{C}}\equiv {{\rm{C}}}_{\max }/{{\rm{C}}}_{\min }$$. $${{\rm{C}}}_{\max }$$ is the maximum detected counts over a given integration period. $${{\rm{C}}}_{\min }$$ is the minimum number of counts that would trigger the second most brightly illuminated detector at that time. Further details are given in the Methods section calculation of optical depths.

## Source data

### Source Data Fig. 1

Light curve of GRB 950830 with fits.

### Source Data Fig. 2

Four overlapping coloured circles and a black circle. Time delay and magnification ratio posteriors for GRB 950830.

### Source Data Fig. 3

Coloured probability densities.

Red lines.

Yellow lines.

Green lines.

Blue lines.

### Source Data Extended Data Fig. 5

Hardness duration plot.

### Source Data Extended Data Fig. 6

Three-panel autocorrelation of GRB 950830.

### Source Data Extended Data Fig. 7

Four-panel autocorrelation of GRB 911031.

### Source Data Extended Data Fig. 8

Four colinear coloured circles. Magnification ratio and time delay posterior GRB 911031.

### Source Data Extended Data Fig. 9

Lens probability graph.

## Rights and permissions

Reprints and Permissions

Paynter, J., Webster, R. & Thrane, E. Evidence for an intermediate-mass black hole from a gravitationally lensed gamma-ray burst. Nat Astron (2021). https://doi.org/10.1038/s41550-021-01307-1