Hypothesis test based on the MCB stopping rule (Kim 2010) Terminates
when it hits bounds or when the maximal samples have been hit. Estimates
within approximately 0.001 at the bounds for alpha=0.95 or
alpha=0.99.
For clarity in code, c1 is referred to as upperBuffer and c2 is
referred to as lowerBuffer. The default upper and lower buffer sizes are
taken from Kim (2010)
|
__init__(self,
sample1,
sample2,
testStatistic,
alternative=' two.sided ' ,
maxSamples=10000,
pValue=0.05,
upperBuffer=2.241,
lowerBuffer=-2.241)
Initialize the estimator |
|
|
str or None
|
_calculateBoundHit(self,
value,
tieCount,
p,
m,
n,
alternative)
Calculate which bound has been hit, if any |
|
|
|
|
|
_updateBoundHit(self)
Update which bound has been hit, if any |
|
|
|
addSamples(self,
n,
finalize=True)
Add a maximum of n samples to the estimate. |
|
|
str
|
getBoundHit(self,
update=True)
Get the boundary that has been crossed, if any. |
|
|
int
|
getLowerBound(self,
p,
m,
n)
Return the active lower bound for values |
|
|
int
|
|
bool
|
isBoundHit(self,
update=True)
Check if upper or lower bound has been hit. |
|
|
Inherited from MCHypothesisTest :
getSampleFunction ,
getStatisticFunction
Inherited from MonteCarloEstimator :
getEstimate ,
getNumSamples ,
updateEstimate
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|