amep.statistics.binder_cumulant#
- amep.statistics.binder_cumulant(data: ndarray) float #
Calculates the Binder cumulant for the data given in the array.
Notes
The Binder cumulant of a quantity x is defined by
\[U_4 = 1 - \frac{\langle x^4\rangle}{3\langle x^2\rangle^2}.\]See Refs. [1] [2] [3] for further information.
References
- Parameters:
data (np.ndarray) – Data as 1D array of floats.
- Returns:
Binder cumulant.
- Return type:
float
Examples
>>> import amep >>> import numpy as np >>> ndata = np.random.normal(size=100000) >>> rdata = np.random.rand(100000) >>> a = amep.statistics.binder_cumulant(ndata) >>> b = amep.statistics.binder_cumulant(rdata) >>> print(a,b) 0.0009875868561266543 0.40026594013163164 >>>