Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit fe8effe

Browse files
committed
fix Mann-Whitney t-Values for two tailed tests
bestiejs#194
1 parent 7504462 commit fe8effe

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

benchmark.js

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,26 @@
6464

6565
/**
6666
* T-Distribution two-tailed critical values for 95% confidence.
67-
* For more info see http://www.itl.nist.gov/div898/handbook/eda/section3/eda3672.htm.
67+
* For more info see
68+
* - https://www.cliffsnotes.com/study-guides/statistics/principles-of-testing/one-and-twotailed-tests
69+
* - https://en.wikipedia.org/wiki/One-_and_two-tailed_tests
70+
* - https://en.wikipedia.org/wiki/Student%27s_t-distribution
71+
* - http://www.itl.nist.gov/div898/handbook/eda/section3/eda3672.htm (WARNING: the table listed there is for ONE-SIDED regions!)
6872
*/
6973
var tTable = {
70-
'1': 12.706, '2': 4.303, '3': 3.182, '4': 2.776, '5': 2.571, '6': 2.447,
71-
'7': 2.365, '8': 2.306, '9': 2.262, '10': 2.228, '11': 2.201, '12': 2.179,
72-
'13': 2.16, '14': 2.145, '15': 2.131, '16': 2.12, '17': 2.11, '18': 2.101,
73-
'19': 2.093, '20': 2.086, '21': 2.08, '22': 2.074, '23': 2.069, '24': 2.064,
74-
'25': 2.06, '26': 2.056, '27': 2.052, '28': 2.048, '29': 2.045, '30': 2.042,
75-
'infinity': 1.96
74+
"1": 12.71, "2": 4.303, "3": 3.182, "4": 2.776, "5": 2.571, "6": 2.447, "7": 2.365, "8": 2.306, "9": 2.262, "10": 2.228,
75+
"11": 2.201, "12": 2.179, "13": 2.16, "14": 2.145, "15": 2.131, "16": 2.12, "17": 2.11, "18": 2.101, "19": 2.093, "20": 2.086,
76+
"21": 2.08, "22": 2.074, "23": 2.069, "24": 2.064, "25": 2.06, "26": 2.056, "27": 2.052, "28": 2.048, "29": 2.045, "30": 2.042,
77+
"31": 2.0399, "32": 2.0378, "33": 2.0357, "34": 2.0336, "35": 2.0315, "36": 2.0294, "37": 2.0273, "38": 2.0252, "39": 2.0231, "40": 2.021,
78+
"41": 2.0198, "42": 2.0186, "43": 2.0174, "44": 2.0162, "45": 2.015, "46": 2.0138, "47": 2.0126, "48": 2.0114, "49": 2.0102, "50": 2.009,
79+
"51": 2.0081, "52": 2.0072, "53": 2.0063, "54": 2.0054, "55": 2.0045, "56": 2.0036, "57": 2.0027, "58": 2.0018, "59": 2.0009, "60": 2,
80+
"61": 1.9995, "62": 1.999, "63": 1.9985, "64": 1.998, "65": 1.9975, "66": 1.997, "67": 1.9965, "68": 1.996, "69": 1.9955, "70": 1.995,
81+
"71": 1.9945, "72": 1.994, "73": 1.9935, "74": 1.993, "75": 1.9925, "76": 1.9920, "77": 1.9915, "78": 1.991, "79": 1.9905, "80": 1.99,
82+
"81": 1.9897, "82": 1.9894, "83": 1.9891, "84": 1.9888, "85": 1.9885, "86": 1.9882, "87": 1.9879, "88": 1.9876, "89": 1.9873, "90": 1.987,
83+
"91": 1.9867, "92": 1.9864, "93": 1.9861, "94": 1.9858, "95": 1.9855, "96": 1.9852, "97": 1.9849, "98": 1.9846, "99": 1.9843, "100": 1.984,
84+
"101": 1.9838, "102": 1.9836, "103": 1.9834, "104": 1.9832, "105": 1.983, "106": 1.9828, "107": 1.9826, "108": 1.9824, "109": 1.9822, "110": 1.982,
85+
"111": 1.9818, "112": 1.9816, "113": 1.9814, "114": 1.9812, "115": 1.9819, "116": 1.9808, "117": 1.9806, "118": 1.9804, "119": 1.9802, "120": 1.98,
86+
"infinity": 1.96
7687
};
7788

7889
/**
@@ -875,9 +886,9 @@
875886
try {
876887
var result;
877888
if (freeExports && freeRequire) {
878-
/** Used to avoid inclusion in Browserified bundles. */
879-
// eg: microtime
880-
result = freeRequire(id);
889+
/** Used to avoid inclusion in Browserified bundles. */
890+
// eg: microtime
891+
result = freeRequire(id);
881892
}
882893
} catch (e) { }
883894
return result || null;

0 commit comments

Comments
 (0)