  The mapping between the distributions of the observed galaxy stellar mass and
the underlying dark matter halos provides the crucial link from theories of
large-scale structure formation to interpreting the complex phenomena of galaxy
formation and evolution. We develop a novel statistical method, based on the
Halo Occupation Distribution model (HOD), to solve for this mapping by jointly
fitting the galaxy clustering and the galaxy-galaxy lensing measured from the
Sloan Digital Sky Survey (SDSS). The method, called the iHOD model, extracts
maximum information from the survey by including ~80% more galaxies than the
traditional HOD methods, and takes into account the incompleteness of the
stellar mass samples in a statistically consistent manner. The derived
stellar-to-halo mass relation not only explains the clustering and lensing of
SDSS galaxies over almost four decades in stellar mass, but also successfully
predicts the stellar mass functions observed in SDSS. Due to its capability of
modelling significantly more galaxies, the iHOD is able to break the degeneracy
between the logarithmic scatter in the stellar mass at fixed halo mass and the
slope of the stellar-to-halo mass relation at high mass end, without the need
to assume a strong prior on the scatter and/or use the stellar mass function as
an input. We detect a decline of the scatter with halo mass, from 0.22 dex at
below 10^{12} Msun to 0.18 dex at 10^{14} Msun. The model also enables
stringent constraints on the satellite stellar mass functions at fixed halo
mass, predicting a departure from the Schechter functional form in high mass
halos. The iHOD model can be easily applied to existing and future
spectroscopic datasets, greatly improving the statistical constraint on the
stellar-to-halo mass relation compared to the traditional HOD methods within
the same survey.
