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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9c23793b8e82d28372003d46d7273385cd8e0ad1957c273f20359a900850462 |
|
MD5 | ee5378bb69956fc72f9d3b0506a26fe5 |
|
BLAKE2b-256 | 6c92ba3e9a3874edd306ef3e545d3af8c5282e3249a8e236a8442013ceb8a39f |
Close
Hashes for two_sample_binomial-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e010279554aa0bf8d29088c3fa9072c454126a161d8a53f243121721b57a5884 |
|
MD5 | f5640a05c9fa4dc286a8650c6e3c2ee1 |
|
BLAKE2b-256 | 18dad474d488c8459f3fa2766d5afddb0b7f717694848e49925a07cc1b176428 |