From 4a4f843f0493580e6fe6f2950400bcc6e2aed841 Mon Sep 17 00:00:00 2001 From: Phil Steitz Date: Sat, 16 Apr 2005 21:49:45 +0000 Subject: [PATCH] Fixed javadoc errors. One-sided t-test significance adjustment was reversed in javadoc for boolean-valued test methods. BZ #34448 Reported by: Gilles Gaillard git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@161613 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/math/stat/inference/TTest.java | 26 +++++++++---------- .../math/stat/inference/TTestImpl.java | 26 +++++++++---------- xdocs/userguide/stat.xml | 6 ++--- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/java/org/apache/commons/math/stat/inference/TTest.java b/src/java/org/apache/commons/math/stat/inference/TTest.java index cf38507a7..7cd6791a3 100644 --- a/src/java/org/apache/commons/math/stat/inference/TTest.java +++ b/src/java/org/apache/commons/math/stat/inference/TTest.java @@ -110,7 +110,7 @@ public interface TTest { *

* Returns true iff the null hypothesis can be rejected with * confidence 1 - alpha. To perform a 1-sided test, use - * alpha / 2 + * alpha * 2 *

* Usage Note:
* The validity of the test depends on the assumptions of the parametric @@ -347,7 +347,7 @@ public interface TTest { *

* Returns true iff the null hypothesis can be * rejected with confidence 1 - alpha. To - * perform a 1-sided test, use alpha / 2 + * perform a 1-sided test, use alpha * 2 *

* Examples:

    *
  1. To test the (2-sided) hypothesis sample mean = mu at @@ -356,7 +356,7 @@ public interface TTest { *
  2. To test the (one-sided) hypothesis sample mean < mu * at the 99% level, first verify that the measured sample mean is less * than mu and then use - *
    tTest(mu, sample, 0.005) + *
    tTest(mu, sample, 0.02) *
*

* Usage Note:
@@ -415,7 +415,7 @@ public interface TTest { *

* Returns true iff the null hypothesis can be rejected with * confidence 1 - alpha. To perform a 1-sided test, use - * alpha / 2. + * alpha * 2. *

* Examples:

    *
  1. To test the (2-sided) hypothesis sample mean = mu at @@ -424,7 +424,7 @@ public interface TTest { *
  2. To test the (one-sided) hypothesis sample mean < mu * at the 99% level, first verify that the measured sample mean is less * than mu and then use - *
    tTest(mu, sampleStats, 0.005) + *
    tTest(mu, sampleStats, 0.02) *
*

* Usage Note:
@@ -535,7 +535,7 @@ public interface TTest { *

* Returns true iff the null hypothesis that the means are * equal can be rejected with confidence 1 - alpha. To - * perform a 1-sided test, use alpha / 2 + * perform a 1-sided test, use alpha * 2 *

* See {@link #t(double[], double[])} for the formula used to compute the * t-statistic. Degrees of freedom are approximated using the @@ -549,9 +549,9 @@ public interface TTest { *
tTest(sample1, sample2, 0.05). * *

  • To test the (one-sided) hypothesis mean 1 < mean 2 , - * first verify that the measured mean of sample 1 is less - * than the mean of sample 2 and then use - *
    tTest(sample1, sample2, 0.005) + * at the 99% level, first verify that the measured mean of sample 1 + * is less than the mean of sample 2 and then use + *
    tTest(sample1, sample2, 0.02) *
  • *

    * Usage Note:
    @@ -591,7 +591,7 @@ public interface TTest { *

    * Returns true iff the null hypothesis that the means are * equal can be rejected with confidence 1 - alpha. To - * perform a 1-sided test, use alpha / 2. To perform the test + * perform a 1-sided test, use alpha * 2. To perform the test * without the assumption of equal subpopulation variances, use * {@link #tTest(double[], double[], double)}. *

    @@ -607,7 +607,7 @@ public interface TTest { * at the 99% level, first verify that the measured mean of * sample 1 is less than the mean of sample 2 * and then use - *
    tTest(sample1, sample2, 0.005) + *
    tTest(sample1, sample2, 0.02) * *

    * Usage Note:
    @@ -723,7 +723,7 @@ public interface TTest { *

    * Returns true iff the null hypothesis that the means are * equal can be rejected with confidence 1 - alpha. To - * perform a 1-sided test, use alpha / 2 + * perform a 1-sided test, use alpha * 2 *

    * See {@link #t(double[], double[])} for the formula used to compute the * t-statistic. Degrees of freedom are approximated using the @@ -739,7 +739,7 @@ public interface TTest { * at the 99% level, first verify that the measured mean of * sample 1 is less than the mean of sample 2 * and then use - *
    tTest(sampleStats1, sampleStats2, 0.005) + *
    tTest(sampleStats1, sampleStats2, 0.02) * *

    * Usage Note:
    diff --git a/src/java/org/apache/commons/math/stat/inference/TTestImpl.java b/src/java/org/apache/commons/math/stat/inference/TTestImpl.java index bda00bdff..4c46098b4 100644 --- a/src/java/org/apache/commons/math/stat/inference/TTestImpl.java +++ b/src/java/org/apache/commons/math/stat/inference/TTestImpl.java @@ -123,7 +123,7 @@ public class TTestImpl implements TTest { *

    * Returns true iff the null hypothesis can be rejected with * confidence 1 - alpha. To perform a 1-sided test, use - * alpha / 2 + * alpha * 2 *

    * Usage Note:
    * The validity of the test depends on the assumptions of the parametric @@ -420,7 +420,7 @@ public class TTestImpl implements TTest { *

    * Returns true iff the null hypothesis can be * rejected with confidence 1 - alpha. To - * perform a 1-sided test, use alpha / 2 + * perform a 1-sided test, use alpha * 2 *

    * Examples:

      *
    1. To test the (2-sided) hypothesis sample mean = mu at @@ -429,7 +429,7 @@ public class TTestImpl implements TTest { *
    2. To test the (one-sided) hypothesis sample mean < mu * at the 99% level, first verify that the measured sample mean is less * than mu and then use - *
      tTest(mu, sample, 0.005) + *
      tTest(mu, sample, 0.02) *
    *

    * Usage Note:
    @@ -501,7 +501,7 @@ public class TTestImpl implements TTest { *

    * Returns true iff the null hypothesis can be rejected with * confidence 1 - alpha. To perform a 1-sided test, use - * alpha / 2. + * alpha * 2. *

    * Examples:

      *
    1. To test the (2-sided) hypothesis sample mean = mu at @@ -510,7 +510,7 @@ public class TTestImpl implements TTest { *
    2. To test the (one-sided) hypothesis sample mean < mu * at the 99% level, first verify that the measured sample mean is less * than mu and then use - *
      tTest(mu, sampleStats, 0.005) + *
      tTest(mu, sampleStats, 0.02) *
    *

    * Usage Note:
    @@ -656,10 +656,10 @@ public class TTestImpl implements TTest { * the 95% level, use *
    tTest(sample1, sample2, 0.05). * - *

  • To test the (one-sided) hypothesis mean 1 < mean 2 , - * first verify that the measured mean of sample 1 is less - * than the mean of sample 2 and then use - *
    tTest(sample1, sample2, 0.005) + *
  • To test the (one-sided) hypothesis mean 1 < mean 2 at + * the 99% level, first verify that the measured mean of sample 1 + * is less than the mean of sample 2 and then use + *
    tTest(sample1, sample2, 0.02) *
  • *

    * Usage Note:
    @@ -703,7 +703,7 @@ public class TTestImpl implements TTest { *

    * Returns true iff the null hypothesis that the means are * equal can be rejected with confidence 1 - alpha. To - * perform a 1-sided test, use alpha / 2. To perform the test + * perform a 1-sided test, use alpha * 2. To perform the test * without the assumption of equal subpopulation variances, use * {@link #tTest(double[], double[], double)}. *

    @@ -719,7 +719,7 @@ public class TTestImpl implements TTest { * at the 99% level, first verify that the measured mean of * sample 1 is less than the mean of sample 2 * and then use - *
    tTest(sample1, sample2, 0.005) + *
    tTest(sample1, sample2, 0.02) * *

    * Usage Note:
    @@ -855,7 +855,7 @@ public class TTestImpl implements TTest { *

    * Returns true iff the null hypothesis that the means are * equal can be rejected with confidence 1 - alpha. To - * perform a 1-sided test, use alpha / 2 + * perform a 1-sided test, use alpha * 2 *

    * See {@link #t(double[], double[])} for the formula used to compute the * t-statistic. Degrees of freedom are approximated using the @@ -871,7 +871,7 @@ public class TTestImpl implements TTest { * at the 99% level, first verify that the measured mean of * sample 1 is less than the mean of sample 2 * and then use - *
    tTest(sampleStats1, sampleStats2, 0.005) + *
    tTest(sampleStats1, sampleStats2, 0.02) * *

    * Usage Note:
    diff --git a/xdocs/userguide/stat.xml b/xdocs/userguide/stat.xml index b339ddbfc..5ecb24d74 100644 --- a/xdocs/userguide/stat.xml +++ b/xdocs/userguide/stat.xml @@ -500,7 +500,7 @@ testStatistic.pairedT(sample1, sample2);

    - To compute the (one-sided) p-value: + To compute the p-value: testStatistic.pairedTTest(sample1, sample2); @@ -515,7 +515,7 @@ testStatistic.pairedTTest(sample1, sample2, .05); returned by testStatistic.pairedTTest(sample1, sample2) is less than .05 -

    Example 2: unpaired, two-sample t-test using +
    Example 2: unpaired, two-sided, two-sample t-test using StatisticalSummary instances, without assuming that subpopulation variances are equal.

    @@ -543,7 +543,7 @@ testStatistic.t(summary1, summary2);

    - To compute the (one-sided) p-value: + To compute the p-value: testStatistic.tTest(sample1, sample2);