High-amplitude noise is a common problem in seismic data. Current filtering techniques that target this problem first detect the location of the noise and then remove it by damping or interpolation. Detection is done conventionally by comparing individual data amplitudes in a certain domain to a user-controlled local threshold. In practice, the threshold is optimally tuned by trial and error and is often changed to match the varying noise power across the data set. We have developed an automatic method to compute the appropriate threshold for high-amplitude noise detection and attenuation. The main idea is to exploit differences in statistical properties between noise and signal amplitudes to construct a detection criterion. A model that consists of a mixtureof two statistical distributions, representing the signal and the noise, is fitted to the data. Then it is used to estimate the probability (i.e., likelihood) that each sample in the data is noisy by means of an expectation-maximization (EM) algorithm. Only those samples with a likelihood greater than a specific threshold are considered to be noise. The resulting probability threshold is better adapted to the data compared to a conventional amplitude threshold. It offers the user, through the probability threshold value, the possibility to quantify the confidence in whether a large amplitude anomaly is considered as noise. The method is generic; however, our work develops and implements the method for swell-noise attenuation. Initial results are encouraging, showing slightly better performance than an optimized conventional method but with much less parameter testing and variation.