I would like to test two relatively small samples against the null hypothesis that both their means and variances are the same. The alternative would be that they in fact differ. I saw a post on this site advocating a ML test but I recall there is also a named test for this case, which I would ideally like to use in R, but whose name I forget. Can anyone help? Normality assumptions might be reasonable but would be difficult to test.

  • $\begingroup$ Would Levene's test and an independent groups t-test do what you want? $\endgroup$ – Jeromy Anglim May 18 '13 at 11:07
  • 1
    $\begingroup$ I think I am looking for a test that combines these two into a single statistic rather than providing two separate readouts. The F-test (on variances) does actually show up significant in some cases which might be enough but it would nice to have it in one. Also wondered about the Kolmogorov–Smirnov test (which has assumptions I usually forget) but there is another based just on means and variances. $\endgroup$ – drw May 18 '13 at 11:15
  • $\begingroup$ It is hard to see how you could have a test based on means and variances without an assumption about the probability distribution behind the data. What does "relatively small" mean exactly? $\endgroup$ – Nick Cox May 18 '13 at 12:08
  • $\begingroup$ Yes, I agree, and I guess this is a problem with all tests at some level. Sample sizes are 7+7. $\endgroup$ – drw May 18 '13 at 15:56
  • $\begingroup$ For mean test you may use nonparametrics (that does not require distribution assumption) like Wilcoxon stat.ethz.ch/R-manual/R-devel/library/stats/html/… $\endgroup$ – Bogdan Jan 2 '17 at 7:48

I would argue that it isn't possible to properly perform a joint test on the first two moments without knowing more about the distribution. Since there is no general rule as to how moments interact, it is impossible to construct a tight confidence region.

If you dare to make a normality assumption on both samples, the situation changes since the first two moments define the normal distribution, such that for example the Kolmogorov-Smirnoff test is equivalent to testing the first two moments. Be aware though that you would be using asymptotic results on assumed distributions.

  • $\begingroup$ Good points about distributional assumptions and the KS test. I'm sure there is a 'classical' named test out there but I have forgotten where I saw it. That said, the fact that a test has a name attached to it does not make it always valid. The situation often arises in biological data as systems may be more dynamic as they become active beyond that which you can control with standard data transformation. $\endgroup$ – drw Dec 4 '16 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.