n = 1000; x = runif(n, 0, 1); y = runif(n, 0, 1) mean(y < x^3) library(repr) options(repr.plot.width=10, repr.plot.height=4) xx = seq(0,1,length.out=100) plot(x,y, col=1 + (y