Several two-samples tests for counts data
Project description
TwoSamplesBinomial: Two-sample testing for counts data
Usually in the context of a multiple testing approach to compare two or more frequency tables.
References:
- [1] D. L. Donoho and A. Kipnis. (2022) Higher criticism to compare two large frequency tables, with sensitivity to possible rare and weak differences. Annals of Statistics.
- [2] C. B. Dean. (1992) Testing for Overdispersion in Poisson and Binomial Regression Models. Journal of the American Statistical Association
Methods:
bin_allocation_test
(the test from [1])bin_variance_test
(test from [2])bin_variance_test_df
the same asbin_variance_test
plus additional information
Additional auxiliary function of independent interest:
poisson_test
Vectorized one-sided Poisson test with an option to do a randomized testbinom_test
Vectorized one-sided binomial test with an option to do a randomized testbinom_test_two_sided
Vectorized Two-sided binomial test with an option to do a randomized testbinom_test_two_sided_slow
Vectorized two-sided binomial test using scipy.stats.binom_test
Example:
from scipy.stats import poisson
n = 100
k = 10
P = np.ones(n) / n
Q = P.copy()
smp1 = np.random.multinomial(n, P) # sample form P
smp2 = np.random.multinomial(n, Q) # sample from Q
pvals_alloc = bin_allocation_test(smp1, smp2) # binomial P-values
pvals_var = bin_variance_test(smp1, smp2) # binomial P-values
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for two-sample-binomial-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc43cf68cd6b41f347ec7a826ac8139b1de3211d53a9242f93316ba547c66dc4 |
|
MD5 | c55f3cd167cfae6df39241efed6bea50 |
|
BLAKE2b-256 | 0bee25ca3867e21fe8c4deae9e80633148a918885b4317c39cdb2bd57ab42225 |
Close
Hashes for two_sample_binomial-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92a66fa95cb9a9cd90fca2a5d9cfaec1254d15a33ff115af19cf84cd07bef787 |
|
MD5 | 35b31012e6a07fb784ac82915a94b125 |
|
BLAKE2b-256 | 0fb272c7adb033e87669bfed3a149e7e6d6b0d070fcbfd00c558841bdbf29f9e |