Fixed error in slope parameter significance estimate

Pr #31860
Reported by: Kim van der Linde


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141475 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Phil Steitz 2004-10-24 06:27:14 +00:00
parent 8b5b7b3ba4
commit c1bf641db0
1 changed files with 2 additions and 3 deletions

View File

@ -49,7 +49,7 @@ import org.apache.commons.math.distribution.TDistribution;
* the necessary computations to return the requested statistic.</li>
* </ul>
*
* @version $Revision: 1.1 $ $Date: 2004/10/08 05:08:18 $
* @version $Revision: 1.2 $ $Date: 2004/10/24 06:27:14 $
*/
public class SimpleRegression implements Serializable {
@ -463,8 +463,7 @@ public class SimpleRegression implements Serializable {
* @throws MathException if the significance level can not be computed.
*/
public double getSignificance() throws MathException {
return (
1.0 - getTDistribution().cumulativeProbability(
return 2d* (1.0 - getTDistribution().cumulativeProbability(
Math.abs(getSlope()) / getSlopeStdErr()));
}