We revise the statistical foundations of the reverse Monte Carlo (RMC) technique by constructing the associated functional of a variational principle which incorporates, without any ad hoc assumptions, the inherent errors accompanying the simulation and the experimental data. We propose a Bayesian criteria for acceptance/rejection of configurations, in terms of the variations of the functional. The loss function and variational functional minimization approaches are compared.