Previous Up Next

7.3.3  Producing random numbers with the binomial distribution: randbinomial

The command randbinomial will take parameters an integer n and a number p between 0 and 1, and return an integer from 0 to n chosen according to the binomial distribution; i.e., the number of successes you might get if you did an experiment n times, where the probability of success each time is p. If you enter

randbinomial(100,0.4)

for example, you might get

34

Previous Up Next