  (Abridged) Using data from the 2dFGRS we compute the conditional luminosity
functions (CLFs) of early- and late-type galaxies. These functions give the
average number of galaxies with luminosity L that reside in a halo of mass M,
and are a powerful statistical tool to link the distribution of galaxies to
that of dark matter haloes. We find that the average mass-to-light ratios of
dark matter haloes have a minimum of about 100 Msun/Lsun around a halo mass of
about 3x10^{11} Msun. In addition, haloes with M < 10^{10} Msun are virtually
devoid of galaxies, while clusters have b_J band mass-to-light ratios in the
range 500-1000 Msun/Lsun. Finally, the fact that early-type galaxies are more
strongly clustered than late-type galaxies requires that the fraction of
late-type galaxies is a strongly declining function of halo mass. We also
compute two-point correlation functions as function of both luminosity and
galaxy type, and find a weak (strong) luminosity dependence for the late
(early) type galaxies. Finally we compare our CLFs with predictions from
several semi-analytical models for galaxy formation. As long as these models
accurately fit the 2dFGRS luminosity function the agreement with our
predictions is remarkably good. This indicates that we have recovered a
statistical description of how galaxies populate dark matter haloes which fits
nicely within the standard framework for galaxy formation.
