| NMathFunctionsFishersExactTest(Int32, Int32, Int32, Int32, HypothesisType) Method |
Returns the 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 a,
int b,
int c,
int d,
HypothesisType type
)
Public Shared Function FishersExactTest (
a As Integer,
b As Integer,
c As Integer,
d As Integer,
type As HypothesisType
) As Double
public:
static double FishersExactTest(
int a,
int b,
int c,
int d,
HypothesisType type
)
static member FishersExactTest :
a : int *
b : int *
c : int *
d : int *
type : HypothesisType -> float
Parameters
- a Int32
- Upper left cell in contingency table.
- b Int32
- Upper right cell in contingency table.
- c Int32
- Lower left cell in contingency table.
- d Int32
- Lower right cell in contingency table.
- type HypothesisType
- Enum value indicating the form of the alternative hypothesis.
Return Value
DoubleThe p-value.
Exceptions Remarks
a, b, c and d are cell values for contingency table:
a b
c d
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