LongMemoryEstimate.confidence_interval#

LongMemoryEstimate.confidence_interval(*, alpha=0.05)[source]#

Asymptotic 1 - alpha interval for d.

\(\hat d \pm z_{1 - \alpha/2}\, \widehat{se}\), symmetric because the limit is normal.

Parameters:

alpha (float) – One minus the coverage, in (0, 1).

Return type:

tuple[float, float]

Returns:

(low, high).

Raises:

SpecificationError – If alpha is not inside (0, 1).

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> est = exact_local_whittle(np.cumsum(rng.standard_normal(500)))
>>> tuple(round(v, 3) for v in est.confidence_interval())
(0.928, 1.19)
>>> tuple(round(v, 3) for v in est.confidence_interval(alpha=0.32))
(0.993, 1.125)