research_tools
Fifty-eight helpers for numeric research data. No scipy, no pandas, no install.
Design rule. Every function is short enough to read in full before you
trust it, returns a plain dict or array, and never touches the network or the filesystem. That is the
whole reason for not using a heavyweight library: when a number matters, you should be able to audit
the ten lines that produced it.
import research_tools as rt
v = rt.parse_numbers("4.12, 4.35, 4.40, 4.55")
rt.describe(v) # -> n, median, MAD, range
rt.grubbs(v) # -> G, critical value, is-outlier
rt.bootstrap_ci(v) # -> 95% interval, 2000 resamples, fixed seed
Robust statistics
median |
v |
mad |
v |
iqr |
v |
robust_z |
v |
winsorize |
v, p=… |
trimmed_mean |
v, p=… |
skew |
v |
kurtosis |
v |
cv |
v |
describe |
v |
Outliers and randomness
outliers_mad |
v, k=… |
outliers_iqr |
v, k=… |
grubbs |
v, alpha=… |
runs_test |
v |
Distributions and tails
fit_lognormal |
v |
hill |
v, k=… |
pwm_tail |
v |
ks_uniform |
v |
empirical_cdf |
v, x |
entropy_hist |
v, bins=… |
Uncertainty and detection
propagate_ratio |
y, sy, x, sx |
combine_uncertainties |
|
welch_dof |
s1, n1, s2, n2 |
coverage_95 |
dof |
uncertainty_interval |
x, u, dof=…, k95=… |
snr_db |
signal, noise |
detectability |
blank_std, k=… |
currie_limit |
blank_mean, blank_std, k=… |
Signal handling
detrend_linear |
v |
moving_average |
v, n=… |
median_filter |
v, n=… |
autocorrelation |
v, lag=… |
hurst_rs |
v |
dominant_frequency |
v, dt=… |
psd_band |
v, dt=…, lo=…, hi=… |
Sampling
gy_mass |
d_mm, rel_error=…, const=… |
bootstrap_ci |
v, stat=…, n=…, alpha=…, seed=… |
jackknife_se |
v, stat=… |
permutation_p |
a, b, seed=…, n=… |
sample_size_mean |
sd, margin, z=… |
power_t |
effect, sd, n, z=… |
split_sample |
v, seed=… |
Regression and fit quality
ols |
x, y |
theil_sen |
x, y |
aic |
residuals, k |
bic |
residuals, k |
residual_check |
x, y |
variance_inflation |
xs |
Data hygiene
parse_numbers |
text |
round_sig |
v, sig=… |
dedupe_exact |
v |
find_duplicates |
v |
gaps_in_sequence |
v |
constant_columns |
cols |
missing_report |
rows |
Provenance
hash_dataset |
data |
provenance_record |
source, n, note=… |
checksum_list |
v |
What is deliberately absent
No p-value machinery beyond approximations, no plotting, no data-frame operations, no automatic
model selection. Each of those pulls in a library whose defaults then decide the answer — which is
precisely the failure the corrections register documents sixteen times.
If a function here is wrong, you can see it, fix it, and say so. That is a property worth
giving up convenience for.
58 functions · 4 November 2026 · used by the
test kit and browser audit.