spectral_connectivity.statistics.coherence_bias#

coherence_bias(n_observations: int) → float[source]#

Estimate bias correction for coherence estimates.

Coherence estimates are biased by finite sample size. This function computes the bias correction factor that can be subtracted from Fisher z-transformed coherence estimates.

Parameters:

n_observations (int) – Number of observations used in coherence estimation (n_tapers * n_trials).

Returns:

bias – Bias correction factor for Fisher z-transform of coherence.

Return type:

float

Examples

>>> print(f"Bias with 100 obs: {coherence_bias(100):.6f}")
Bias with 100 obs: 0.005051
>>> print(f"Bias with 1000 obs: {coherence_bias(1000):.6f}")
Bias with 1000 obs: 0.000501

References

[1]

Enochson, L.D., and Goodman, N.R. (1965). Gaussian approximations to the distribution of sample coherence (Measurement analysis corp Los Angeles CA).

[2]

Bokil, H., Purpura, K., Schoffelen, J.-M., Thomson, D., and Mitra, P. (2007). Comparing spectra and coherences for groups of unequal size. Journal of Neuroscience Methods 159, 337-345. 10.1016/j.jneumeth.2006.07.011.