Bernoulli process

Problem

Consider a Bernoulli process with a probability of 0,9 and a length of 20. Specify an event with the probability given by

\[0{,}9^{20}+20\cdot0{,}1\cdot0{,}9^{19}\]

Solution

The probability of having exactly \(n\) hits in a Bernoulli process with probability \(p\) and length \(N\) equals

\[P(n) = \binom{N}{n}\cdot p^n\cdot (1-p)^{N-n}.\]

The probability specified in this problem therefore corresponds to the sum of the probabilities of having exactly 20 hits

\[\binom{20}{20}\cdot 0{,}9^{20}\cdot 0{,}1^0=0{,}9^{20}\]

and having exactly 19 hits

\[\binom{20}{19}\cdot 0{,}9^{19}\cdot 0{,}1^1=20\cdot 0{,}9^{19}\cdot 0{,}1.\]

In other words, the corresponding event consists in having at least 19 hits.

We will simulate the Bernoulli process by means of Sage and evaluate the probability of having at least 19 hits. Before doing so, we calculate the decimal value of the given probability.

Now, we determine the probability for finding a given number of hits based on 50000 repetitions of the Bernoulli process. Finally, we compare the probability \(p(E)\) of finding at least 19 hits with the exact result.

The result is close to the exact result. The difference arises from the finite number of realizations.