You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/10/23 05:52:26 UTC

DO NOT REPLY [Bug 31860] New: - Wrong p-value in SimpleRegression (factor 2 difference)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31860>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31860

Wrong p-value in SimpleRegression (factor 2 difference)

           Summary: Wrong p-value in SimpleRegression (factor 2 difference)
           Product: Commons
           Version: 1.0 Alpha
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Math
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: kim@kimvdlinde.com


SimpleRegression gives back wrong P-value. (when test data set is compared to
STATISTICA software package output. Error is likely one-sided versus two-sided
testing issue:
OLD:
    public double getSignificance() throws MathException {
        return (
            1.0 - getTDistribution().cumulativeProbability(
                    Math.abs(getSlope()) / getSlopeStdErr()));
    }

FIXED:
    public double getSignificance() throws MathException {
        return 2d*(
            1.0 - getTDistribution().cumulativeProbability(
                    Math.abs(getSlope()) / getSlopeStdErr()));
    }

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org