Simulate a sequence of fair coin tosses:
The probability of throwing a 6 on a six-sided die can be modeled as a Bernoulli distribution:
Simulate throwing a die, if you are only interested in sixes:
Out of 10 bulbs produced, one is defective. Simulate production of 100 bulbs:
Find the percentage of good bulbs:
Find the average number of good bulbs per batch of 100:
Find the probability that a randomly selected bulb is good:
A lottery sells 10 tickets for $1 per ticket. Each time there is only one winning ticket. A gambler has $5 to spend. Find his probability of winning if he buys 5 tickets in 5 different lotteries:
His probability of winning is greater if he buys 5 tickets in the same lottery:
Simulate a symmetric random walk with values -1 and 1:
In an optical communication system, transmitted light generates current at the receiver. The number of electrons follows the parametric mixture of Poisson distribution and another distribution, depending on the type of light. If the source uses coherent laser light of intensity

, then the electron count distribution is Poisson:
If the source uses thermal illumination, then the Poisson parameter follows
ExponentialDistribution with parameter

and the electron count distribution is:
These two distributions are distinguishable and allow the type of source to be determined: