1 USING: kernel math math.functions math.statistics tools.test ;
2 IN: math.statistics.tests
4 [ 1 ] [ { 1 } mean ] unit-test
5 [ 3/2 ] [ { 1 2 } mean ] unit-test
6 [ 0 ] [ { 0 0 0 } geometric-mean ] unit-test
7 [ t ] [ { 2 2 2 2 } geometric-mean 2.0 .0001 ~ ] unit-test
8 [ 1.0 ] [ { 1 1 1 } geometric-mean ] unit-test
9 [ 1/3 ] [ { 1 1 1 } harmonic-mean ] unit-test
11 [ 0 ] [ { 1 } range ] unit-test
12 [ 89 ] [ { 1 2 30 90 } range ] unit-test
13 [ 2 ] [ { 1 2 3 } median ] unit-test
14 [ 5/2 ] [ { 1 2 3 4 } median ] unit-test
16 [ 1 ] [ { 1 2 3 } var ] unit-test
17 [ 1.0 ] [ { 1 2 3 } std ] unit-test
18 [ t ] [ { 1 2 3 4 } ste 0.6454972243679028 - .0001 < ] unit-test
20 [ t ] [ { 23.2 33.4 22.5 66.3 44.5 } std 18.1906 - .0001 < ] unit-test
22 [ 0 ] [ { 1 } var ] unit-test
23 [ 0.0 ] [ { 1 } std ] unit-test
24 [ 0.0 ] [ { 1 } ste ] unit-test