Population likelihood#
Gravitational-wave transient surveys provide a biased sample of the astrophysical population. The likelihood function used for population inference is given be
The quantity \(P_{\rm det}(\Lambda)\) is the detection probability for a single source (see selection.html).
The integrals over the per-event parameters \(\theta_i\) are typically performed using Monte Carlo integration
These sums are computed in log space, from
\(\ln \pi(\theta_k | \Lambda) - \ln \pi(\theta_k | \varnothing)\), so they stay
finite where the individual terms underflow, e.g., in single precision.
The population model’s log density is used if it provides one (see Model),
and the sampling prior \(\pi(\theta_k | \varnothing)\) can be given in each
posterior as prior or, preferably, its log as ln_prior.
The full approximate log-likelihood is then given by
This approximation is implemented in gwpopulation.hyperpe.HyperparameterLikelihood.
There is another related expression for the likelihood as the result of an inhomoegeneous Poisson process. In this case the likelihood is given by
Here \(R\) is the total merger rate and \(T\) is the total observation time
and \(N_{\rm exp}(\Lambda) = RT\hat{P}_{\rm det}(\Lambda)\).
This is implemented in gwpopulation.hyperpe.RateLikelihood.
Each of these Monte Carlo integrals have associated uncertainties which are propagated through the likelihood calculation
and can be calculated using gwpopulation.hyperpe.HyperparameterLikelihood.ln_likelihood_and_variance().