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):
>   http://en.wikipedia.org/wiki/Chi-squared_test
> 
> 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.

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to