  Context: In sunspots, the geometric height of continuum optical depth unity
is depressed compared to the quiet Sun. This so-called Wilson depression is
caused by the Lorentz force of the strong magnetic field inside the spots.
However, it is not understood in detail yet, how the Wilson depression is
related to the strength and geometry of the magnetic field or to other
properties of the sunspot.
  Aims: We aim to study the dependence of the Wilson depression on the
properties of the magnetic field of the sunspots and how exactly the magnetic
field contributes to balancing the Wilson depression with respect to the gas
pressure of the surroundings of the spots.
  Methods: Our study is based on 24 spectropolarimetric scans of 12 individual
sunspots performed with Hinode. We derived the Wilson depression for each spot
using both, a recently developed method that is based on minimizing the
divergence of the magnetic field, and an approach developed earlier that
enforces an equilibrium between the gas pressure and the magnetic pressure
inside the spot and the gas pressure in the quiet Sun, thus neglecting the
influence of the curvature force. We then performed a statistical analysis by
comparing the Wilson depression resulting from the two techniques with each
other and by relating them to various parameters of the sunspots, such as their
size or the strength of the magnetic field.
  Results: We find that the Wilson depression becomes larger for spots with a
stronger magnetic field, but not as much as one would expect from the increased
magnetic pressure. This suggests that the curvature integral provides an
important contribution to the Wilson depression, particularly for spots with a
weak magnetic field. Our results indicate that the geometry of the magnetic
field in the penumbra is different between spots with different strengths of
the average umbral magnetic field.
