I want to simulate rolling a normal die 10000 times to demonstrate the Law of Large Numbers.
Is there a difference between using R to roll a die 10000 times and using R to replicate a single roll 10000 times? Which of the following codes would be more correct...or more intuitive?
d=c("H","T")
table(sample(d,10000,replace=TRUE)
vs.
d=c("H","T")
table(replicate(10000,sample(d,1)))