[ 
https://issues.apache.org/jira/browse/STATISTICS-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alex Herbert resolved STATISTICS-81.
------------------------------------
    Fix Version/s: 1.1
       Resolution: Implemented

> Implement descriptive statistics for integer types
> --------------------------------------------------
>
>                 Key: STATISTICS-81
>                 URL: https://issues.apache.org/jira/browse/STATISTICS-81
>             Project: Commons Statistics
>          Issue Type: Improvement
>          Components: descriptive
>            Reporter: Alex Herbert
>            Priority: Minor
>             Fix For: 1.1
>
>
> The descriptive module defines the DoubleStatistic as a composite interface:
> {code:java}
> public interface DoubleStatistic extends DoubleConsumer, DoubleSupplier{code}
> The implementations compute on a stream of {{double}} values, and provide 
> factory methods to compute on a {{{}double[]{}}}.
> The moment based statistics use a rolling algorithm for numerical stability. 
> The moment based statistics (mean, variance, skewness, kurtosis) perform a 
> double pass computation over array data.
> Several of the statistics can be efficiently computed for integer types using 
> different algorithms. For example:
> {noformat}
> mean = sum(x) / n
> variance = 1/n * [ sum(x^2) - (sum(x))^2 / n ]
> {noformat}
> These can operate using a single-pass and are not subject to loss of 
> precision if the sums are accumulated with enough integer bits of precision. 
> For a stream the sums must be able to accept up to 2^63 observations. In the 
> case of an array the maximum number of observations is ~2^31 allowing some 
> optimisation. Sums can avoid using BigInteger with special implementations of 
> signed and unsigned summation arithmetic. The final statistic can be computed 
> using extended floating-point precision (e.g. double-double).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to