September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
9
Task/Statistics-Basic/Zkl/statistics-basic-2.zkl
Normal file
9
Task/Statistics-Basic/Zkl/statistics-basic-2.zkl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
reg ns;
|
||||
foreach n in (T(100,1000,10000)){
|
||||
ns=(0).pump(n,List,(0.0).random.fp(1.0));
|
||||
println("N:%,6d mean:%.5f std dev:%.5f".fmt(n,mean(ns),stdDev(ns)));
|
||||
}
|
||||
foreach r in ([0.0 .. 0.9, 0.1]){ // using the last data set (10000 randoms)
|
||||
n:=ns.filter('wrap(x){ r<=x<(r+0.1) }).len();
|
||||
println("%.2f..%.2f:%4d%s".fmt(r,r+0.1,n,"*"*(n/20)));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue