Comparison of experimental data to Monte Carlo simulation—Parameter estimation and goodness-of-fit testing with weighted events