We develop methods for the modeling and inversion of the power-density spectrum from magnetic anomaly data assuming that the crustal magnetic field is caused by an ensemble of vertical-sided and uniformly magnetized prisms. The solution of the forward problem is achieved in the wavenumber domain, where a synthetic spectrum is given by the product of the mathematical expectations of single-valued functions that describe depth, thickness, and horizontal dimensions of prisms in the ensemble. We use Gaussian and uniform distributions to describe the ensemble and provide a variety of functions from which different statistical models can be obtained. The solution of the inverse problem is achieved iteratively, starting from an initial set of model parameters. It is based on the ridge-regression algorithm, and its usefulness is assessed in a number of examples with numeric, synthetic and real data spectra. The methods are first tested on the spectrum obtained from a simple artificial magnetic anomaly and on the artificial spectrum caused by an ensemble of source bodies and are found to be capable of recovering the source parameters. Next, the methods are applied to marine magnetic data from a survey offshore of the Yucatan Peninsula, Mexico. The results of this last application are consistent with the crustal structure observed at Chicxulub hole.