[
https://issues.apache.org/jira/browse/MATH-1347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15204081#comment-15204081
]
Richard Brunauer edited comment on MATH-1347 at 3/21/16 12:02 PM:
------------------------------------------------------------------
No, I can’t provide a junit test. The mistake is in Javadoc and not in Java
code. The results are, for my opinion, correct.
I guess that the explanation is correct but the equation does not represent the
explanation’s semantics. Explanation and expression are semantically not equal!
Explaination in Percentile for the default/legacy case: “Else let lower be the
element in position floor(pos) in the array and let upper be the next element
in the array. Return lower + d * (upper - lower)”
Equation in Percentile.EstimationType: x[ceil(h - 1/2)]
I would expect the same equation for variable “estimate” as in R_6.
Furthermore, the Percentile.EstimationType “R_6” and “LAGACY” is almost a code
copy (compare method index()).Is this intended?
To see the mistake:
https://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html
section: Enum Constant Detail
enum: LEGACY
was (Author: [email protected]):
No, I can’t provide a junit test. The mistake is in Javadoc and not in Java
code. The results are, for my opinion, correct.
I guess that the explanation is correct but the equation does not represent the
explanation’s semantics. Explanation and expression are semantically not equal!
Explaination in Percentile for the default/legacy case: “Else let lower be the
element in position floor(pos) in the array and let upper be the next element
in the array. Return lower + d * (upper - lower)”
Equation in Percentile.EstimationType: x[ceil(h - 1/2)]
I would expect the same equation for variable “estimate” as in R_6.
Furthermore, the Percentile.EstimationType “R_6” and “LAGACY” is almost a code
copy (compare method index()).Is this intended?
To see the mistake:
https://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html
section: Enum Constant Detail
enum: LAGACY
> Wrong equation in Javadoc of Percentile.EstimationType, LAGACY, variable
> estimation
> -----------------------------------------------------------------------------------
>
> Key: MATH-1347
> URL: https://issues.apache.org/jira/browse/MATH-1347
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.6
> Environment: Windows 7
> Reporter: Richard Brunauer
> Priority: Trivial
> Labels: documentation
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The Javadoc entry for Enum Percentile.EstimationType LAGACY uses a wrong
> equation for variable estimate.
> Explaination in version 3.0, 3.6 source code and 3.6 semantics do an
> interpolation between two values. The quation for variable estimation has
> only a ceiling function. This does not match.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)