ContinuousTTest¶
- class otagrum.ContinuousTTest(*args)¶
ContinuousTTest class.
- Parameters:
- data2-d sequence of float
The data from which the t-test statistics are extracted.
- alphafloat
The confidence level. If not specified, its value is set to 0.1.
Methods
GetK
(size, dimension)Static method to compute the bin number of an empirical Bernstein copula.
Clear cache containing the logPDFs of conditional empirical Bernstein copula (X,Y|Z) that are used to compute the test statistics.
clearCacheLevel
(level)Clear cache for a fixed size of conditioning set (cache level).
getAlpha
()Return the hypothesis test threshold.
Return the description (variable names) of the underlying data set.
Return the dimension of the underlying data set.
getTTest
(Y, Z, X)Return the value of t-test statistics for the hypothesis Y indep Z | X.
getTTestWithoutCorrections
(Y, Z, X)Return the value of t-test statistics without corrections for the hypothesis Y indep Z | X.
isIndep
(Y, Z, X)Test the hypothesis Y indep Z | X.
isIndepFromTest
(t, alpha)Test independence from a given t-test statistics value and a given confidence threshold.
setAlpha
(alpha)Change the hypothesis test threshold.
- __init__(*args)¶
- static GetK(size, dimension)¶
Static method to compute the bin number of an empirical Bernstein copula.
- Parameters:
- sizeint
Size of the sample from which the empirical Bernstein copula is extracted.
- dimensionint
Dimension of the sample from which the empirical Bernstein copula is extracted.
- Returns:
- Kint
The number of cells into which each dimension of the unit hypercube is divided to cluster the empirical copula sample.
- clearCache()¶
Clear cache containing the logPDFs of conditional empirical Bernstein copula (X,Y|Z) that are used to compute the test statistics.
- clearCacheLevel(level)¶
Clear cache for a fixed size of conditioning set (cache level).
- Parameters:
- levelint
The cache level.
- getAlpha()¶
Return the hypothesis test threshold.
- Returns:
- alphafloat
Hypothesis test threshold
- getDataDescription()¶
Return the description (variable names) of the underlying data set.
- Returns:
- description
Description
Data description.
- description
- getDimension()¶
Return the dimension of the underlying data set.
- Returns:
- dimensionint
Dimension of the data set.
- getTTest(Y, Z, X)¶
Return the value of t-test statistics for the hypothesis Y indep Z | X.
- Parameters:
- Yint
Y node id.
- Zint
Z node id.
- Xlist
list of node ids in the set X.
- Returns:
- ttestfloat
Value of the t-test statistics.
- getTTestWithoutCorrections(Y, Z, X)¶
Return the value of t-test statistics without corrections for the hypothesis Y indep Z | X.
- Parameters:
- Yint
Y node id.
- Zint
Z node id.
- Xlist
list of node ids in the set X.
- Returns:
- ttestfloat
Value of the raw t-test statistics
- isIndep(Y, Z, X)¶
Test the hypothesis Y indep Z | X.
- Parameters:
- Yint
Y node id.
- Zint
Z node id.
- Xlist
list of node ids in the set X.
- Returns:
- resulttuple
(t-test, p-value, independent?)
- static isIndepFromTest(t, alpha)¶
Test independence from a given t-test statistics value and a given confidence threshold.
- Parameters:
- tfloat
A value of t-test statistics.
- alphafloat
A confidence threshold.
- Returns:
- resulttuple
(t-test, p-value, independent?)
- setAlpha(alpha)¶
Change the hypothesis test threshold.
- Parameters:
- alphafloat,
New value of the hypothesis test threshold.