MATH-201. Fixed truncation error in t-test classes for large t values.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@645193 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brent Worden 2008-04-06 01:25:08 +00:00
parent edbf811194
commit de2965f24c
2 changed files with 9 additions and 6 deletions

View File

@ -1006,7 +1006,7 @@ public class TTestImpl implements TTest {
throws MathException {
double t = Math.abs(t(m, mu, v, n));
distribution.setDegreesOfFreedom(n - 1);
return 1.0 - distribution.cumulativeProbability(-t, t);
return 2.0 * distribution.cumulativeProbability(-t);
}
/**
@ -1031,7 +1031,7 @@ public class TTestImpl implements TTest {
double degreesOfFreedom = 0;
degreesOfFreedom = df(v1, v2, n1, n2);
distribution.setDegreesOfFreedom(degreesOfFreedom);
return 1.0 - distribution.cumulativeProbability(-t, t);
return 2.0 * distribution.cumulativeProbability(-t);
}
/**
@ -1055,7 +1055,7 @@ public class TTestImpl implements TTest {
double t = Math.abs(homoscedasticT(m1, m2, v1, v2, n1, n2));
double degreesOfFreedom = (double) (n1 + n2 - 2);
distribution.setDegreesOfFreedom(degreesOfFreedom);
return 1.0 - distribution.cumulativeProbability(-t, t);
return 2.0 * distribution.cumulativeProbability(-t);
}
/**

View File

@ -45,17 +45,20 @@ Commons Math Release Notes</title>
Javadoc and style fixes.
</action>
<action dev="luc" type="fix" issue="MATH-198" due-to="Frederick Salardi">
added an error detection for missing imaginary character while parsing complex string
Added an error detection for missing imaginary character while parsing complex string
</action>
<action dev="luc" type="fix" issue="MATH-199" due-to="Mick">
detect numerical problems in Q.R decomposition for Levenberg-Marquardt estimator
Detect numerical problems in Q.R decomposition for Levenberg-Marquardt estimator
and report them appropriately
</action>
<action dev="luc" type="fix" issue="MATH-200" due-to="Plamen Petrov">
fixed several crashes in getCovariances() and guessParametersErrors() in
Fixed several crashes in getCovariances() and guessParametersErrors() in
AbstractEstimator when some parameters are bound. The methods now explicitly
give result only about unbound parameters.
</action>
<action dev="brentworden" type="fix" issue="MATH-201" due-to="Peter Wyngaard">
Fixed truncation error in t-test classes for large t values.
</action>
</release>
<release version="1.2" date="2008-02-24"
description="This release combines bug fixes and new features. Most notable