Documentation of 'smile.stat.hypothesis.ChiSqTest' Java class
ChiSqTest
smile.stat.hypothesis

Class ChiSqTest



  • public class ChiSqTest
    extends java.lang.Object
    Pearson's chi-square test, also known as the chi-square goodness-of-fit test or chi-square test for independence. Note that the chi-square distribution is only approximately valid for large sample size. If a siginficant fraction of bins have small numbers of counts (say, < 10), then it the statistic is not well approximated by a chi-square probability function.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      double chisq
      chi-square statistic
      double df
      The degree of freedom of chisq-statistic.
      double pvalue
      p-value
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static ChiSqTest test(int[] bins, double[] prob)
      One-sample chisq test.
      static ChiSqTest test(int[] bins, double[] prob, int constraints)
      One-sample chisq test.
      static ChiSqTest test(int[] bins1, int[] bins2)
      Two-sample chisq test.
      static ChiSqTest test(int[] bins1, int[] bins2, int constraints)
      Two-sample chisq test.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • df

        public double df
        The degree of freedom of chisq-statistic.
      • chisq

        public double chisq
        chi-square statistic
      • pvalue

        public double pvalue
        p-value
    • Method Detail

      • test

        public static ChiSqTest test(int[] bins,
                                     double[] prob)
        One-sample chisq test. Given the array bins containing the observed numbers of events, and an array prob containing the expected probabilities of events, and given one constraint, a small value of p-value indicates a significant difference between the distributions.
      • test

        public static ChiSqTest test(int[] bins,
                                     double[] prob,
                                     int constraints)
        One-sample chisq test. Given the array bins containing the observed numbers of events, and an array prob containing the expected probabilities of events, and given the number of constraints (normally one), a small value of p-value indicates a significant difference between the distributions.
      • test

        public static ChiSqTest test(int[] bins1,
                                     int[] bins2)
        Two-sample chisq test. Given the arrays bins1 and bins2, containing two sets of binned data, and given one constraint, a small value of p-value indicates a significant difference between the distributions.
      • test

        public static ChiSqTest test(int[] bins1,
                                     int[] bins2,
                                     int constraints)
        Two-sample chisq test. Given the arrays bins1 and bins2, containing two sets of binned data, and given the number of constraints (normally one), a small value of p-value indicates a significant difference between the distributions.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.