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

Gilles resolved MATH-1178.
--------------------------
       Resolution: Fixed
    Fix Version/s: 3.4

Thanks for the report.
Fixed in commit 5d6e445484d75dad938cece6fd690427ea648203

> Incorrect sample of usage of StatUtils at homepage
> --------------------------------------------------
>
>                 Key: MATH-1178
>                 URL: https://issues.apache.org/jira/browse/MATH-1178
>             Project: Commons Math
>          Issue Type: Bug
>         Environment: Documentation at 
> http://commons.apache.org/proper/commons-math/userguide/stat.html
>            Reporter: Dmitriy
>            Priority: Trivial
>             Fix For: 3.4
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> At http://commons.apache.org/proper/commons-math/userguide/stat.html you are 
> providing three ways to compute mean, std, median with DescriptiveStatistics, 
> SummaryStatistics, StatUtils.
> But when you execute double std = StatUtils.variance(values), you are not 
> actually get std in std, you get std*std, because DescriptiveStatistics 
> actually returns FastMath.sqrt(getVariance()), but StatUtils returns variance 
> directly.
> The solution is to substitute "double std = StatUtils.variance(values);" with 
> "double std = FastMath.sqrt(StatUtils.variance(values));"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to