# Zero likelihood

To test that bilby samples from the priors, we run a zero-likelihood test where the likelihood only returns 0.

The test itself is built into the regular bilby continuous integration (C.I) tests. Broadly speaking it does the following

- Generates coloured-Gaussian data from the aLIGO design curve
- Defines a 15D prior for a precessing waveform using
`chirp_mass`

and`mass_ratio`

- Generates the normal
`bilby`

likelihood then replaces it with the zero-likelihood version - Runs an inference job (typically takes a few minutes)
- For each 1D posterior, calculates a p-value comparing the samples in the posterior with 10000 samples drawn from the actual prior.
- Computes a combined P-value for all 15 individual posteriors
- If this final p-value is greater than 0.01 the test passes (expected to fail 1/100 runs)

The test is run as part of the Nightly C.I. builds for `bilby. The latest run can be found here. If this is passing then the test is passing; detailed output information can be found by following the green ticks.