Advertisement
Guest User

Untitled

a guest
Dec 27th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. set.seed(1447)
  2. stunif_d <- function(N=10000000){
  3. U1 <- runif(N)
  4. U2 <- runif(N)
  5. U3 <- runif(N)
  6. return(sqrt(U1) + sqrt(U2) +sqrt(U3))
  7. }
  8.  
  9.  
  10. U <- stunif_d(100000000)
  11. mean(U[U>=0.8])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement