SHARE
TWEET

Untitled

a guest Sep 16th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. trials <- 10000
  2. samples <- 6
  3. integerDist = 1:2
  4.  
  5. runOne <- function(ignored) {
  6.   df <- data.frame(
  7.     Algo = trunc((0:(2 * samples - 1)) / samples),
  8.     Value = sample(integerDist, 2 * samples, replace = TRUE) + runif(2 * samples, -1e-9, 1e-9)
  9.   )
  10.   anova(aov(Value ~ Algo, data=df))$'Pr(>F)'[1]
  11. }
  12.  
  13. results <- sapply(1:trials, runOne)
  14.  
  15. message(min(results) * trials)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top