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