Can I apply z-test after MonteCarlo sampling

50 Views Asked by At

I'm trying to compare whether two datasets come from the same distribution, and to do this I was thinking of using the z-test. However, the data is not normally distributed, and to fix this I was thinking of taking a big number(1000) of random samples with repetition, and to take the mean of the elements in each sample.

According to the Central Limit Theorem this will result in a normal distribution, however I'm not sure whether it will be valid analysis if I apply the z-test to this new dataset.

1

There are 1 best solutions below

1
On BEST ANSWER

No, such an approach lacks statistical power and will not detect differences in the shapes of the distribution. For instance, you can generate realizations from an exponential distribution with mean $1$, and a normal distribution with mean $1$, and their sample means will be similar for sufficiently large sample sizes, but they have very different distributions.

Instead, you would perform a Kolmogorov-Smirnov test, or some other similar test comparing empirical distributions.