Skip to content

Instantly share code, notes, and snippets.

@cigrainger
Created October 11, 2016 15:28
Show Gist options
  • Select an option

  • Save cigrainger/a1c70fead82e3a9baf6c4059cb04db79 to your computer and use it in GitHub Desktop.

Select an option

Save cigrainger/a1c70fead82e3a9baf6c4059cb04db79 to your computer and use it in GitHub Desktop.
i <- seq(1, numberguesses)
result <- apply(i, function(x){
a = random(1,10000000)
b = random(a,10000001)
cond_exp <- CONEXP(a,b)
cond_exp <- cond_exp[cond_exp is within .1% of actual expected value]
return (cond_exp)
}
)
result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment