Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- y = rgamma(1000,2,1)
- x = runif(1000,0,y)
- par(mfrow=c(1,1))
- plot(x,y)
- mean(x<1 & y<2)
- mean(x<1 & y<0.5)
- sum(y < x^2)/1000
- mean(x)
- mean(y)
- cov(x,y)
- cor(x,y)
- mean(y-x)
- var(y-x)
- par(mfrow=c(1,2))
- plot(x,y, main="Theoretical")
- lines(y=x+1, x=x, col="red")
- plot(x,y, main="Lowess")
- lines(lowess(x,y),col="red")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement