commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brent Worden" <brent.wor...@gmail.com>
Subject Re: Commons Math
Date Mon, 18 Sep 2006 03:15:41 GMT
Try stats.getPercentile(50), instead.

HTH,

Brent Worden

On 9/17/06, Jim Largent <jelgolfnut@gmail.com> wrote:
>
> I installed the Commons math library and used the example code shown
> below:
> // Get a DescriptiveStatistics instance using factory method
> DescriptiveStatistics stats = DescriptiveStatistics.newInstance();
>
> // Add the data from the array
> for( int i = 0; i < inputArray.length; i++) {
>         stats.addValue(inputArray[i]);
> }
>
> // Compute some statistics
> double mean = stats.getMean();
> double std = stats.getStandardDeviation();
> double median = stats.getMedian();
>
>
> I get an error saying that the getMedian function is not found.  I saw
> that
> the SummaryStatistics does not have the median.  Any insight on what I'm
> missing?
> Thanks
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message