Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. plot(0, type="n",xlim=c(0,0.5),ylim=c(0,50))
  2. abline(v=1/6,lty=2,col=2)
  3. grid()
  4.  
  5. n_data=1e3
  6. for (p in c(1:5,10,15,20,25,50,100,250,500)){
  7. x=matrix(runif(n_data*p),ncol=p)
  8. all_dist=as.vector(dist(x))^2/p
  9. lines(density(all_dist))
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement