Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. m = 10^6 # iterations
  2. x = rgeom(m, 1/3)+1; y = rgeom(m, 1/3)+1 # independent counts of 'trials'
  3. mean(x == y)
  4. ## 0.200079 # Consistent with P(X = Y) = 1/5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement