Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
8
Task/Probabilistic-choice/R/probabilistic-choice-1.r
Normal file
8
Task/Probabilistic-choice/R/probabilistic-choice-1.r
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
prob = c(aleph=1/5, beth=1/6, gimel=1/7, daleth=1/8, he=1/9, waw=1/10, zayin=1/11, heth=1759/27720)
|
||||
# Note that R doesn't actually require the weights
|
||||
# vector for rmultinom to sum to 1.
|
||||
hebrew = c(rmultinom(1, 1e6, prob))
|
||||
d = data.frame(
|
||||
Requested = prob,
|
||||
Obtained = hebrew/sum(hebrew))
|
||||
print(d)
|
||||
2
Task/Probabilistic-choice/R/probabilistic-choice-2.r
Normal file
2
Task/Probabilistic-choice/R/probabilistic-choice-2.r
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
library(ggplot2)
|
||||
qplot(factor(names(prob), levels = names(prob)), hebrew, geom = "histogram")
|
||||
Loading…
Add table
Add a link
Reference in a new issue