The formation and evolution of galaxies is governed by the mass of the dark matter halo in which they reside. To understand this connection between galaxies and dark matter, it is important to statistically relate the observable properties (e.g. luminosity or stellar mass) of galaxies to the mass of the host halo. This requires accurate and unbiased measurements of the halo masses. The kinematics of satellite galaxies that orbit their host galaxy can be used to measure halo masses. In order to measure the kinematics with sufficient signal-to-noise, one generally needs to stack the satellite galaxies of a large number of host galaxies with similar observable properties. However, in general, the relation between the host galaxy property and the halo mass M has non-zero scatter and therefore the kinematics can be difficult to interpret. I shall present a new method that uses the kinematics of satellites to infer the average halo mass and the scatter in halo masses as a function of the property used to stack host galaxies. I shall present the halo mass-luminosity relation and the halo mass-stellar mass relation of central galaxies obtained by the application of this method to galaxies from the Sloan Digital Sky Survey. I shall discuss the implications of the non-zero scatter in these relations for the physics of galaxy formation and also discuss how such scaling relations can help constrain cosmological parameters.