2 Discrete Probability Spaces

2.1 Bernoulli trials

Generating a sequence of Bernoulli trials of a given length and with a given probability parameter

 [1] H H H H H T H T H T

The number of heads in that sequence

[1] 7

2.2 Sampling without replacement

An urn with \(r\) red ball and \(b\) blue balls represented as a vector

 [1] R R R R R R R B B B B B B B B B B

Sampling uniformly at random without replacement from that urn a given number of times

[1] B R B B B