commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Neidhart <>
Subject Re: [math] Merge of interface and implementation of *Test classes in stat.inference
Date Sun, 05 Feb 2012 19:26:32 GMT
On 02/05/2012 08:14 PM, Gilles Sadowski wrote:
> Maybe I'm mistaken but it seems that you think that the "...Test" classes in
> package "stat.inference" are somehow utilities for the CM unit tests (as is
> actually the case for the "TestUtils" class) or some base class for CM unit
> tests (?). That's not the case.
> The name "ChiSquareTest" is the name of a "statistic test" (not a unit test
> for a "ChiSquare" functionality):
> The class may be used in the CM's unit testing framework but that does not
> imply that it should be tailored to do just that; it is useful on its own,
> as any other functionality available in CM.

No, I am not referring to a unit test. There is really a TestUtils class
in the stat.inference package (see also the tutorial) that provides
access to the different statistical test implementations (like ChiSquare).

> [Sorry if I misunderstood what you were saying; in which case I did not get
> it...]

I wanted to say that in most cases people will use a statistical test in
such a way:

TestUtils.chiSquareTest(expected, observed);

which is btw how it is described in the tutorial.
If this is the case, and as the tests itself are state-less, all of them
can be implemented as pure functions -> static methods

There is no need to instantiate an instance of, e.g. ChiSquareTest to
call the appropriate method.

Hope this makes my argument clearer.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message