Contents
 • one choice • many choices: permutations • many choices: combinations • many choices: combinations • independent events • dependent events • permutations without repettitions • permutations with identical elements • combinations • coditional probabilities • and or events • two outcomes • total probability theorem • Bayes rule • union sets and probability • fundamental counting principle

 Other exercices

 Combinatorics - Probability
probability: two outcomes

Probability with two outcomes
Binomial theorem

Bernoulli experiment (binomial experiment)

Let's consider the following lottery books:
A is the event associated to "win a book", and B is the event associated to "not win a book"

P(A) = p
P(B) = 1 - p = q

The events A and B are mutually exlusive.(they cannot both exist at the same time). The lottery consists of 4 trials

1. There is ONE WAY to succeed (win) all of the four trials (four trials om the four trials):
P(to Succeed (win) all of the four trials) =
PS(4/4) = p x p x p x p = p4
ONE WAY = C(4,4) = 4!/4!0! = 1
PS(4/4) = p x p x p x p = p4
Then:
PS(4/4) = C(4,4) p4q0

2. There are C(3,4) = 4!/3!1! = 4 WAYS to succeed (win) three of the four trials:
1. [S,S,S,F] : p x p x p x q = p3q1
2. [S,S,F,S] : p x p x q x p = p3q1
3. [S,F,S,S] : p x q x p x p = p3q1
4. [F,S,S,S] : q x p x p x p = p3q1

Then:
P(3/4) = C(3,4)p3q1

3. There are C(2,4) = 4!/2!2! = 24/4 = 6 WAYS to succeed (win) two of the four trials:
1. [S,S,F,F] : p x p x q x q = p2q2
2. [S,F,S,F] : p x q x p x q = p2q2
3. [F,S,S,F] : q x p x p x q = p2q2
4. [S,F,F,S] : p x q x q x p = p2q2
5. [F,F,S,S] : q x q x p x p = p2q2
6. [F,S,F,S] : p x q x q x p = p2q2

Then:
P(2/4) = C(2,4)p2q2

4. There are C(1,4) = 4!/1!3! = 4 WAYS to succeed (win) one of the four trials:
1. [S,F,F,F] : p x p x q x q = p1q3
2. [F,S,F,F] : p x q x p x q = p1q3
3. [F,F,S,F] : q x p x p x q = p1q3
4. [F,F,F,S] : p x q x q x p = p1q3

Then:
P(1/4) = C(1,4)p1q3

5. There are C(0,4) = 4!/0!4! = 1 WAY to succeed (win) zero of the four trials:
1. [F,F,F,F] : q x q x q x q = q4

Then:
P(0/4) = C(0,4)p0q4
(= P(to Fail (lose) all of the four trials) = PF(4/4) = (1 - p)4)

The probability to win the lottery books is:
PS = PS(4/4) + P(3/4) + P(2/4) + P(1/4) + P(0/4) =
C(4,4) p4q0 + C(3,4) p3q1 + C(2,4) p2q2 + C(1,4) p1q3 + C(0,4) p0q4
= Σ C(i,4) piq(n - i) = (p + q)n = (p + 1 - p)n = 1.

### Example

What is the probability to win two books, the first at the second trial and the second at the last trial?
This is the sixth way of the third case :
"3.There are C(2,4) = 4!/2!2! = 24/4 = 6 WAYS to succeed (win) two of the four trials:
6. [F,S,F,S] : p x q x q x p = p2q2
"
P(2/4) = C(2,4)p2q2 = 6 x p2q2
If p = q = 1/2, then:
P(2/4) = 6 x (1/2)2(1/2)2 = 6 /16 = 3/8 = 37.5%.

C(m,n) = n!/m!(n - m)!

The ith term of the Newton's binomial is C(i,n) pi q(n - i)

p + q = 1: p for success, then 1 - p for failure

C(m.n) pm q(n- m) ways to succeed m times among n trials

Bernoulli experiment = binomial experiment: the events are mutually exlusive and independent

Newton's binomial:
(a + b)n = Σ C(m,n) pm q(n - m)
m: 0 → n

 Today: : ____________

calculator for combinatorics probability and Statistics