1.1.1 • Published 9 years ago

split-test-result v1.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

split-test-result

Install

npm install split-test-result

Usage

var getSplitTestResult = require('split-test-result');
var variations = [
  {
    id: 1,
    stats: { impressions: 100, conversions: 10 }
  },
  {
    id: 2,
    stats: { impressions: 200, conversions: 50 }
  },
  {
    id: 3,
    stats: { impressions: 150, conversions: 3 }
  }
];

console.log(getSplitTestResult(variations));

// Output:
// {
//   distinctWinner: {
//     id: 2,
//     stats: { impressions: 200, conversions: 50 }
//   },
//   losers: [
//     {
//       id: 1,
//       stats: { impressions: 100, conversions: 10 }
//     },
//     {
//       id: 3,
//       stats: { impressions: 150, conversions: 3 }
//     }]
// }

About

Using abbajs to calculate results of a/b test experiment. The version with highest conversion rate is the baseline which the other variations are compared against. Any variation with a p-value less than 0.05 is a loser and if all the variations are losers the baseline is the distinctWinner.

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago