Click or drag to resize

NMathFunctionsFishersExactTest(DataFrame) 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.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static double FishersExactTest(
	DataFrame data
)

Parameters

data  DataFrame
The 2 x 2 contingency table.

Return Value

Double
The lesser of the right and left tail p-value.
Exceptions
ExceptionCondition
InvalidArgumentExceptionThrown if the dimensions of the given contigency table are not 2 x 2, if both columns are not instances of DFIntColumn, 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