  In recent years, the cross spectrum has received considerable attention as a
means of characterising the variability of astronomical sources as a function
of wavelength. While much has been written about the statistics of time and
phase lags, the cospectrum has only recently been understood as means of
mitigating instrumental effects dependent on temporal frequency in astronomical
detectors, as well as a method of characterizing the coherent variability in
two wavelength ranges on different time scales. In this paper, we lay out the
statistical foundations of the cospectrum, starting with the simplest case of
detecting a periodic signal in the presence of white noise. This case is
especially relevant for detecting faint X-ray pulsars in detectors heavily
affected by instrumental effects, including NuSTAR, Astrosat and IXPE. We show
that the statistical distributions of both single and averaged cospectra differ
considerably from those for standard periodograms. While a single cospectrum
follows a Laplace distribution exactly, averaged cospectra are approximated by
a Gaussian distribution only for more than ~30 averaged segments, dependent on
the number of trials. We provide an instructive example of a quasi-periodic
oscillation in NuSTAR and show that applying standard periodogram statistics
leads to underestimated tail probabilities for period detection. We also
demonstrate the application of these distributions to a NuSTAR observation of
the X-ray pulsar Hercules X-1.
