• Home
  • About R Trix
  • Teaching Resources
  • RTricks Library
  • Interactive Apps
  • Training Network
RTFR landingdist

R Code for Discrete Probability Example 4

dbinom(0:3,4,13/52) # with replacement
(39/52)*(38/51)*(37/50)*(36/49) # P(X=0) without replacement
choose(4,1)*(13/52)*(39/51)*(38/50)*(37/49) # P(X=1) without replacement
choose(4,2)*(13/52)*(12/51)*(39/50)*(38/49) # P(X=2) without replacement
choose(4,3)*(13/52)*(12/51)*(11/50)*(39/49) # P(X=3) without replacement