Skip to main content

AB test analysis toolbox for analyzing and reporting the results of an ab test experiment. It provides the functions to analyze the ab test result of an experiment.

Project description

A/B-testing

ab-testing-logo

Pypi Read the Docs PyPI - Downloads release date last commit

CICD Format License size of files

A/B testing is process which allows developer/data scientist to analyze and evaluate, the performance of products in an experiment. In this process two or more versions of a variable (web page, page element, products etc.) are shown to different segments of website visitors at the same time to determine which version leaves the maximum impact and drives business metrics.

In A/B testing, A refers to the original testing variable. Whereas B refers to a new version of the original testing variable. Impact of the results can be evaluated based on,

  • Conversion Rate
  • Significance test

Documentation can be found on- ab-testing-analysis.readthedocs.io


Installation & Usage

  • Installing the library from pypi - It has only dependency on pandas & numpy
pip install ab-testing-analysis
  • Usages & working sample - Tutorial

  • Example code,

from ab_testing import ABTest
from ab_testing.data import Dataset

df = Dataset().data()

ab_obj = ABTest(df,response_column='Response',group_column='Group')

print(ab_obj.conversion_rate(),'\n','-'*10)
print(ab_obj.significance_test(),'\n','-'*10)
print(df.head())

Output:

  Conversion Rate Standard Deviation Standard Error
A          20.20%              0.401          0.018
B          22.20%              0.416         0.0186 
 ----------
z statistic: -0.77      p-value: 0.439
Confidence Interval 95% for A group: 16.68% to 23.72%
Confidence Interval 95% for B group: 18.56% to 25.84%

The Group A fail to perform significantly different than group B.
The P-Value of the test is 0.439 which is above 0.05, hence Null hypothesis Hₒ cannot be rejected. 
 ----------
        Users  Response Group
0  IS36FC7AQJ         0     A
1  LZW2YNYHZG         1     A
2  9588IGN0RN         1     A
3  HSAH1TYQFF         1     A
4  5D9G147941         0     A

Contribution

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.

A detailed overview on how to contribute can be found in the contributing guide.

Code of Conduct

As contributors and maintainers to this project, you are expected to abide by code of conduct. More information can be found at Code of conduct

License

MIT

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

ab_testing-analysis-1.2.7.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

ab_testing_analysis-1.2.7-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file ab_testing-analysis-1.2.7.tar.gz.

File metadata

  • Download URL: ab_testing-analysis-1.2.7.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for ab_testing-analysis-1.2.7.tar.gz
Algorithm Hash digest
SHA256 2394e6e89a2e06727a72d64ef048b4fe281813768e42c7326d8658463240625b
MD5 32adc5c48aba576466b00eda3088f3a0
BLAKE2b-256 860ae5fdd240f8b14246683bbf744d6eac1bb4e19266a5dc9b629debafd8573e

See more details on using hashes here.

File details

Details for the file ab_testing_analysis-1.2.7-py3-none-any.whl.

File metadata

File hashes

Hashes for ab_testing_analysis-1.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 46d3afd4513d5d0a5e158ab7b811c2231525ee23b7fd46b7bac302b94d04891b
MD5 f05f333667a0133e23b48e607e53cab7
BLAKE2b-256 c7326a1f32c41c796ae910956f12785aff3e7e6da1e55debbbe64f9c31f19b1a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page