Monte Carlo analysis of inverse problems