spectral_connectivity.statistics.power_bias#
- power_bias(n_observations: int) float[source]#
Bias of the log power spectrum.
A multitaper power estimate satisfies
S_hat / S ~ chi2_nu / nuwithnu = 2 * n_observationsdegrees of freedom. Writingchi2_nuas2 * Gamma(nu / 2)givesE[log(S_hat / S)] = psi(nu / 2) - log(nu / 2), i.e. the digamma/log are evaluated at the chi-squared shape parameternu / 2 = n_observations(not atnu).- Parameters:
n_observations (int) – n_observations is n_tapers * n_trials
- Returns:
bias
- Return type:
Examples
>>> print(f"Bias with 100 obs: {power_bias(100):.6f}") Bias with 100 obs: -0.005008 >>> print(f"Bias with 1000 obs: {power_bias(1000):.6f}") Bias with 1000 obs: -0.000500