# Changeset 169

Ignore:
Timestamp:
Sep 23, 2004, 6:19:14 PM (17 years ago)
Message:

Fisher's exact test

Location:
trunk/src
Files:
2 edited

### Legend:

Unmodified
 r168 /// Statistics(); /// /// Calculates the probabilty to get \a k or smaller from a /// hypergeometric distribution with parameters \a n1 \a n2 \a /// t. Hypergeomtric situation you get in the following situation: /// Let there be \a n1 ways for a "good" selection and \a n2 ways /// for a "bad" selection out of a total of possibilities. Take \a /// t samples without replacement and \a k of those are "good" /// samples. \a k will follow a hypergeomtric distribution. /// @cumulative hypergeomtric distribution functions P(k). /// double cdf_hypergeometric_P(u_int k, u_int n1, u_int n2, u_int t); /// /// Fisher's Exact test is a procedure that you can use for data /// in a two by two contingency table: \f$\\ /// \begin{tabular}{|c|c|} \hline a&b\\ \hline c&d\\ \hline /// \end{tabular} \f$ Fisher's Exact Test is based on exact /// probabilities from a specific distribution (the hypergeometric /// distribution). There's really no lower bound on the amount of /// data that is needed for Fisher's Exact Test. You do have to /// have at least one data value in each row and one data value in /// each column. If an entire row or column is zero, then you /// don't really have a 2 by 2 table. But you can use Fisher's /// Exact Test when one of the cells in your table has a zero in /// it. Fisher's Exact Test is also very useful for highly /// imbalanced tables. If one or two of the cells in a two by two /// table have numbers in the thousands and one or two of the /// other cells has numbers less than 5, you can still use /// Fisher's Exact Test. For very large tables (where all four /// entries in the two by two table are large), your computer may /// take too much time to compute Fisher's Exact Test. In these /// situations, though, you might as well use the Chi-square test /// because a large sample approximation (that the Chi-square test /// relies on) is very reasonable. If all elements are larger than /// 10 a Chi-square test is reasonable to use. @return one-sided /// p-value for Fisher's exact test. /// double fisher(u_int a, u_int b, u_int c, u_int d); /// private: };