# NOT RUN {
# p=0.6, independence
cr10.6 <- crossrunbin(nmax=10, prob=0.6, printn=TRUE)
cra10.6 <- crossrunauto(nmax=10, prob=0.6, changeprob=.6, printn=TRUE)
Rmpfr::asNumeric(cr10.6$pt[[10]])
Rmpfr::asNumeric(cr10.6$pt[[10]])
Rmpfr::asNumeric(cr10.6$pt[[10]]) - Rmpfr::asNumeric(cra10.6$pt[[10]]) # equal
# p=0.6, some dependence
cr10.6 <- crossrunbin(nmax=10, prob=0.6, printn=TRUE)
cra10.6.u.5 <- crossrunauto(nmax=10, prob=0.6, changeprob=.5, printn=TRUE)
round(Rmpfr::asNumeric(cr10.6$pt[[10]]),1)
round(Rmpfr::asNumeric(cra10.6.u.5$pt[[10]]),1) # not the same
# }
Run the code above in your browser using DataLab