2017 © Pedro Peláez
 

library split-test-analyzer

Bayesian probability calculator for split testing / AB testing.

image

bentools/split-test-analyzer

Bayesian probability calculator for split testing / AB testing.

  • Friday, December 1, 2017
  • by bpolaszek
  • Repository
  • 1 Watchers
  • 0 Stars
  • 448 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 531 % Grown

The README.md

Latest Stable Version License Build Status Coverage Status Quality Score Total Downloads, (*1)

Split Test Analyzer

This PHP tool will help you compute, for different versions of a split test, their probability to be the best one., (*2)

It is a PHP port of the JS tool used on AB split test graphical Bayesian calculator., (*3)

Concept

A Variation object is composed of 3 informations:, (*4)

  • A key to identify it (the Landing page / banner id for instance)
  • The total number of actions (let's say, the unique visitors)
  • The number of successful actions (let's say, the conversions)

Now you can compare those 3 objects and compute their probability to be the best., (*5)

Usage

use BenTools\SplitTestAnalyzer\SplitTestAnalyzer;
use BenTools\SplitTestAnalyzer\Variation;

require_once __DIR__ . '/vendor/autoload.php';

$variations = [
    new Variation('LP #1', 8686347, 932),
    new Variation('LP #2', 7305026, 804),
    new Variation('LP #3', 4592639, 371),
    new Variation('LP #4', 4590186, 402),
    new Variation('LP #5', 4532325, 470),
    new Variation('LP #6', 4531653, 494),
];

$predictor = SplitTestAnalyzer::create()->withVariations(...$variations);
foreach ($predictor->getResult() as $key => $value) {
    printf('%s has %d%% chances to be the best one.' . PHP_EOL, $key, $value);
}

print PHP_EOL;

printf('The best one is: %s', $predictor->getBestVariation());

Output:, (*6)

LP #1 has 15% chances to be the best one.
LP #2 has 43% chances to be the best one.
LP #3 has 0% chances to be the best one.
LP #4 has 0% chances to be the best one.
LP #5 has 7% chances to be the best one.
LP #6 has 34% chances to be the best one.

The best one is: LP #2

Because of the randomness used in Bayes calculator, results may slightly vary., (*7)

To improve performance you can lower the amount of samples with SplitTestAnalyzer::create(100), but then you'll have to choose between performance and reliability., (*8)

Installation

This library requires PHP 7.0+., (*9)

composer require bentools/split-test-analyzer, (*10)

Tests

./vendor/bin/phpunit, (*11)

See also

bentools/cartesian-product, (*12)

bentools/pager, (*13)

The Versions

01/12 2017

dev-master

9999999-dev

Bayesian probability calculator for split testing / AB testing.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

analyzer ab testing ab test split testing bayes bayesian split test bayesian probability bayesian probabilities

01/12 2017

1.1

1.1.0.0

Bayesian probability calculator for split testing / AB testing.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

analyzer ab testing ab test split testing bayes bayesian split test bayesian probability bayesian probabilities

20/10 2017

1.0.1

1.0.1.0

Bayesian probability calculator for split testing / AB testing.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

analyzer ab testing ab test split testing bayes bayesian split test bayesian probability bayesian probabilities

28/08 2017

1.0

1.0.0.0

Bayesian probability calculator for split testing / AB testing.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

analyzer ab testing ab test split testing bayes bayesian split test bayesian probability bayesian probabilities