We discuss techniques of modelling the power spectrum of variability in cases where the spectral power is continuous but diverges strongly to low frequencies (so-called `red noise'), as is seen, for example, in the erratic variability of active galaxies and X-ray binaries. First we review the sampling properties of the periodogram and traditional smoothed periodogram estimates of the power spectral density function. Such estimates are biased, are of unknown variance, and have a strongly non-Gaussian distribution, and so are inappropriate for a least-squares `goodness-of-fit' test. We suggest a new method based on grouping estimates of the logarithm of spectral power density. We show that these estimates are of known variance and require 2-3 times less smoothing to have distributions close to Gaussian. For spectral density functions that diverge exactly as a power law, these estimates are unbiased, and for any strongly diverging power spectrum will be less biased than traditional estimates. These estimates are therefore much superior for the purposes of fitting analytical models to power spectra and of assessing these models.