  [abridged] We investigate the coevolution of galaxies and hosted supermassive
black holes throughout the history of the Universe by a statistical approach
based on the continuity equation and the abundance matching technique.
Specifically, we present analytical solutions of the continuity equation
without source term to reconstruct the supermassive black hole (BH) mass
function from the AGN luminosity functions. Such an approach includes
physically-motivated AGN lightcurves tested on independent datasets, which
describe the evolution of the Eddington ratio and radiative efficiency from
slim- to thin-disc conditions. We nicely reproduce the local estimates of the
BH mass function, the AGN duty cycle as a function of mass and redshift, along
with the Eddington ratio function and the fraction of galaxies with given
stellar mass hosting an AGN with given Eddington ratio. We exploit the same
approach to reconstruct the observed stellar mass function at different
redshift from the UV and far-IR luminosity functions associated to star
formation in galaxies. These results imply that the buildup of stars and BHs in
galaxies occurs via in-situ processes, with dry mergers playing a marginal role
at least for stellar masses < 3 10^11 M_sun and BH masses < 10^9 M_sun, where
the statistical data are more secure and less biased by systematic errors. In
addition, we develop an improved abundance matching technique to link the
stellar and BH content of galaxies to the gravitationally dominant dark matter
component. The resulting relationships constitute a testbed for galaxy
evolution models, highlighting the complementary role of stellar and AGN
feedback in the star formation process. Finally, the clustering properties of
BHs and galaxies are found to be in full agreement with current observations,
so further validating our results from the continuity equation.
