Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java statistics package for Robust Statistics

I'm looking for a java package for "Robust Statistics". Please Note the meaning of "Robust" here.

I know about Apache commons Math Descriptive statistics and Summary Statistics but they only provide non-robust statistics.

An example here would be median absolute deviation

like image 885
Dez Udezue Avatar asked Aug 29 '12 05:08

Dez Udezue


People also ask

What is robust in statistics?

Robust statistics are statistics with good performance for data drawn from a wide range of probability distributions, especially for distributions that are not normal. Robust statistical methods have been developed for many common problems, such as estimating location, scale, and regression parameters.

How is robust standard deviation calculated?

We find the robust standard deviation estimate by multiplying the MAD by a factor that happens to have a value close to 1.5. This gives us a robust value ('sigma- hat') of B . . If we use this method on data without outliers, it provides estimates that are close to x and s, so no harm is done.


1 Answers

I am not sure whether this will give you an exact solution. But you can derive those features using apache math library. This is an example for deriving mean absolute deviation.

public double mad(double [] autoCorrelationValues){
    double [] tempTable = new double[autoCorrelationValues.length];
    Median m = new Median();
    double medianValue = m.evaluate(autoCorrelationValues);
    for(int i=0 ; i<autoCorrelationValues.length ;i++){
        tempTable[i] = Math.abs(autoCorrelationValues[i] - medianValue);
    }
    return m.evaluate(tempTable); 
}
like image 81
Thamali Wijewardhana Avatar answered Sep 28 '22 05:09

Thamali Wijewardhana