Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trials <- 10000
- samples <- 6
- integerDist = 1:2
- runOne <- function(ignored) {
- df <- data.frame(
- Algo = trunc((0:(2 * samples - 1)) / samples),
- Value = sample(integerDist, 2 * samples, replace = TRUE) + runif(2 * samples, -1e-9, 1e-9)
- )
- anova(aov(Value ~ Algo, data=df))$'Pr(>F)'[1]
- }
- results <- sapply(1:trials, runOne)
- message(min(results) * trials)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement