Hypothesis test for difference of beta-binomial proportions
Project description
bbprop
This package provides a statistical test for the difference of beta-binomial proportions.
Installation
pip3 install bbprop
or
pip3 install --user bbprop
Hypothesis test details
The aim of the test is to determine whether two values drawn from beta-binomial distributions are significantly different from one another.
The null hypothesis of the test is that two random variables B0
and B1
have beta-binomial distribtions with parameters theta0 = (n0, alpha0, beta0)
and theta1 = (n1, alpha1, beta1)
, respectively.
The test statistic is the value x = abs(b0/n0 - b1/n1)
where b0
and b1
are the number of successes drawn from B0
and B1
.
The p-value is then the probability that x
is greater than or equal to its observed value, given the predefined null distribution.
Examples
from bbprop import bbprop_cdf, bbprop_test
help(bbprop_cdf)
help(bbprop_test)
bbprop_cdf(0.1, [30, 12], [4, 5], [6, 5])
bbprop_test(0.1, [30, 12], [4, 5], [6, 5])
Project details
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
File details
Details for the file bbprop-0.0.7.tar.gz
.
File metadata
- Download URL: bbprop-0.0.7.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cb9feb52d2e0737d736e79fccbc70fa096ed64eaa0f84250fd8be18c74e86f1 |
|
MD5 | e13717c2703feb4f4cc08dc3b5184070 |
|
BLAKE2b-256 | bf8099bb2550a87ede2b458e7ae44309689858d9bdbd348a21178d327d919f5b |
File details
Details for the file bbprop-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: bbprop-0.0.7-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb396aadd368c1b4d16ba1f098ce553bc94a900b380926ecb0a4c126b341a225 |
|
MD5 | 662a48c714fd14a963e5c0b2edea3c7e |
|
BLAKE2b-256 | 587e99543c4f6661ec8e1b8ce4d10aedb00cbd5be42652e4bd91a80ac86e256d |