Class WilcoxonSignedRank


  • public class WilcoxonSignedRank
    extends HypothesisTest
    The Wilcoxon signed rank test tests, for the one-sample case, the median of the distribution against a hypothetical median, and for the two-sample case, the equality of medians of groups. Unlike the Student's t-test, the Wilcoxon signed rank test does not assume any distribution of the population.

    The R equivalent function is wilcox.test.

    See Also:
    • Constructor Detail

      • WilcoxonSignedRank

        public WilcoxonSignedRank​(double[] sample1,
                                  double[] sample2,
                                  double mu,
                                  boolean isExact)
        Perform the Wilcoxon Signed Rank test to test for the equality of medians.
        Parameters:
        sample1 - sample 1
        sample2 - sample 2
        mu - the hypothetical median that the distribution is symmetric about
        isExact - true if to use the exact distribution; otherwise, normal approximation is used
      • WilcoxonSignedRank

        public WilcoxonSignedRank​(double[] sample1,
                                  double[] sample2)
        Perform the Wilcoxon Signed Rank test to test for the equality of medians.
        Parameters:
        sample1 - sample 1
        sample2 - sample 2
      • WilcoxonSignedRank

        public WilcoxonSignedRank​(double[] sample,
                                  int mu)
        Perform the Wilcoxon Signed Rank test to test for the equality of medians.
        Parameters:
        sample - a sample
        mu - the hypothetical median that the distribution is symmetric about
      • WilcoxonSignedRank

        public WilcoxonSignedRank​(double[] sample)
        Perform the Wilcoxon Signed Rank test to test for the equality of medians.
        Parameters:
        sample - a sample