A method for finding the state distribution in a physical system, on the basis of a detailed analysis of the experimental response of the system to an external probe, is presented. The concomitant algorithm, based upon the maximum entropy principle, is specifically devised so as to take into account the presence of noise due to experimental errors in the response signal. The formalism is illustrated by recourse to two numerical problems and is applied to a realistic situation involving X-ray diffraction.