  A low frequency stochastic background of gravitational waves may be detected
by pulsar timing experiments in the next five to ten years. Using methods
developed to analyze interferometric gravitational wave data, in this paper we
lay out the optimal techniques to detect a background of gravitational waves
using a pulsar timing array. We show that for pulsar distances and
gravitational wave frequencies typical of pulsar timing experiments, neglecting
the effect of the metric perturbation at the pulsar does not result in a
significant deviation from optimality. We discuss methods for setting upper
limits using the optimal statistic, show how to construct skymaps using the
pulsar timing array, and consider several issues associated with realistic
analysis of pulsar timing data.
