>>i want to compare the distributions of two random variables x and y. i have samples of x and y respectively. the simplest way is to compare their distributions is to draw their histograms. how to do a statistical test? any nonparametric test suitable for this practice in stata?<<
What is the nature of the comparison you want to make? Are you primarily interested in whether the distributions are different, and perhaps how, look at QQ Plot.
help diagnostic plots
The two-sample Kolmogorov-Smirnov test is a possibility but it lacks power. If you have some additional information about the distributions in question, you can gain power by using that.
Jay
<<winmail.dat>>