Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Permutation-test/Zkl/permutation-test.zkl
Normal file
12
Task/Permutation-test/Zkl/permutation-test.zkl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
fcn permutationTest(a,b){
|
||||
ab := a.extend(b);
|
||||
tObs := a.sum(0);
|
||||
combs := Utils.Helpers.pickNFrom(a.len(),ab); // 92,378
|
||||
under := combs.reduce('wrap(sum,perm){ sum+(perm.sum(0) <= tObs) },0);
|
||||
100.0 * under / combs.len();
|
||||
}
|
||||
|
||||
treatmentGroup := T(85, 88, 75, 66, 25, 29, 83, 39, 97);
|
||||
controlGroup := T(68, 41, 10, 49, 16, 65, 32, 92, 28, 98);
|
||||
under := permutationTest(treatmentGroup, controlGroup);
|
||||
println("Under =%6.2f%%\nOver =%6.2f%%".fmt(under, 100.0 - under));
|
||||
Loading…
Add table
Add a link
Reference in a new issue