This preview shows page 1. Sign up to view the full content.
Unformatted text preview: u2=runif(1) x=2*u1-1 y=2*u2-1 z[i]=x^2+y^2 } return(length(z[z<=1])/length(z)) }...
View Full Document
This note was uploaded on 11/16/2010 for the course STAT 340 taught by Professor Xu(sunny)wang during the Spring '09 term at Waterloo.
- Spring '09