AutoStatLib - python library for automated statistical analysis
To install run the command:
pip install autostatlib
Example use case:
See the /demo directory on Git repo or use the following example:
import numpy as np
import AutoStatLib
# generate random data:
groups = 2
n = 30
# normal data
data_norm = [list(np.random.normal(.5*i + 4, abs(1-.2*i), n))
for i in range(groups)]
# non-normal data
data_uniform = [list(np.random.uniform(i+3, i+1, n)) for i in range(groups)]
# set the parameters:
paired = False # is groups dependent or not
tails = 2 # two-tailed or one-tailed result
popmean = 0 # population mean - only for single-sample tests needed
# initiate the analysis
analysis = AutoStatLib.StatisticalAnalysis(
data_norm, paired=paired, tails=tails, popmean=popmean)
now you can preform automated statistical test selection:
analysis.RunAuto()
or you can choose specific tests:
# 2 groups independent:
analysis.RunTtest()
analysis.RunMannWhitney()
# 2 groups paired"
analysis.RunTtestPaired()
analysis.RunWilcoxon()
# 3 and more independed groups comparison:
analysis.RunOnewayAnova()
analysis.RunKruskalWallis()
# 3 and more depended groups comparison:
analysis.RunOnewayAnovaRM()
analysis.RunFriedman()
# single group tests"
analysis.RunTtestSingleSample()
analysis.RunWilcoxonSingleSample()
Test summary will be printed to the console. You can also get it as a python string via GetSummary() method.
Test results are accessible as a dictionary via GetResult() method:
results = analysis.GetResult()
The results dictionary keys with representing value types:
{
'p_value' : String
'Significance(p<0.05)' : Boolean
'Stars_Printed' : String
'Test_Name' : String
'Groups_Compared' : Integer
'Population_Mean' : Float (taken from the input)
'Data_Normaly_Distributed' : Boolean
'Parametric_Test_Applied' : Boolean
'Paired_Test_Applied' : Boolean
'Tails' : Integer (taken from the input)
'p_value_exact' : Float
'Stars' : Integer
'Warnings' : String
'Groups_N' : List of integers
'Groups_Median' : List of floats
'Groups_Mean' : List of floats
'Groups_SD' : List of floats
'Groups_SE' : List of floats
'Samples' : List of input values by groups
(taken from the input)
'Posthoc_Matrix' : 2D List of floats
'Posthoc_Matrix_bool' : 2D List of Boolean
'Posthoc_Matrix_printed': 2D List of String
'Posthoc_Matrix_stars': 2D List of String
}
If errors occured, GetResult() returns an empty dictionary
Alpha dev status.
TODO:
-- Anova: posthocs
-- Anova: add 2-way anova and 3-way anova
-- onevay Anova: add repeated measures (for normal dependent values) with and without Gaisser-Greenhouse correction
-- onevay Anova: add Brown-Forsithe and Welch (for normal independent values with unequal SDs between groups)
-- paired T-test: add ratio-paired t-test (ratios of paired values are consistent)
-- add Welch test (for norm data unequal variances)
-- add Kolmogorov-smirnov test (unpaired nonparametric 2 sample, compare cumulative distributions)
-- add independent t-test with Welch correction (do not assume equal SDs in groups)
-- add correlation test, correlation diagram
-- add linear regression, regression diagram
-- add QQ plot
-- n-sample tests: add onetail option
✅ done -- detailed normality test results
✅ done -- added posthoc: Kruskal-Wallis Dunn's multiple comparisons
tests check:
1-sample:
✅ok --Wilcoxon 2,1 tails
✅ok --t-tests 2,1 tails
2-sample:
✅ok --Wilcoxon 2,1 tails
✅ok --Mann-whitney 2,1 tails
✅ok --t-tests 2,1 tails
n-sample:
✅ok --Kruskal-Wallis 2 tail
✅ok --Dunn's multiple comparisons
✅ok --Friedman 2 tail
✅ok --one-way ANOVA 2-tailed
✅ok --Tukey`s multiple comparisons
Metadata
Release files for AutoStatLib 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autostatlib-0.4.3.tar.gz | 41.7 kB | With provenance | Details for autostatlib-0.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autostatlib-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for autostatlib-0.4.3-py3-none-any.whl |
Total release size: 76.6 kB
Release files / autostatlib-0.4.3.tar.gz
| Download URL | autostatlib-0.4.3.tar.gz |
|---|---|
| Size | 41.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c904d0c66b448aba164bb8acda4c3c4bb31f8782425a146ff00492973216ee7c
|
|
BLAKE2b-256 checksum How to use checksums |
c6db7e5f43112af7420faf1c2c9c47cfe4bbca7a0bc073925af9e53062044510
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logRelease files / autostatlib-0.4.3-py3-none-any.whl
| Download URL | autostatlib-0.4.3-py3-none-any.whl |
|---|---|
| Size | 34.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b408159308540f5de7dfa8738194bcd35f340cb2fc1d9098cb69a71c3b2068c2
|
|
BLAKE2b-256 checksum How to use checksums |
483d6d07b56ce2ccd4d0220968cc373f2d7cf19066eb1c37048620168ab7d4fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logSecurity for AutoStatLib 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for autostatlib-0.4.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.