zalando / expan

Open-source Python library for statistical analysis of randomised control trials (A/B tests)
MIT License
334 stars 50 forks source link

Changed chi-square test, removed frequencies computation #240

Closed daryadedik closed 6 years ago

daryadedik commented 6 years ago

In this PR I made some changes to previous chi-square helper method, which calculated observed frequencies from variant columns (which is very ADS related) and expected frequencies from weights. Now it accepts observed and expected frequencies as series and runs chi-square test if observed and expected frequencies are valid for the test (filter variants with the small number of observations and do not run test if the number of variants is less than 2).

daryadedik commented 6 years ago

I left pd.Series for expected and observed freqs, because they are easy to work with, but if you think dict would be better, I can consider this.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.05%) to 92.257% when pulling 3c39814737ea4a2bf7f40c658b42b043750a01ba on chi-square-restructured into 92e7fc7404531c0d54f60dbfaf3fe06680a744cd on master.