The problem of designing a linear predetection filter for the detection of a sampled random signal in additive noise is considered. The design of the filter is based on an optimality criterion which maximizes the signal-to-noise ratio enhancement. The optimum weighting function obtained in this manner has the advantage that it is independent of signal characteristics and depends only on the covariance function of the noise. The optimum filter, for general covariance functions, is obtained for <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">N = 2, 3</tex> and <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">4</tex> samples. The asymptotic solution for large <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">N</tex> is also presented by employing results from the theory of Teeplitz forms. In addition, the complete solution for all <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">N</tex> is given for several particular covariance matrices. An application of the results is made to the problem of designing a linear predetection filter in a moving target indication (MTI) radar system. The optimum weighting function for <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">N = 2</tex> is a single-cancellation unit, while that for <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">N = 3</tex> is similar but not quite the same as a double-cancellation unit. It is shown that the signal-to-noise ratio enhancement provided by the double-cancellation scheme is <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">1.76</tex> db worse than that of the optimum filter when the noise has a Gaussian covariance function.