  We use semi-analytic models implemented in the Millennium Simulation to
analyze the merging histories of dark matter haloes and of the galaxies that
reside in them. We assume that supermassive black holes only exist in galaxies
that have experienced at least one major merger. Only a few percent of galaxies
with stellar masses less than $M_* < 10^{10} M_{\odot}$ are predicted to have
experienced a major merger and to contain a black hole. The fraction of
galaxies with black holes increases very steeply at larger stellar masses. This
agrees well with the observed strong mass dependence of the fraction of nearby
galaxies that contain either low-luminosity (LINER-type) or higher-luminosity
(Seyfert or composite-type) AGN. We then investigate when the major mergers
that first create the black holes are predicted to occur. High mass galaxies
are predicted to have formed their black holes at very early epochs. The
majority of low mass galaxies never experience a major merger and hence do not
contain a black hole, but a significant fraction of the supermassive black
holes that do exist in low mass galaxies are predicted to have formed recently.
