
Chi sqaure test
Hi,
I want to do Chisquare test, to find the weather two distribution are same or not.
I want to use some statistical function to do that.
i found common math library to that test.
But I don't know how to use that library.
Math  CommonsMath: The Apache Commons Mathematics Library
and I find the code as
long[] observed = {10, 9, 11};
double[] expected = {10.1, 9.8, 10.3};
System.out.println(TestUtils.chiSquare(expected, observed));
If anyone can give me the idea about how to sue it, that will be very helpful for me.
Thank you

What happens when you execute your program?
If the answer is wrong, can you explain what it should be?

To calculate the chisquared value for simple data, you don't need any special library. All you have to do is to apply the formula for the calculation to the data:
http://en.wikipedia.org/wiki/Chisquare_statistic
Now to get a p value from the chisquare result and your degree of freedoms, you'll need to use a lookup table or some external library.