[ https://issues.apache.org/jira/browse/MATH377?page=com.atlassian.jira.plugin.system.issuetabpanels:commenttabpanel&focusedCommentId=12880827#action_12880827
]
Phil Steitz commented on MATH377:

I could be missing something, but I see no reason that the weighted sum of squared residuals
computed here (after the proposed change) should in general follow a chisquare distribution
or be related to a chisquare test statistic of any kind. Why is it called chisquare?
Sorry if I am missing something simple here.
> weight versus sigma in AbstractLeastSquares
> 
>
> Key: MATH377
> URL: https://issues.apache.org/jira/browse/MATH377
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.1
> Reporter: Dimitri Pourbaix
> Fix For: 2.2
>
> Original Estimate: 0.02h
> Remaining Estimate: 0.02h
>
> In AbstractLeastSquares, residualsWeights contains the WEIGHTS assigned to each observation.
In the method getRMS(), these weights are multiplicative as they should. unlike in getChiSquare()
where it appears at the denominator! If the weight is really the weight of the observation,
it should multiply the square of the residual even in the computation of the chi2.
> Once corrected, getRMS() can even reduce
> public double getRMS() {return Math.sqrt(getChiSquare()/rows);}

This message is automatically generated by JIRA.

You can reply to this email to add a comment to the issue online.
