  Context. Existing samples of strong lenses have been assembled by giving
priority to sample size, at the cost of having a complex selection function.
With the advent of the next generation of wide-field photometric surveys,
however, it might become possible to identify subsets of the lens population
with well-defined selection criteria, trading sample size for completeness.
  Aims. There are two main advantages of working with a complete sample of
lenses. First, it is possible to recover the properties of the general
population of galaxies, of which strong lenses are a biased subset. Second, the
relative number of lenses and non-detections can be used to further constrain
models of galaxy structure. This work illustrates how to carry out a
statistical strong lensing analysis that takes advantage of these features.
  Methods. I introduced a general formalism for the statistical analysis of a
sample of strong lenses with known selection function, then tested it on
simulated data. The simulation consists of a population of $10^5$ galaxies with
an axisymmetric power-law density profile, a population of background point
sources, and a subset of $\sim10^3$ strong lenses, complete above an
observational cut.
  Mandatory. The method allows to recover the distribution in Einstein radius
and mass density slope of the galaxy population in an unbiased way. The number
of non-lenses helps to constrain the model when magnification data are not
available.
  Conclusions. Complete samples of lenses are a powerful asset to turn precise
strong lensing measurements into accurate statements on the properties of the
general galaxy population.
