Explore · Inference

Be Bilby

There’s a gravitational wave hidden in this noise. Tune the two masses until your model fits, then watch a nested sampler do the job properly: find the answer, and work out how sure we can be.

What’s going on

From noisy data to masses

The likelihood

For any pair of masses, the likelihood says how probable the data would be if those masses were the truth. When your model matches the hidden signal, what’s left over looks like pure noise, and the likelihood is high.

Why the masses blur together

How quickly a chirp sweeps up in pitch depends mostly on one combination of the masses, the chirp mass. Many pairs of masses share the same chirp mass and give almost the same signal, so the answer is a thin curve rather than a single point.

Nested sampling

Start with guesses spread over every possibility. Repeatedly throw away the worst and replace it with a better one. The guesses close in on the answer, the space of possibilities shrinks in a known way, and the discarded guesses, weighted, become the posterior.

What real analyses add

Real signals have around fifteen parameters (spins, sky position, distance, orientation and more), detector noise that varies with frequency, two or three detectors, and carefully chosen priors. The same ideas still apply.

About this simulation

The data are 2 seconds of white Gaussian noise at 2,048 samples per second (as if the detector noise had already been whitened), with a binary-black-hole signal from the same illustrative model as Hear a chirp. The merger time is known; the signal’s amplitude and phase are fitted automatically, as a matched filter does, so only the two masses are left to find. Signals have a matched-filter signal-to-noise ratio of 60 (loud), 35 (typical) or 20 (faint); for comparison, GW150914 had a signal-to-noise ratio of about 24.

The prior is uniform in the two component masses between 10 and 80 solar masses, with mass 1 the heavier. The nested sampler uses 200 live points; each replacement comes from a 20-step random walk that must stay above the worst live point’s likelihood, with steps shaped by the spread of the live points. It stops when the remaining live points could change ln Z by less than 0.1.

Bilby is an open-source Bayesian inference library used across gravitational-wave astronomy. The sampler on this page isn’t Bilby, and doesn’t use its code: it’s a simplified nested sampler written for this toy, following the same basic algorithm as dynesty, the nested sampler most often used through Bilby.