{"_id":"chi-square-a-b-testing","_rev":"3-493b8ffa524333ac6908413b8a474622","name":"chi-square-a-b-testing","description":"Npm module for calculating chi-square test that gives us p-value for statistical significance with practical use in A/B testing.","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"chi-square-a-b-testing","version":"0.0.1","description":"Npm module for calculating chi-square test that gives us p-value for statistical significance with practical use in A/B testing.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/emilcieslar/chi-square-a-b-testing.git"},"keywords":["chi-square","statistical","significance","a/b","testing","p-value"],"author":{"name":"Emil Cieslar","email":"emil.cieslar@gmail.com","url":"http://emilc.cz"},"license":"MIT","bugs":{"url":"https://github.com/emilcieslar/chi-square-a-b-testing/issues"},"homepage":"https://github.com/emilcieslar/chi-square-a-b-testing#readme","gitHead":"721e5d41cfd667a360ea198dc56bd2c4167d3b04","_id":"chi-square-a-b-testing@0.0.1","_shasum":"4b352921c94046cb1e7766318cbe67b71e39c74d","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"emilcieslar","email":"cieslar@webkreativ.cz"},"dist":{"shasum":"4b352921c94046cb1e7766318cbe67b71e39c74d","tarball":"https://registry.npmjs.org/chi-square-a-b-testing/-/chi-square-a-b-testing-0.0.1.tgz","integrity":"sha512-5cKoK9L30GrGlTwp6W1QyUxMbONFDfjUYJFpcG/qHDQSXd7BPw4U/8VTwD78LH8nKFZa5jYn+64JguOcaJu+Pw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPfFifVOjjVa5FcyIqjIO8rsUAgnFpgpVi43vopPFxRwIhAJ6PK/+1z5jxBK1s7BLsGP3OtveRRyJGdHd1To2RrOT+"}]},"maintainers":[{"name":"emilcieslar","email":"cieslar@webkreativ.cz"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/chi-square-a-b-testing-0.0.1.tgz_1477558358901_0.5332334761042148"}}},"readme":"# Statistical significance for A/B testing (using chi-square)\n\nNpm module for calculating chi-square test that gives us p-value for statistical significance with practical use in A/B testing.\n\n## Installation\n\n    `npm install --save-dev chi-square-a-b-testing`\n\n## Usage\n\nLet's consider we have two ad variations - each variation has been displayed 50 times. The first ad was clicked 1, whereas the second ad was clicked 5 times. Is the difference statistically significant? Let's find out using chi-square test\n```\n* * * * * * * * * * *\n* SAMPLE | CLICKED  *\n* 50     | 1        * - ad variation 1\n* 50     | 5        * - ad variation 2\n* * * * * * * * * * *\n```\n\n```js\nvar test = require('chi-square-a-b-testing');\n\n// Set up our sample values\nconst table = [\n    [50, 1],\n    [50, 5]\n];\n\n// Calculate the p-value\nlet pValue = test(table); // 0.9078770365273039\n```\n\nIn this case the `pValue = 0.9078770365273039`, which means we **cannot** consider the difference between those two variations statistically significant if we set our threshold to 0.5 (which is usually the case for a standard experiment).\n\n## Acknowledgement\nThe JavaScript implementation of chi-square test was done by http://stats.theinfo.org/ ([Aaron Swartz](http://www.aaronsw.com/) and [Ben Wikler](https://twitter.com/benwikler))\n","maintainers":[{"name":"emilcieslar","email":"cieslar@webkreativ.cz"}],"time":{"modified":"2022-06-13T05:57:30.986Z","created":"2016-10-27T08:52:40.953Z","0.0.1":"2016-10-27T08:52:40.953Z"},"homepage":"https://github.com/emilcieslar/chi-square-a-b-testing#readme","keywords":["chi-square","statistical","significance","a/b","testing","p-value"],"repository":{"type":"git","url":"git+https://github.com/emilcieslar/chi-square-a-b-testing.git"},"author":{"name":"Emil Cieslar","email":"emil.cieslar@gmail.com","url":"http://emilc.cz"},"bugs":{"url":"https://github.com/emilcieslar/chi-square-a-b-testing/issues"},"license":"MIT","readmeFilename":"README.md"}