Probability of an event
Using built-in statistical functions (Discrete Univariate Distributions).
sampleBernoulli[p_, n_] := RandomVariate[BernoulliDistribution[p], n]
Then
sampleBernoulli[.7, 10]
(* {1, 0, 1, 0, 0, 0, 1, 1, 1, 1} *)
Hope this helps.
Clear[prob]
prob[p_, n : _Integer : 1] := RandomChoice[{p, 1 - p} -> {1, 0}, n]
Total[prob[0.21321312444, 10^5]]/10.^5.
(* 0.21322 *)