How do we measure gravitational waves properties? 

The decade-long efforts that led to the initial observing run of Advanced Virgo have been rewarded with the observation of several black hole binaries and a binary neutron star.  For these systems we were able to measure masses, position in the sky, distance from Earth and many other physically interesting quantities that officially inaugurated the era of gravitational astrophysics. But how is it possible to extract this information from a signal buried in the interferometer noise?
The actual algorithms that are used to measure the properties of a GW source are extremely complicated and have been developed over a period of more than 10 years by hundreds of scientists in the LIGO-Virgo Collaboration. However, the basic principle according to which such a difficult measurement can be made is very simple and has its roots in the intuition of Rev. Bayes more than 400 years ago and later put on solid bases by Laplace. Rev. Bayes intuition is now known as Bayes’ theorem. It can be paraphrased as:

the plausibility of a model given some observed phenomenon (or data) is given by the product of how plausible the model is, before having observed the phenomenon in question (the prior), times the likelihood that the phenomenon is among the predictions of the model.

The apparent simplicity of Bayes’ theorem is deceiving. To understand it, we first need to understand the basic principles of mathematical logic and of the syllogism. For many, scientific inference is based on the so-called strong syllogism first stated by Aristotle: 

if A is true then B is true 		- major premise (the model)
A is true 				- minor premise (the data)
therefore B is true 			- conclusion

For instance, a classic example is:
All birds have feathers		- major premise
That animal is a bird			- minor premise
Therefore that animal has feathers 	- conclusion

The strong syllogism can be thought as defining a relation of cause-effect (major premise) and the inference is made starting from the assertion that the cause (minor premise) has been observed and therefore the effect (conclusion) is ineluctable. However, the strong syllogism is seldom applicable in science since we very rarely observe the cause for a phenomenon, or simply we do not know what the real cause of that phenomenon is. For instance, for gravitational waves, we could say: 

	-	the movement of the mirrors in an interferometer is caused by the passage of a gravitational wave
	-	we observed the movement of the mirrors
	-	therefore a gravitational wave has passed. 

Unfortunately, we know that mirrors can move due to a variety of noise sources, thus the major premise must be changed to something like:

	-	the movement of the mirrors in an interferometer can be caused by the passage of a gravitational wave or by some other instrumental noise
	-	we observed the movement of the mirrors
	-	therefore a gravitational wave is probable.

The above is an example of the weak syllogism which is the modus operandi of scientific inference. As an aside, registering the coincident movement of the mirrors in more than one interferometer vastly increases the probability that this is due to the passage of a gravitational wave.
But how do we measure the properties of a gravitational wave signal? Let’s assume that we are extremely confident that a gravitational wave signal is present in Virgo and LIGO data. This means that, when a gravitational wave is present, the detector output s is given by a superposition of instrumental noise n and the gravitational wave signal h:
s = n + h

If we could somehow subtract the noise from the detector output, we could extract the signal h. Unfortunately, we do not know the noise well enough to do so. However, thanks to years of theoretical work, we do know the signal h very well. The signal h, in fact, is obtained by solving Einstein’s equations, either via approximate methods or in super computers, and therefore, for any combination of physical parameters (masses, spins, etc.) we can predict what the signal is going to look like. The idea then is to choose a set of values for the physical parameters of the signal to predict the gravitational wave signal, subtract it from the detector data and see whether the residuals have the expected properties of pure noise. The last ingredient we need is therefore to understand the properties of the noise n. 
Since the noise n is the superposition of many different processes (thermal fluctuations of the mirror surface, scattered light inside the interferometer, seismic noise, etc.) we can apply the Central Limit Theorem and thus assume that, in the absence of a gravitational wave, each noise realisation will be drawn from a Gaussian distribution. Moreover, the variance of the noise Gaussian distribution is given by the Power Spectral Density. 
We now have everything we need to define the likelihood function:
General Relativity and the noise statistical properties tell us that the difference between our predicted signal and the data must be distributed according to a Gaussian distribution. 
To be able to apply Bayes’ theorem, we still need to provide a prior expectation for the signal h, and in particular a prior expectation for the physical parameters of the signal. This is set according to our knowledge of the population of coalescing binaries we expect to observe in Virgo and LIGO.
The most probable values for the parameters of a gravitational wave are the ones that maximise the posterior probability distribution, that is the product of the prior probability function and the likelihood. To a reasonable degree of approximation, they are the ones for which the residuals look the most like simple Gaussian-distributed noise. Full posterior distributions, the histograms we report in all our discovery publications, are obtained using LALInference, a set of sophisticated Monte Carlo algorithms that evaluate the posterior probability for millions of possible values of the parameters to be able to calculate not only the most probable values but also their uncertainty. Obtaining reliable values and associated uncertainties can take days or even weeks and the tireless work of tens of scientists. The reward is the astounding measurement of black hole masses, spins and even unprecedented tests of our understanding of the dynamics of space-time at its most extreme.