Bernoulli trials

Independent repetitions of an experiment with only two mutually exclusive outcomes (success and failure, say) such that at every trial the probabilities of success and failure do not change are Bernoulli trials.  For example, heads/tails success/failure, male/female, working/broken, higher than 2m/lower than 2m, greater than 6/smaller than 6, sold/unsold, healthy/sick are all Bernoulli trials, if independence and probability stability are satisfied.  Note that f p is the probability of success in one trial, then q=1-p that of failure.   Then,

Pr(exactly k successes in n trials)= (nk) pk qn-k ,                     (1)

where (nk) is a binomial coefficient, so that

(nk) = n!/{k!(n-k)!}.                                                                (2)

If you are unfamiliar with the symbol n! (factorial n), do not fret.  By definition,

n!= n(n-1)....1,                                                                        (3)

and

0!=1.                                                                                       (4)

For example,

4!=4x3x2x1=24.

We should also note that (nn) = n!/(n! 0!) = 1.  (This is where setting 0!=1 becomes useful).  

When (1) holds, Pr(success) has a binomial distribution.

Example

A fair coin is flipped 8 times.  What's the probability of getting 2 heads?  Since Pr(H)=Pr(T)=1/2 by applying (1), we obtain

(82) (1/2)2 (1/2)6  = {8!/(2! 6!)}(1/2)8 = 28/256.

Example

What's the probability that a 6-figure number contains two 1's?  We may think of the 6-figure number in terms of 6 figure-slots containing either 1 (success) or a different number (failure).  Since every figure-slot is filled independently of the others and the probabilities remain constant, we have Bernoulli trials.  Since p=1/10 and q=9/10,

Pr(two 1's) = (62) (1/10)2(9/10)4 = 15(94/106), which is roughly 1/10.

Example

What's the probability that n trials will result in no successes if Pr(success)=p?  Applying (1) we obtain

Pr(no successes) = (n0)p0qn.  Keeping in mind that n0=1, we obtain

Pr(no successes) = 1x1xqn = qn , as it should be.  Note that Pr(at least one success) = 1- Pr(no successes) = 1- qn

Example

The probability of a cow contracting a certain disease is 1/4.  A vaccine is administered to 10 cows, 9 of which stay healthy.  Is the vaccine a success?  By (1),

Pr(9 cows stay healthy) = (109)(3/4)9 = 196830/1048576 = .187

So, the probability that 9 cows stay healthy out of chance is about 20%; at a minimum, the vaccine should be seriously tested.