If we have two random variables $X,Y$ and their random sample $X_1, \dots, X_n, Y_1, \dots, Y_m$. We can test whether $F_Y=F_X$ by classical Kolmogorov Smirnov test, or AD test etc ($F_X$ is the Distribution Funciton of $X$).
Question 1: What is "a good" test for more than 2 variables? So having let's say a random sample from 4 variables, and testing if all four distribution functions are the same (alternative is- there is one pair whose DFs differ in at least one point). A simple idea is using KS for each of the six pairs and using Bonferroni correction, but this is hardly a good option.
Edit: This question is already solved here Is there a multiple-sample version or alternative to the Kolmogorov-Smirnov Test?
Question 2: Consider that we actually have not only 4, but many (fifty+). How can we proceed then? Simple idea in which context I am asking:
X=c();n=100; for (i in 1:50) {p=runif(1, min=0.8, max=1.2); X=cbind(X, rexp(n, rate = p) ) }
Here, we have 50 different random variables, of each having a random sample of 100, and the truth is that each of their DF differs ($H_0$ does not hold). But they differ only a "little bit", by having the parameter only slightly moved. Of course, we do not know the underlying distribution (exp in our example). So, what would be a good test Are_distributions_same(X)?
Why am I asking is, that I am in a situation where, instead of $50$, we can have houndreds of r.v. from "the same mechanism". They are easy to "observe". But $n=100$ remains the same, so its impossible to tell a difference between just two r.v. because they are really similar.