Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
pc()={
|
||||
my(v=[5544,10164,14124,17589,20669,23441,25961,27720],u=vector(8),e);
|
||||
for(i=1,1e6,
|
||||
my(r=random(27720));
|
||||
for(j=1,8,
|
||||
if(r<v[j], u[j]++; break)
|
||||
)
|
||||
);
|
||||
e=precision([1/5,1/6,1/7,1/8,1/9,1/10,1/11,1759/27720]*1e6,9); \\ truncate to 9 decimal places
|
||||
print("Totals: "u);
|
||||
print("Expected: "e);
|
||||
print("Diff: ",u-e);
|
||||
print("StDev: ",vector(8,i,sqrt(abs(u[i]-v[i])/e[i])));
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue