Skip to main content

Module functions

Module functions 

Source
Expand description

Auto-generated module

🤖 Generated with SplitRS

Functions§

acf
Autocorrelation function (ACF) up to max_lag.
anderson_darling_statistic
Anderson-Darling test statistic for testing goodness-of-fit.
autocorrelation_time
Integrated autocorrelation time Ï„ of data.
block_average
Block-averaging estimator.
boltzmann_factor
Boltzmann factor exp(−E / (k_B T)).
bootstrap_ci
Compute a bootstrap confidence interval for a statistic.
bootstrap_se
Bootstrap standard error of a statistic.
chi_squared_gof
Chi-squared goodness-of-fit test returning the statistic and degrees of freedom.
chi_squared_statistic
Chi-squared goodness-of-fit test — returns the χ² statistic.
chi_squared_test
Pearson’s χ² goodness-of-fit statistic.
correlation
Returns the Pearson correlation coefficient of x and y.
correlation_matrix
Compute the Pearson correlation matrix for a data matrix.
covariance
Returns the sample covariance of x and y (divides by n − 1).
covariance_matrix
Covariance matrix for a data matrix.
ecdf_at
Evaluate the empirical CDF at a given point x.
empirical_cdf
Compute the empirical CDF of data.
free_energy_from_partition
Helmholtz free energy F = −k_B T ln(Z).
histogram
Bins data into n_bins equal-width bins.
huber_m_estimator
Huber M-estimator of location.
iqr
Returns the inter-quartile range (IQR = Q3 − Q1).
kruskal_wallis_h
Kruskal-Wallis H statistic (non-parametric one-way ANOVA).
ks_statistic
Kolmogorov–Smirnov statistic D = sup |F_n(x) − F(x)|.
ks_test_one_sample
One-sample Kolmogorov-Smirnov test statistic against a theoretical CDF.
ks_test_two_sample
Two-sample Kolmogorov-Smirnov statistic between empirical distributions of x and y.
kurtosis
Returns the excess kurtosis of data (kurtosis minus 3).
linear_regression
Simple ordinary least-squares linear regression.
mad
Median Absolute Deviation (MAD): median of |x_i - median(x)|.
mann_whitney_u
Mann-Whitney U statistic (non-parametric two-sample test).
maxwell_boltzmann_speed
Most probable speed in the Maxwell–Boltzmann distribution: v_p = √(2 k_B T / m).
mean
Returns the arithmetic mean of data. Returns 0.0 for an empty slice.
median
Returns the median of data, working on a sorted copy.
pacf
Partial autocorrelation function (PACF) using the Yule-Walker equations.
partition_function
Canonical partition function Z = Σ exp(−E_i / (k_B T)).
pca
Compute PCA using power iteration on the covariance matrix.
pca_transform
Project a centred data vector onto the principal components.
pearson_correlation
Returns the Pearson correlation coefficient (alias for correlation).
pearson_r
Pearson correlation coefficient.
percentile
Returns the p-th percentile of data using linear interpolation.
quartiles
Returns the lower quartile (Q1), median (Q2), and upper quartile (Q3).
running_average
Returns a closure that computes a running mean over the last window values.
sample_kurtosis
Compute excess kurtosis (kurtosis − 3). (Alias retained as a standalone function for convenience.)
sample_skewness
Compute sample skewness via the adjusted Fisher-Pearson method. (Alias retained as a standalone function for convenience.)
shapiro_wilk_w
Shapiro-Wilk normality approximation (W statistic only, no p-value).
skewness
Returns the sample skewness of data.
spearman_correlation
Spearman rank correlation coefficient between x and y.
std_dev
Returns the unbiased sample standard deviation of data.
t_test_one_sample
One-sample t-test against a hypothesised mean mu0.
t_test_one_sample_full
Compute the p-value for a two-sided one-sample Student’s t-test.
t_test_two_sample
Two-sample independent t-test.
tukey_biweight_estimator
Tukey biweight (bisquare) M-estimator of location.
variance
Returns the unbiased sample variance of data (divides by n − 1).
welch_t_test
Compute two-sample Welch’s t-test (unequal variances).
wilcoxon_signed_rank
Wilcoxon signed-rank test statistic for paired data.