1. A method of analyzing a sample by irradiating the sample with an electron beam, spectrally dispersing and detecting characteristic X-rays emanating from the sample in response to the irradiation by a wavelength-dispersive X-ray spectrometer, and measuring intensities of the characteristic X-rays at positions where characteristic X-ray peaks are detected, wherein background intensities of the characteristic X-rays at the positions where the characteristic X-ray peaks are detected are found based on a mean atomic number calculated using values derived by quantitative analysis based on the intensities of the characteristic X-rays measured by an energy-dispersive X-ray spectrometer at corresponding analysis positions on the sample, and wherein the background intensities are subtracted from the peak intensities at the positions where the characteristic X-ray peaks are detected by the wavelength-dispersive X-ray spectrometer, thus finding net characteristic X-ray intensities.