  Estimating a distance by inverting a parallax is only valid in the absence of
noise. As most stars in the Gaia catalogue will have non-negligible fractional
parallax errors, we must treat distance estimation as a constrained inference
problem. Here we investigate the performance of various priors for estimating
distances, using a simulated Gaia catalogue of one billion stars. We use three
minimalist, isotropic priors, as well an anisotropic prior derived from the
observability of stars in a Milky Way model. The two priors that assume a
uniform distribution of stars--either in distance or in space density---give
poor results: The root mean square fractional distance error, f_RMS, grows far
in excess of 100% once the fractional parallax error, f_true, is larger than
0.1. A prior assuming an exponentially decreasing space density with increasing
distance performs well once its single scale length parameter has been set to
an appropriate value: f_RMS is roughly equal to f_true for f_true < 0.4, yet
does not increase further as f_true increases up to to 1.0. The Milky Way prior
performs well except towards the Galactic centre, due to a mismatch with the
(simulated) data. Such mismatches will be inevitable (and remain unknown) in
real applications, and can produce large errors. We therefore suggest to adopt
the simpler exponentially decreasing space density prior, which is also less
time-consuming to compute. Including Gaia photometry improves the distance
estimation significantly for both the Milky Way and exponentially decreasing
space density prior, yet doing so requires additional assumptions about the
physical nature of stars.
