Our paper *Simulation-based marginal likelihood for cluster strong lensing cosmology* got accepted for publication a few days ago. The astronomy problem posed was about how we can use observations of the phenomenon of strong gravitational lensing by galaxy clusters to infer the values of cosmological parameters (or potentially the cosmological model itself). Each hypothetical universe would result in different galaxy cluster compactness and universe expansion history. Both consequences ultimately affect the *Data: *which galaxy clusters would be selected in a flux-limited survey, their mass, and their effectiveness as a gravitational lens.

Anyway, we hit a snag because one of the things you need to do this is to be able to say how likely you are to observe what you did under different hypothetical universe models (or something more specific, like the amount of dark matter) – this is the likelihood. Since we use large-scale computer simulations to model non-linear structure formation, we can’t write down a likelihood function – a common problem in fields like epidemiology, genetics, and geology as well.

Our solution ended up being something in the vein of approximate Bayesian computation: use summary statistics. Except in this case, the summary statistics have to be something you infer using the usual Bayesian approach and you end up with a joint PDF (rather than a set of scalar values) for a given dataset (whether real or simulated). Then instead of a kernel distance metric and threshold distance, you calculate the zero-shift cross-correlation of the summary statistics PDFs (ssPDFs) for the real and mock datasets – that’s your likelihood!

This paper is particularly important to me because

- it was my last as a professional astronomer
- it involved throwing away the original paper we had written, re-framing the question (away from the notions of
*tension*and*consistency*with standard cosmology), and implementing creative ideas. - we also had the best (anonymous) reviewer. We were both stubborn and pedantic but utterly respectful. This is how the refereeing process should be!

The idea is finally out there and I can now get on with several follow-up validation tests and applications in other fields of research. We could (and hopefully will) demonstrate the full posterior inference/model comparison in the kind of research problem where the simulations are relatively quick or emulators are available. There’s also much work to be done in the choice of summary statistics and inference of ssPDFs. Plus the logistics of calculating the cross-correlation with discretely sampled functions will get tricky when the ssPDFs are higher-dimensional, so any help with that would be greatly appreciated!