for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*
* (c) Ruben Dorado <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace SiteAnalyzer;
* class Statistics
* @package SiteAnalyzer
* @author Ruben Dorado <[email protected]>
* @copyright 2018 Ruben Dorado
* @license http://www.opensource.org/licenses/MIT The MIT License
class Statistics
{
/*
* @param
public static function ABtest($testCounts, $targetCounts)
$ntotal = 0;
$resp = [];
foreach($testCounts as $testCount) {
$ntotal += $testCount[1];
}
foreach ($targetCounts as $targetCount) {
if ($testCount[0] === $targetCount[1]) {
$resp[] = [$testCount[0], $testCount[1], $testCount[1]/$ntotal, $targetCount[2], $targetCount[2]/$testCount[1],$targetCount[2]/$ntotal];
return $resp;