tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
17
Task/Probabilistic-choice/J/probabilistic-choice-1.j
Normal file
17
Task/Probabilistic-choice/J/probabilistic-choice-1.j
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
main=: verb define
|
||||
hdr=. ' target actual '
|
||||
lbls=. ; ,:&.> ;:'aleph beth gimel daleth he waw zayin heth'
|
||||
prtn=. +/\ pt=. (, 1-+/)1r1%5+i.7
|
||||
da=. prtn I. ?y # 0
|
||||
pa=. y%~ +/ da =/ i.8
|
||||
hdr, lbls,. 9j6 ": |: pt,:pa
|
||||
)
|
||||
|
||||
Note 'named abbreviations'
|
||||
hdr (header)
|
||||
lbls (labels)
|
||||
pt (target proportions)
|
||||
prtn (partitions corresponding to target proportions)
|
||||
da (distribution of actual values among partitions)
|
||||
pa (actual proportions)
|
||||
)
|
||||
10
Task/Probabilistic-choice/J/probabilistic-choice-2.j
Normal file
10
Task/Probabilistic-choice/J/probabilistic-choice-2.j
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
main 1e6
|
||||
target actual
|
||||
aleph 0.200000 0.200344
|
||||
beth 0.166667 0.166733
|
||||
gimel 0.142857 0.142611
|
||||
daleth 0.125000 0.124458
|
||||
he 0.111111 0.111455
|
||||
waw 0.100000 0.099751
|
||||
zayin 0.090909 0.091121
|
||||
heth 0.063456 0.063527
|
||||
5
Task/Probabilistic-choice/J/probabilistic-choice-3.j
Normal file
5
Task/Probabilistic-choice/J/probabilistic-choice-3.j
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
pt=. (, 1-+/)1r1%5+i.7
|
||||
pt
|
||||
1r5 1r6 1r7 1r8 1r9 1r10 1r11 1759r27720
|
||||
+/pt
|
||||
1
|
||||
Loading…
Add table
Add a link
Reference in a new issue