commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [math] ANOVA - oneWayAnovaPValue()
Date Sat, 17 Sep 2011 22:55:53 GMT
On 9/14/11 10:38 AM, Mck wrote:
> Perhaps I am looking at the wrong functionality for what I need.
>
> I have a array of doubles, in which I am looking for outliers,
> given a significance of, say, 0.95.

Sorry for the slow response.  ANOVA is not going to be helpful here
unless I am misunderstanding your problem, i.e., unless there is a
grouping factor (analogous to the division of the data into classes
below).  If you are just trying to test for the presence of outliers
in a single array of doubles, there are other techniques that can be
applied and [math] can help do the calculations to implement these,
but we do not currently have outlier detection bundled anywhere. 
Feel free to open a JIRA ticket if this is what you need (and thanks
in advance to anyone who wants to submit a patch). 

Can you assume that your data come from a normal distribution?

Phil
>
>
> On 9/14/11 11:28 AM, Mck wrote:
>> Looking at the documentation for ANOVA, I see this sample code:
>>
>> double[] classA = {93.0, 103.0, 95.0, 101.0, 91.0, 105.0, 96.0,
>> 94.0, 101.0 };
>> double[] classB = {99.0, 92.0, 102.0, 100.0, 102.0, 89.0 };
>> double[] classC = {110.0, 115.0, 111.0, 117.0, 128.0, 117.0 };
>> List classes = new ArrayList();
>> classes.add(classA);
>> classes.add(classB);
>> classes.add(classC);
>>
>> and then
>>
>> TestUtils.oneWayAnovaPValue(classes);
>>
>> Works fine. However, if I add only classA, I get a
>> IllegalArgumentException: ANOVA: two or more categories required
>>
>> I do not understand why this was implemented this way. In my own
>> code, I have one array of double. It appears that I will have to
>> artificially split it into 2 parts to work with this. I could be
>> wrong, of course. Can someone please explain?
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message