In executing spectral analysis of echoes scattered by a random medium, a window is generally applied to an echo signal. Spatial resolving power to characterize the random medium is improved by shortening the window length. But it is difficult to shorten the window length arbitrarily since, in the conventional method, the shorter the window length, the more severely the spectrum is distorted. This article shows that the spectrum distorted by the window can be expressed as a convolution of the spectrum of echoes that would be obtained from a spatially truncated thin layer of the random medium with the spectrum of the window function. Consequently, it can be corrected by a deconvolution operation, and by the fact that the spectral estimation over a wide frequency range can be carried out even using a window of shorter length. The effects of the deconvolution are first demonstrated by computer simulation where a random signal is used as the echo signal. The effects can be seen more clearly in the measurement of attenuation coefficient slope obtained by the ratio of two spectra that are subjected to different attenuation. Finally, the applicability of this method is shown by the experiments where the attenuation coefficient slope of an agar block is measured using the window of various lengths.