Photometric redshifts are quickly becoming an essential tool of observation
al cosmology, although their utilization is somewhat hindered by certain sh
ortcomings of the existing methods, e.g., the unreliability of maximum-like
lihood techniques or the limited application range of the "training-set" ap
proach. The application of Bayesian inference to the problem of photometric
redshift estimation effectively overcomes most of these problems. The use
of prior probabilities and Bayesian marginalization facilitates the inclusi
on of relevant knowledge, such as the expected shape of the redshift distri
butions and the galaxy type fractions, which can be readily obtained from e
xisting surveys but are often ignored by other methods. If this previous in
formation is lacking or insufficient-for instance, because of the unprecede
nted depth of the observations-the corresponding prior distributions can be
calibrated using even the data sample for which the photometric redshifts
are being obtained. An important advantage of Bayesian statistics is that t
he accuracy of the redshift estimation can be characterized in a way that h
as no equivalents in other statistical approaches, enabling the selection o
f galaxy samples with extremely reliable photometric redshifts. In this way
, it is possible to determine the properties of individual galaxies more ac
curately, and simultaneously estimate the statistical properties of a sampl
e in an optimal fashion. Moreover, the Bayesian formalism described here ca
n be easily generalized to deal with a wide range of problems that make use
of photometric redshifts. There is excellent agreement between the approxi
mate to 130 Hubble Deep Field North (HDF-N) spectroscopic redshifts and the
predictions of the method, with a rms error of Delta z approximate to 0.06
(1 + z(spec)) up to z < 6 and no outliers nor systematic biases. It should
be remarked that since these results have not been reached following a trai
ning-set procedure, the above value of Delta z should be a fair estimate of
the expected accuracy for any similar sample. The method is further tested
by estimating redshifts in the HDF-N but restricting the color information
to the UBVI filters; the results are shown to be significantly more reliab
le than those obtained with maximum-likelihood techniques.