| NMathFunctionsFishersExactTest(Int32) Method |
Returns the one-tailed Fisher's Exact Test p-value for the specified 2 x 2 contingency table and alternative hypothesis.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public static double FishersExactTest(
int[,] data
)
Public Shared Function FishersExactTest (
data As Integer(,)
) As Double
public:
static double FishersExactTest(
array<int,2>^ data
)
static member FishersExactTest :
data : int[,] -> float
Parameters
- data Int32
- The 2 x 2 contingency table.
Return Value
DoubleThe lesser of the right and left tail p-value.
Exceptions Exception | Condition |
---|
InvalidArgumentException | Thrown if the dimensions of the given contigency table are not 2 x 2, or
if any of the count values is negative. |
Remarks
Fisher's exact test is so-called because the significance of the deviation from a null hypothesis can be calculated exactly,
rather than relying on an approximation.
Fisher's exact test is a useful alternative to the chi-square test in cases where sample sizes are small.
The usual rule of thumb for deciding whether the chi-squared approximation is good enough is whether the expected
values in all cells of the contingency table is greater than or equal to 5.
See Also