Could you guys help me which apache-commons-math classes can I use to calculate the average of the top third of the population.
To calculate the average I know can use org.apache.commons.math3.stat.descriptive.DescriptiveStatistics
.
How to get the top third of the population?
Example
Population: 0, 0, 0, 0, 0, 1, 2, 2, 3, 5,14
Top third: 2, 3, 5, 14
Average = 24/4= 6.0