Skip to content

micnews/split-test-result

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published