diff --git a/webapp/source/statistics/mannWhitneyU.ts b/webapp/source/statistics/mannWhitneyU.ts index 41dc59e9..6fd28495 100644 --- a/webapp/source/statistics/mannWhitneyU.ts +++ b/webapp/source/statistics/mannWhitneyU.ts @@ -115,21 +115,21 @@ function test() { console.log("mannWhitneyU self diagnostic"); const result1 = mannWhitneyU([1, 2, 3], [1, 2, 4]); console.log("result1", result1); - // Result { u: 4, p: 0.4123703981236436 } + // Result { u: 4, p: 0.5 } // Values from: http://www.stat.purdue.edu/~tqin/system101/method/method_wilcoxon_rank_sum_sas.htm const result2 = mannWhitneyU([17, 20, 170, 315, 22, 190, 64], [22, 29, 13, 16, 15, 18, 15, 6]); console.log("result2", result2); - // Result { u: 6.5, p: 0.006380543605407185 } + // Result { u: 6.5, p: 0.007453528422421307 } // Values from: http://geographyfieldwork.com/Mann%20Whitney.htm const result3 = mannWhitneyU([7, 3, 6, 2, 4, 3, 5, 5], [3, 5, 6, 4, 6, 5, 7, 5]); console.log("result3", result3); - // result3 { u: 23, p: 0.16955853681823607 } + // result3 { u: 23, p: 0.18060905238025948 } // Useful for comparing, but off a bit for p: http://www.socscistatistics.com/tests/mannwhitney/default2.aspx } // test(); -export = mannWhitneyU; \ No newline at end of file +export = mannWhitneyU;