  Determining the mass of stars is crucial both to improving stellar evolution
theory and to characterising exoplanetary systems. Asteroseismology offers a
promising way to estimate stellar mean density. When combined with accurate
radii determinations, such as is expected from GAIA, this yields accurate
stellar masses. The main difficulty is finding the best way to extract the mean
density from a set of observed frequencies.
  We seek to establish a new method for estimating stellar mean density, which
combines the simplicity of a scaling law while providing the accuracy of an
inversion technique.
  We provide a framework in which to construct and evaluate kernel-based linear
inversions which yield directly the mean density of a star. We then describe
three different inversion techniques (SOLA and two scaling laws) and apply them
to the sun, several test cases and three stars.
  The SOLA approach and the scaling law based on the surface correcting
technique described by Kjeldsen et al. (2008) yield comparable results which
can reach an accuracy of 0.5 % and are better than scaling the large frequency
separation. The reason for this is that the averaging kernels from the two
first methods are comparable in quality and are better than what is obtained
with the large frequency separation. It is also shown that scaling the large
frequency separation is more sensitive to near-surface effects, but is much
less affected by an incorrect mode identification. As a result, one can
identify pulsation modes by looking for an l and n assignment which provides
the best agreement between the results from the large frequency separation and
those from one of the two other methods. Non-linear effects are also discussed
as is the effects of mixed modes. In particular, it is shown that mixed modes
bring little improvement as a result of their poorly adapted kernels.
