spiketools.stats.permutations.compute_surrogate_zscore¶
- spiketools.stats.permutations.compute_surrogate_zscore(value, surrogates)[source]¶
Compute the z-score of a real data value compared to a distribution of surrogates.
- Parameters:
- valuefloat
Value to z-score.
- surrogates1d array
Distribution of surrogates to compute the z-score against.
- Returns:
- float
The z-score of the given value.
Examples
Compute z-score for a computed value compared to a distribution of surrogates:
>>> value = 0.9 >>> surrogates = np.random.normal(size=100) >>> zscore = compute_surrogate_zscore(value, surrogates)