[
https://issues.apache.org/jira/browse/MATH-287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matthew Rowles updated MATH-287:
--------------------------------
Attachment: weightTests.patch
Here is a patch that also has new tests for Mean, Variance, Product and Sum (as
well as the changes in those classes).
The tests test that the expectedWeightedValue is what it's supposed to be and
that expectedWeightedValue == expectedValue when all weights are either the
same (Mean, Variance) or equal to 1 (Sum, Product).
I calculated the expected values using the definitional formulae with
BigDecimals (and lots of decimal places). I rounded the answers to the number
of decimal places that were already present in UnivariateStatisticAbstractTest.
> Add support for weighted descriptive statistics
> -----------------------------------------------
>
> Key: MATH-287
> URL: https://issues.apache.org/jira/browse/MATH-287
> Project: Commons Math
> Issue Type: New Feature
> Affects Versions: 2.0
> Reporter: Matthew Rowles
> Priority: Minor
> Attachments: weighted.patch, weightTests.patch
>
>
> Add support for weighted descriptive statistics, such as weighted variance.
> An example method call would be Variance.evaluate(double[] values, double[]
> weights, int begin, int length)
> - Suggested by [email protected] on the mailing list.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.