a guest Jun 26th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- set.seed(412) # for reproducibility
- m = 10^6
- t = rnorm(m, 30, sqrt(10))
- s = rnorm(m, 20, sqrt(5))
- d = t - s
- mean(d); var(d)
-  9.99688 # aprx E(D) = 10
-  15.00828 # aprx Var(D) = 15
- mean(d > 0); mean(t > s)
-  0.995112 # aprx P(D > 0) = ??
-  0.995112 # another method for same
RAW Paste Data