I have to compare two datasets. The first is real data, while the second is a simulation. I want to look just to one variable in the datasets, and testing if it is compatibile between data and simulation. The underlying random variable in continuos. The usual test is the KS test, but in my case the data in the simulation are weighted.
How to run a two-sample KS-test with weighted samples? Should I simply redefine the empirical CDF with weights? Is the distribution of the test statistics the same? Should I do something special?