RosettaCodeData/Task/Permutation-test/Ursala/permutation-test.ursala

17 lines
445 B
Plaintext

#import std
#import nat
#import flo
treatment_group = <85,88,75,66,25,29,83,39,97>
control_group = <68,41,10,49,16,65,32,92,28,98>
f = # returns the fractions of alternative mean differences above and below the actual
float~*; -+
vid^~G(plus,~&)+ (not fleq@rlX)*|@htX; ~~ float+ length,
minus*+ mean^~*C/~& ^DrlrjXS(~&l,choices)^/-- length@l+-
#show+
t = --* *-'%'@lrNCC printf/$'%0.2f' times/$100. f(treatment_group,control_group)