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

Commit

Permalink
fix Mann-Whitney t-Values for two tailed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Apr 22, 2022
1 parent 7504462 commit fe8effe
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,26 @@

/**
* T-Distribution two-tailed critical values for 95% confidence.
* For more info see http://www.itl.nist.gov/div898/handbook/eda/section3/eda3672.htm.
* For more info see
* - https://www.cliffsnotes.com/study-guides/statistics/principles-of-testing/one-and-twotailed-tests
* - https://en.wikipedia.org/wiki/One-_and_two-tailed_tests
* - https://en.wikipedia.org/wiki/Student%27s_t-distribution
* - http://www.itl.nist.gov/div898/handbook/eda/section3/eda3672.htm (WARNING: the table listed there is for ONE-SIDED regions!)
*/
var tTable = {
'1': 12.706, '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, '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, '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,
'infinity': 1.96
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"infinity": 1.96
};

/**
Expand Down Expand Up @@ -875,9 +886,9 @@
try {
var result;
if (freeExports && freeRequire) {
/** Used to avoid inclusion in Browserified bundles. */
// eg: microtime
result = freeRequire(id);
/** Used to avoid inclusion in Browserified bundles. */
// eg: microtime
result = freeRequire(id);
}
} catch (e) { }
return result || null;
Expand Down

0 comments on commit fe8effe

Please sign in to comment.