Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: tracing/tracing/base/statistics.html

Issue 2089833002: Entry point for bisect sample comparison. (Closed) Base URL: https://github.com/catapult-project/catapult.git@mann
Patch Set: Closing low level file handle for temp file. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/bin/compare_samples ('k') | tracing/tracing/metrics/buildbot_output_for_compare_samples_test.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/statistics.html
diff --git a/tracing/tracing/base/statistics.html b/tracing/tracing/base/statistics.html
index 785daf9be87597d93fa7e79db75858bf9447a7a6..1e335adbeef94fbbb4dd31dceb88d7dacd539824 100644
--- a/tracing/tracing/base/statistics.html
+++ b/tracing/tracing/base/statistics.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
+Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
@@ -798,15 +798,21 @@ tr.exportTo('tr.b', function() {
};
// p-values less than this indicate statistical significance.
- Statistics.DEFAULT_ALPHA = 0.05;
+ Statistics.DEFAULT_ALPHA = 0.01;
+
+ // If a statistical significant difference has not been established with
+ // this many observations per sample, we'll assume none exists.
+ Statistics.MAX_SUGGESTED_SAMPLE_SIZE = 20;
/** @enum */
Statistics.Significance = {
- INSIGNIFICANT: -1,
- DONT_CARE: 0,
- SIGNIFICANT: 1
+ SIGNIFICANT: 'REJECT',
+ INSIGNIFICANT: 'FAIL_TO_REJECT',
+ NEED_MORE_DATA: 'NEED_MORE_DATA',
+ DONT_CARE: 'DONT_CARE',
};
+
/**
* @typedef {Object} HypothesisTestResult
* @property {number} p
@@ -818,14 +824,20 @@ tr.exportTo('tr.b', function() {
* @param {!Array.<number>} a
* @param {!Array.<number>} b
* @param {number=} opt_alpha
+ * @param {number=} opt_reqSampleSize
* @return {!HypothesisTestResult}
*/
- Statistics.mwu = function(a, b, opt_alpha) {
+ Statistics.mwu = function(a, b, opt_alpha, opt_reqSampleSize) {
var result = mannwhitneyu.test(a, b);
var alpha = opt_alpha || Statistics.DEFAULT_ALPHA;
- result.significance = (result.p < alpha) ?
- Statistics.Significance.SIGNIFICANT :
- Statistics.Significance.INSIGNIFICANT;
+ if (result.p < alpha) {
+ result.significance = Statistics.Significance.SIGNIFICANT;
+ } else if (opt_reqSampleSize && (a.length < opt_reqSampleSize ||
+ b.length < opt_reqSampleSize)) {
+ result.significance = Statistics.Significance.NEED_MORE_DATA;
+ } else {
+ result.significance = Statistics.Significance.INSIGNIFICANT;
+ }
return result;
};
« no previous file with comments | « tracing/bin/compare_samples ('k') | tracing/tracing/metrics/buildbot_output_for_compare_samples_test.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698