SALES and MARKETING Department
MATHEMATICS
2 nd Semester
________ Combinatorics and probabilities ________
LESSONS
TABLE OF CONTENTS
INTRODUCTION AND HISTORY 3
LESSONS 5
1 Combinatorics: how to count 5
1.1 Reminders on sets 5
1.1.1 Notion of set 1.1.2 Operations on sets 1.1.3 Cardinal number of a set
1.2 Combinatorics 9
1.2.1 p-lists
1.2.2 Permutations: p-lists without repetition 1.2.3 Combinations
1.2.4 Combinations from a partition
1.2.5 Considering an exercise dealing with combinatorics
2 Probabilities 14
2.1 Random experiment and events 14
2.1.1 Random experiment 2.1.2 Events
2.1.3 Operations on events
2.2 Probability on a finite set 15
2.2.1 Simple probabilities 2.2.2 Conditional probabilities
2.3 Discrete probability distribution 16
2.3.1 Discrete random variable
2.3.2 Associated probability distribution
2.3.3 Measures of central tendency and dispersion 2.3.4 Joint distribution, marginal distributions
INTRODUCTION AND HISTORY
Probabilities are today regarded as one of the most advanced and prolific fields in mathematics. They offer a wide range of appliances and contributions, such as in:
• reading of surveys (sampling, prediction, statistical testing),
• calculation of chances and expected wins in gambling,
• game theory (strategies for a player, a fighter, a team…),
• chaos theory, meteorology, study of casualties, incidents, natural disasters,
• nuclear physics and quantum mechanics
Origins of the probability calculus
It is well known that, since the antiquity, gambling by random games hold a substantial part.
alea (Latin): the die; az-zahr (anc. Arabic): the die;
chance (anc.fr. chéance, from "choir", to fall): the roll of a die Though, the oldest written records known today, dealing with chance calculus or equitable distribution, only date from the early Renaissance and are due to the Italian mathematician Luca Pacioli, who, in his book Summa of arithmetica, geometrica, proportio et proportionalita published in 1494, introduces the famous problem of the equitable distribution of stakes (bets) in an uncompleted game.
Purpose of this historical case:
Two teams bet each 11 ducats in a game up in 60 points, but for some reason the game does not run to the end. At the time it is interrupted, the team #1 has
reached 50 points while the team #2 has 40 points. How shall we redistribute the 22 ducats between both teams, fairly?
Pacioli suggests that the ducats should be allocated in proportion to the number of points of each team.
Actually, this solution has no mathematical value and it will be criticized 60 years later by another Italian mathematician: Niccolo Tartaglia. The latter objects that, if a team had 50 points and the other 0, Pacioli would allow the whole 22 ducats to the first team, even though the second one would still have had the
possibility to win the game if not interrupted…
Later, Girolamo Cardano proposed to part the bets in inverse proportion to the number of points each team still needs for winning. Unfortunately, this solution, even if it seems fairer, can't be justified by any logical reasoning.
Finally, Blaise Pascal managed to solve this enigma, in the end of mail exchanges with the famous Pierre de Fermat.
He renewed Cardano's principle, simulating an additional part of the game.
* if team#2 wins this virtual part, then each team will get back 11 ducats;
* if team#1 does, then it wins the game and gets the 22 ducats. (in this game, a team is supposed to earn 10 points on winning a part)
Since occurrences of both events are considered equally likely (one chance out of two), we have to make the following decision: the first team (50 pts) wins 11 ducats plus the half of 11, so 16.5, and the other team wins 5.5 ducats.
The law of large numbers: the random has no memory
The first probability treaty is the fact of the Dutch mathematician, physicist and astronomer Christiaan Huygens: Tractatus of ratiociniis in aleae ludo (treaty on reasoning about dice game) published in 1657. He offers five problems to his readers, in relation to dice rolls, draws into jars and card draws. This treaty gathers thoughts on the famous mail exchange between Pascal and Fermat, and contains the origins of a new field in mathematics: the
probability theory. Huygens especially introduces the notion of expected value.
A more complete and newer treaty was published in 1713 by Jakob Bernoulli. He approaches and demonstrates what is called now the weak law of large numbers, on a heads or tails game (afterwards, this law has been named "Bernoulli's theorem" by the other mathematicians).
Let's consider an experiment whose outcomes are separated into two subsets: success or failure.
The probability of success is noted p (e.g. p = 30%). After having this experiment performed n times, let's say that k successes have occurred (0 ≤ k ≤ n).
Thus, Bernoulli's theorem states that the rate k/n approaches p, as n tends to infinity.
For instance, when rolling a die, your chances to get a 5 are 1 in 6 (approx. 16.7%).
This law asserts that if you roll the die many times, then there's a very high probability for the frequency of the outcome "5" to be close to 16.7% (e.g. between 16.6% and 16.8%); moreover, the more you will roll the die, the higher this probability will be.
Thus, Bernoulli was the first to compare and see a link between statistical frequencies (k/n) and a theoretical probability (p). He did nothing less than make probability and statistics meet!
He predicted that probabilities would be in the future an extremely powerful tool for statistical data analysis.
He also gathered in his treaty the results acquired earlier by Chinese and Indian mathematicians, and Leibniz' ones, concerning combinatorics problems. So, he enunciated and developed combinatorics (fr.:
dénombrements) as we know them today, and consequently created the "Bernoulli's law" (binomial law) - based on a sequence of successes and failures. This law deals with experiments in which outcomes are separated into successes and failures, identically repeated. It enables the calculation of the chances to get k successes after n attempts.
For instance: playing heads or tails, you decide to toss a coin a hundred times. Let’s imagine that “tail” came out the ten first times (which is unlikely, but not impossible). Your chances to get a “tail” the 11th time are still 1 in 2 (p = 0.5). Your coin didn't preserve the memory of what it has done before, so the next result is not a function of the previous one – there is independence. Plus, the binomial law allows you to calculate the probability to get, say, 3 tails and 5 heads after 8 attempts.
Measure the random…
Pierre Simon de Laplace wrote in 1795 a definition of the probability p(A) of an event A, attributing it to Pascal, as a rate:
p(A) = [number of outcomes that make A occur]
/ [total number of possible outcomes].
This historical definition is actually valid only if all outcomes are equally likely.
Discrete laws facing large numbers: the normal law
Laplace, after having developed Bernoulli's and Euler's works, built the most powerful tool for statistical data processing using probabilities: the Normal law… to be continued in next chapter.
LESSONS
1 Combinatorics: how to count
1.1 Reminders on sets
1.1.1 Notion of set
Set : collection of elements, often gathered according to a criterion.
Its elements must be written down inside curly brackets { }. e.g.:
Set of the even natural numbers that don’t exceed 10 : {2 ; 4 ; 6 ; 8 ; 10}
Set of the vowels in our alphabet: {a ; e ; i ; o ; u ; y}
Set of the rational numbers: {a/b, where a and b are two integers, and b is not zero}
Set of suits (colours) in a deck of playing cards: {spades; clubs; hearts; diamonds}
An object x inside a set E is an element of E. We note: x ∈ E.
Saying that a set A is a subset of E, is saying that a ∈ A ⇒ a ∈ E.
A is also named part of E, or we can say that A is included into E, and we note : A ⊆ E.
Reversed, we can say that E contains A, and we note: E ⊇ A.
The empty set is the one that has no element. It’s noted ∅.
The set of the parts of a set E is the one whose elements are every set included into E (including ∅ and E itself). It’s noted
P
(E).e.g.: E = {a ; b ; c}
P
(E) contains all the possible subsets of E:P
(E) ={
∅ ; {a} ; {b} ; {c} ; {a ; b} ; {a ; c} ; {b ; c} ; {a ; b ; c}}
.It’s been stated that if E contains n elements, then
P
(E) contains 2n elements.One representation : the Venn diagram
E A
B
1.1.2 Operations on sets
a. Complement of a subset
definition: Given a set E and a subset A of E,
the complement of A into E is the subset exclusively composed with all the elements of E that are not in A. We note it A.
e.g.: E = {a, b, c, d, e, f, g} and A = {a, d, e}; therefore, A = {b, c, f, g}
The complement can also be regarded as the contrary.
properties: in a set E, A = A ; E =∅ ; ∅= E
A second representation : the choice tree
Venn diagram : corresponding choice tree :
E
2 4 6
8 10 12 A
1 5 3 B
7 11 9
A : even integers between 1 and 12 ;
B : multiples of 3, between 1 and 12 ; Here, we decided to cut E in A and A E : integers from 1 to 12 ; A ⊂ E and B ⊂ E. building the tree's first level.
Then, inside both subsets, a second cut creates a second level for the tree.
Finally, the right side of the tree shows a partition of E into four separated subsets:
elements that are, or aren’t in A and that
are, or aren’t in B (just like in the Venn diagram).
b. Intersection and union of two sets
definition: The intersection of A and B is the set A∩B containing their common elements.
A B A AND B
x∈ ∩ ⇔ x∈ x∈
With the example above: A∩B = {6 ; 12}.
def.: A and B are said separated when A∩B =∅.
definition: The union of A and B is the set A∪B containing all their elements.
A B A OR B
x∈ ∪ ⇔ x∈ x∈
With the example above: A∪B = {2 ; 3 ; 4 ; 6 ; 8 ; 9 ; 10 ; 12}.
2;4;6;8;10;12
A
1;3;5;7;9;11
A
6;12
B
B
3;9 2;4;8;10B
1;5;7;11
B
definition: Given a set E, and n subsets of E : A1, A2, …, An. These subsets form a partition of E when :
* they are separated (« two by two » empty intersections)
* their union is E
e.g.: - the set of the even natural numbers and the one of the odd natural numbers form a partition of the set of the natural numbers (excluding 0);
- a deck of playing cards is partitioned in {diamonds}, {spades}, {hearts} and {clubs};
- in the choice tree (previous page), the four sets defined on the right side form a partition of E.
c. Properties of intersection, union and complements
* Intersection and union are commutative and associative:
( ) ( )
( ) ( )
∩ = ∩ ∩ ∩ = ∩ ∩
∪ = ∪ ∪ ∪ = ∪ ∪
A B B A ; A B C A B C
A B B A ; A B C A B C
* One is distributive onto the other (possibility to factor and to expand):
( ) ( ) ( ) ( ) ( ) ( )
∩ ∪ = ∩ ∪ ∩ ∪ ∩ = ∪ ∩ ∪
A B C A B A C ; A B C A B A C
* Special cases (A is a subset of E):
∩ = ∪ =
∩ = ∅ ∪ =
∩ = ∪ =
∩ ∅ = ∅ ∪ ∅ =
A A A ; A A A
A A ; A A E
A E A ; A E E
A ; A A
*
∩ ∩
A B and A B form a partition of A
Let’s take back the example of the choice tree above:
elements of A∩B : « even and multiples of 3 » : 6 and 12. A∩B = {6 ; 12},
elements of A∩B : « even and not multiples of 3 » : 2, 4, 8 and 10. A∩B = {2 ; 4 ; 8 ; 10},
∩
A B and A∩B are separated ; moreover, their union is A.
General proof (for their union) :
(
A∩ ∪ ∩ = ∩ ∪ = ∩ =B) (
A B)
A(
B B)
A E A.* Morgan’ laws: A∩ = ∪B A B and A∪ = ∩B A B
e.g. with the 2nd law: « to be outside the union of A with B » is « to be outside A and to be outside B »
1.1.3 Cardinal number of a set
definition: Given a numerable set E.
The cardinal number of E, Card(E), is the number of its elements.
e.g.: - Card({a, b, c, d, …, x, y, z}) = 26 - Card({2 ; 4 ; 6 ; 8 ; 10}) = 5 - Card(∅) = 0
- in the example of our choice tree, Card(A) = 6, Card(B) = 4, Card(A∩B) = 2, etc.
properties: Given a set E which cardinal number is n, and two subsets A and B of E:
( ) ( )
( ) ( ) ( )
( ) ( ) ( ) ( )
Card A Card A
Card A B Card A B Card A
Card A B Card A Card B Card A B
+ = n
∩ + ∩ =
∪ = + − ∩
Let’s take back the example of the choice tree:
1st formula: Card(A) = 6, Card(A) = 6 and Card(E) = 12
2nd formula: A∩B = {6 ; 12}, cardinal = 2, and A∩B = {2 ; 4 ; 8 ; 10}, cardinal = 4 ; secondly, A = {2 ; 4 ; 6 ; 8 ; 10 ; 12}, cardinal = 6.
3rd formula: A∪B = {2 ; 3 ; 4 ; 6 ; 8 ; 9 ; 10 ; 12}, cardinal = 8 ;
secondly, Card(A) + Card(B) – Card(A∩B ) = 6 + 4 – 2 = 8.
Explanation of the 3rd formula: Card(A) + Card(B) actually counts the common elements of A and B twice, hence we must subtract Card(A∩B ).
A third representation: the contingency table - Let’s take back the example of the choice tree:
Venn diagram: choice tree:
E
2 4 6
8 10 12 A
1 5 3 B
7 11 9
A : even numbers between 1 and 12 ; B : multiples of 3, between 1 and 12 ; E : integers from 1 to 12 ; A ⊂ E and B ⊂ E.
Here is a crossed array of the classified elements : in A or not, in B or not :
A A Inside are written down the cardinal
numbers of the corresponding intersections, the margin frequencies and the total.
B 2 2 4 = Card(B)
B 4 4 8 = Card(B)
6 = Card(A) 6 = Card(A) 12 = Card(E)
2;4;6;8;10;12
A
1;3;5;7;9;11
A
6;12
B
B
3;9 2;4;8;10B
1;5;7;11
B
1.2 Combinatorics
1.2.1
p-lists5 coins take place in a bag, numbered 1 to 5. Initial set: E = {1, 2, 3, 4, 5}.
We have to build a number with two figures, by taking two coins at random.
Rules: * coins are taken one after the other;
* the first coin is put again into the bag (and so can be chosen again) Question: How many numbers could be built ?
Comment 1: This case is quite simple, we can write the whole possible outcomes :
Each outcome is an ordered list of two figures, allowing repetition.
Ordered: 12 is not 21
Repetition allowed : 33 is a possible outcome
Comment 2: We can build a choice tree showing two levels:
The total number of outcomes is the number of paths in the tree: 5 × 5 = 5² = 25 Definition: Given a set E containing n elements. Card(E) = n.
A p-list of elements of E is an ordered list of p elements taken in E, in which the same element can be repeated (repetition is allowed).
Result: The total number of possible p-lists from a set of n elements is
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
, ; , ; , ; , ; , ; , ; , ; , ; , ; ,
, , , , ,
, ; , ; , ; , ; , ; , ; , ; , ; , ; ,
1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5
1 1 2 2 3 3 4 4 5 5
2 1 3 1 4 1 5 1 3 2 4 2 5 2 4 3 5 3 5 4
n
pthe outcomes are named p-lists
1
stfigure
1
2
3
4
5
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
2
ndfigure
1.2.2 Permutations: p-lists without repetition
a. Factorial of a natural numberDefinition: The factorial of a natural number n is the number n! = 1×2×3×…×n.
enter n enter n
key : OPTN key : MATH
screen item : PROB screen item: PRB
screen item : x! screen item: !
key : EXE key : ENTER
e.g.: 3 ! = 6 , 5 ! = 120 , 10 ! = 3 628 800 , 100 ! ≈ 9.3326×10157 convention: 0 ! = 1
b. Permutations
5 coins take place in a bag, numbered 1 to 5. Initial set: E = {1, 2, 3, 4, 5}.
We have to build a number with two figures, by taking two coins at random.
Rules: * coins are taken one after the other;
* the first coin isn’t put back into the bag (it can’t be chosen again) Question: How many numbers could be built?
Comment 1: This case is quite simple, we can write the whole possible outcomes:
Each outcome is an ordered list of two figures, forbidding repetition.
Ordered: 12 is not 21
No repetition: 33 is not a possible outcome
Comment 2: We can build a choice tree showing two levels:
1
2
3
4
5
2 3 4 5 1 3 4 5
1 2 4 5
1 2 3 5 1 2 3 4
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
, ; , ; , ; , ; , ; , ; , ; , ; , ; ,
, ; , ; , ; , ; , ; , ; , ; , ; , ; ,
1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5
2 1 3 1 4 1 5 1 3 2 4 2 5 2 4 3 5 3 5 4
outcomes are named permutations
Definition : Given a set E containing n elements. Card(E) = n.
A permutation of p elements of E is an ordered list of p different elements of E (repetition is not allowed).
Result : The total number of possible permutations of p elements taken from a set of n elements is :
( )
! Pnp n !
n p
= −
enter n enter n
key : OPTN key: MATH
screen item : PROB screen item: PRB or PROB
screen item: nPr screen item: nPr or Arrangement
enter p enter p
key: EXE key : ENTER
c.
Permutations, from a set, taking all its elementsHow many permutations can be made with all the p elements of a set?
Given E = {a, b, c}, let’s write down its permutations:
(a, b, c) (a, c, b) (b, a, c) (b, c, a) (c, a, b) (c, b, a) There are 6 possible permutations in the set E.
Let’s build a choice tree:
letter 1 letter 2 letter 3
b c
c b
a c
c a
a b
b a
Number of paths: 3 × 2 × 1 = 3! = 6
The number of permutations of a set of p elements is
p!
1.2.3 Combinations
5 coins take place in a bag, numbered 1 to 5. Initial set: E = {1, 2, 3, 4, 5}.
We have to take two coins, at random, at the same time (“simultaneously”).
Question: How many different draws are possible?
Comment 1: This case is quite simple, we can write the whole possible outcomes :
A combination of p elements is a set.
Comment 2: a choice tree wouldn’t help us here, since it would involve the idea of order.
{ } { } { } { } { } { } { } { } { } { }
1 2, ; 1 3, ; 1 4, ; 1 5, ; 2 3, ; 2 4, ; 2 5, ; 3 4, ; 3 5, ; 4 5,a b c
Comment 3: relationship between combinations and permutations Here are the 10 combinations:
We can see the two permutations of each one:
So, we’re looking at the list of the 20 permutations (tutorial 2).
The number of combinations of 2 elements taken among 5 is obtained by dividing the number of permutations (P52) by the number of permutations of 2 elements (2!).
Definition: Given a set E of n elements. Card(E) = n,
A combination of p elements of E is a set (no order) of p different elements of E (repetition is not allowed).
Result: The total number of possible combinations of p elements taken from a set of n elements is :
( )
!
! ! !
C P
p
p n
n
n
p p n p
= =
−
Calculator: same as permutations, except you have to choose « nCr » or « Combinaison ».
1.2.4 Combinations from a partition
Given a set E containing n elements, Card(E) = n, and a partition of E in k subsets: A1, A2, …, Ak. Example 1: a deck of 32 playing cards can be partitioned in 4 subsets :
A1 = {hearts}, A2 = {diamonds}, A3 = {spades}, A4 = {clubs}
Example 2: a group of persons can be partitioned in : A1 = {men} and A2 = {women}.
Notation: ni is the cardinal number of the set Ai.
∑
ni =n.Our aim is to count the number of combinations of p elements taken in E, that must contain exactly p1 elements of A1, p2 elements of A2, …, pk elements of Ak.
∑
pi= p.Thus, this number of combinations is: 1 2
...
1 2
C C C
kk
p
p p
n
×
n× ×
n{ } { } { } { } { } { } { } { } { } { } ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
, ; , ; , ; , ; , ; , ; , ; , ; , ; ,
, ; , ; , ; , ; , ; , ; , ; , ; , ; ,
, ; , ; , ; , ; , ; , ; , ; , ; , ; ,
1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5
1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5
2 1 3 1 4 1 5 1 3 2 4 2 5 2 4 3 5 3 5 4
1.2.5 Considering an exercise dealing with combinatorics
(in case E isn’t partitioned ; in case it is, see directly section 1.2.4)* What is the initial set E? Find its cardinal, n.
* What is the experiment? How many elements of E have to be taken: p.
* While building an outcome (drawing several elements), is repetition of an element of E allowed?
* Once an outcome is built, would it be the same if its elements were in a different order?
order no order
repetition
p -lists : n
pno repetition
permutations : P
np( n ! ) !
n p
= − ( )
!
! !
combinations : C
npn p n p
= −
Sometimes, an exercise doesn't clearly mention directions about the last two points.
Nevertheless, this exercise uses terms like:
"simultaneous", "at the same time", "successive draws with (or without) putting back", "throws" (of a coin),
“rolls” (of a die”), …
The table below provides information about it:
simultaneous successive
Draws
(some elements have to be taken from E)
e.g.: take 3 objects in a bag
combinations
putting back no putting back
p-lists permutations
Throws
(an object contains every elements of E ; it’s thrown several times)
e.g.: roll 3 dice
p-lists p-lists
2 Probabilities
2.1 Random experiment and events
2.1.1 Random experiment
* A random experiment is one for which any possible result is known, but the next result is unpredictable.
e.g.: rolling a die, final podium before a run starts, …
* An outcome is one of the possible results of a random experiment.
The outcomes are noted ei, « single event #i ».
experiment: rolling a die; outcomes: 1, 2, 3, 4, 5 and 6
* The sample space is the set Ω of all the possible outcomes of an experiment.
We note nthe total number of outcomes. Card(Ω) = n and Ω = {e1 ; e2 ; … ; ei ; … ; en}.
experiment: rolling a die; sample space: Ω = {1 ; 2 ; 3 ; 4 ; 5 ; 6} and Card(Ω) = 6.
* The reality is the outcome that has been realized once performed the experiment.
2.1.2 Events
* We name event any subset A of Ω. It can be defined according to criterions.
e.g.: roll of a die: A : "getting an even number" ; A = {2 ; 4 ; 6}
B : "getting at least 3" ; B = {3 ; 4 ; 5 ; 6}
C : "getting not more than 2" ; C = {1 ; 2}
* Saying that an event is realized, is saying that reality belongs to this event.
e.g.: a die has been thrown. It’s a 4. is A realized? yes is B realized? yes is C realized? no
* A single event only contains one outcome.
* the event Ω is certain, because it will always be realized.
* the event ∅ is impossible, because it will never be realized.
2.1.3 Operations on events
Any event we can define is a set, included in Ω. Thus, all the properties of sets can be applied on events (complement, intersection or union), that we met in section 1.1.
* The contrary of the event A is the event A , complement of A into Ω.
e.g.: roll of a die: contrary of A: A=
{
1 3 5; ;}
contrary of B: B={ }
1 2;* the event A∩B is the event "A and B". e.g.: roll of a die: A∩B= 4 6
{ }
;* the event A∪B is the event "A or B". e.g.: roll of a die: A∪B= 2 3 4 5 6
{
; ; ; ;}
* two events are said mutually exclusive when they cannot be realized at the same time.
That is to say: they have no common outcome, sets are separated : A∩ = ∅B . An event and its contrary are mutually exclusive ;
if two events are mutually exclusive, one is not necessarily the contrary of the other.
e.g.: roll of a die: are A and C mutually exclusive ? no, outcome 2 in common Imagine a new event, separated to C. D = {5 ; 6}
* Let’s recall some formulas of section 1.1 that will be useful later:
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( ) ( )
Card A Card A Card
Card A B Card A B Card A
+ = Ω
∩ + ∩ =
∪ = + − ∩
2.2 Probability on a finite set
2.2.1 Simple probabilities
definition: A probability is mathematically defined as a function p that, to any event A, sends a number p(A), observing two conditions :
* p(Ω) = 1
* p(A∪B) = p(A) + p(B) for any mutually exclusive events A and B.
This definition is sufficient to lead to all the following properties.
immediate consequences:
close to the formulas that have been recalled on previous page
understanding:
The probability of an event A is a measure of the chances it would occur as an experiment has to be performed. p(A) is a real number between 0 and 1, likelihood of an event in the following ways:
p(A) > p(B) means A is more likely to occur than B.
p(A) = p(B) means A and B are equally likely.
p(A) = 0 means A is impossible.
p(A) = 1 means A is certain.
Equally likely outcomes:
The definition above implies:
( ) { } ( )
1
p e p 1
n i i=
= Ω =
∑
. Therefore, in case the outcomes of Ω are equally likely to occur, p e( ) { }
i =1n for each i.roll of a die: p(1) = 1
6 , p(2) = 1
6 , p(3) = 1
6 , etc.
In this context, for each event A :
( ) ( )
( ) ( )
Card A Card A
p A =Card = n
Ω
roll of a die (A, B, C defined in page 14):
( )
=3p A 6 ; p B
( )
=46 ; p C
( )
=26
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
;
;
+ = + = + = + =
∩ + ∩ = + = = ∩ + ∩ = + = =
∪ = + − ∩ = + − =
3 3 4 2
p A p A 1 p B p B 1
6 6 6 6
2 1 3 1 2 3
p A B p A B p A p A C p A C p A
6 6 6 6 6 6
5 3 4 2 5
p A B et p A p B p A B
6 6 6 6 6
( ) ( ) ( ( ) )
( ) ( )
( ) ( ) ( )
( ) ( ) ( ) ( )
p 0 ; 0 p A 1 and remember p 1 p A p A 1
p A B p A B p A p A B p A p B p A B
∅ = ≤ ≤ Ω =
+ =
∩ + ∩ =
∪ = + − ∩
2.2.2 Conditional probabilities
Definition: Given a sample space Ω and an event A that is not impossible.
The probability of the event B, given that A is realized, is:
( ) ( ) ( )
A
p A B
p B
p A
= ∩
comment:
( ) ( )
( )
A
p A B
p B
p A
= ∩ implies p A
(
∩ =B) ( )
p A ×pA( )
B( ) ( )
( )
B
p A B
p A
p B
= ∩ implies p A
(
∩ =B) ( )
p B ×pB( )
AThus, there are two ways for calculating p(A∩B), and p A
( )
×pA( ) ( )
B =p B ×pB( )
A . Independent eventsDefinition: Two events A and B are independent when p A
(
∩ =B) ( ) ( )
p A ×p BThat is to say, using the definition of a conditional probability: pA
( ) ( )
B =p B =pA( )
BThe probability that B occurs is the same, given that A is realized or not, or even when we don’t know if A is realized or is going to be realized.
2.3 Discrete probability distribution
This section mentions a general purpose. Special cases will be studied in the next chapter.
2.3.1 Discrete random variable
A random experiment results in a sample space Ω = {e1, e2, …, ei, …, em}.
Here, Ω is partitioned in a certain number m of events Ai, which probabilities are pi.
Definition: A discrete random variable X is a function that, for each event Ai, sends a real number xi
(commonly named "gain").
As Ω is the set of all possible outcomes, X(Ω) is the set of the possible gains xi. X(Ω) = {x1, x2, …, xi, …, xm} (partition in m events)
2.3.2 Associated probability distribution
Definition: The probability distribution of X is the list of pairs (gain, probability) of each event, or, at least, the formula that has to be used to calculate all these probabilities.
2.3.3 Measures of central tendency and dispersion
Let’s have a closer look at the meaning of a probability:
Saying that the probability of an event A is 0.3 is saying that its chances to occur are 30% as an experiment is going to be performed once. "Ideally", on reproducing this experiment several times, the event A will be realized with a frequency of 30%.
It is found – and proved – that the greater the number of attempts is, the closer the realization frequency of an event is to its theoretical probability. (more precisely: the probability [that this frequency does not tend towards its associated probability] tends towards zero - this is called convergence in
probability). This result is called "weak law of large numbers". At each attempt, reality is purely random, but a large number of random attempts will show a reality that follows the rules of probabilities.
Under this chapter and the following, probabilities have to be regarded as "the most reliable estimates that can be" and will have to be used like events statistical frequencies.
Definition: the expected value (or expectation) of X is the number
( )
1
E
m i i i
X p x
=
=
∑
It is actually the predictable mean of X, a large scale expected mean.
This formula is very close to the statistical (realized) mean:
1 n
i i i
x f x
=
=
∑
The expected value is a linear operator: E(a.X) = a.E(X) et E(X + Y) = E(X) + E(Y).
For instance, if each gain is increased by a number g, then same for its expected value:
E(X + g) = E(X) + g Other formulas from statistics apply as well:
variance of X:
( )
2( ( ) )
2( )
2( )
21
V E E E
m i i i
X p x X X X
=
=
∑
− = − standard deviation: σ( )
X = V( )
XInterpretation of the expected value and of the standard deviation:
Let's take the example of a gamble game in which you can win €10 with a 30% probability or lose €5 with a 70% probability. The question that arises is: what prediction can you make about your cumulative gains and losses by playing a lot?
Expected value: the probabilities give an average estimate of the real possible earnings.
On a set of 100 tries, one expects to win 30 times 10 € and lose 70 times 5 €.
The cumulative gain will then be a loss of 50 €.
The weak law of large numbers allows us to say that we can expect to lose on average €50 every 100 games played, over a large number of games.
The expected value of our gain variable is:
( ) ( )
1
E 0.3 10 0.7 5 0.5
=
=
∑
m i i = × + × − = −i
X p x .
It gives us the same information, but talking about any player: on a large number of players, the average payout per game is –0.5 € AND when the number of games of a player becomes very large, his average payout tends towards –0.5 € per game.
Opposite: simulation of 137 games.
The lower graph shows the real evolution of the cumulated gains (in blue), compared to their theoretical evolution y = –0.5n (in red).
The upper graph shows the evolution of the real average gain (in blue), compared to the theoretical average gain (the expectation) y = –0.5 (in red).
number of games number of games
Standard deviation: probabilities give an average estimate of the variability of real earnings.
Over a large number of trials, the average variation in gain from one trial to the next will be close to the standard deviation from this table:
( ) ( )
2( )
2( ) ( )
V X =E X −E X ; σ X = V X ≈6,874€
It is assumed that the average variability of the cumulative gain over n games is: n×6.874 Therefore, a confidence interval of the cumulative gain over n games can be created:
Example 1: 95 , % n=100 : IX = − ± 50 1.96 10 6.874× × ≈ − 185 ; 85
After 100 games, 95% of the players (if there are many of them) will have a cumulative win in this interval. The gain of 2.5% of the players will be more than €85 and the loss of 2.5% of the players will be more than €185.
Example 2: 95 , % n=10000 : IX = − 5000±1.96 100 6.874× × ≈ − 6347 ; −3653
After 10,000 games, 95% of the players (if there are many of them) will have a cumulative win in this interval. The loss of 2.5% of the players will be more than 6347 € and the loss of 2.5% of the players will be less than 3653 €.
In terms of the variability of the average gain, we will have the same results... divided by n:
Confidence interval of the average gain over n games:
( ) ( ) ( )
E X E X
I X u
n σ
= ± ×
Example 1: 95 , % 100 : E
( )
0.50 1.96 6.874 1.85 ; 0.85 10
= = − ± × ≈ −
n I X
After 100 games, 95% of the players (if they are numerous) will have an average win (€/trial) in this interval. The average gain of 2.5% of the players will be higher than 0.85 €/trial and the average loss of 2.5% of the players will be higher than 1.85 €/trial.
Exemple 2 : 95 , % 10000 : E
( )
0.50 1.96 6.874 0.6347 ; 0.3653 100
= = − ± × ≈ −
n I X
After 10,000 games, 95% of the players (if there are many) will have an average win (€/trial) in this interval. The average loss of 2.5% of the players will be more than €0.6347 and the average loss of 2.5% of the players will be less than €0.3653.
evolution of the cumulated gains for each of 5 players evolution of their average gains
( ) ( )
X E
I = ×n X ± ×u n×σ X
2.3.4 Joint distribution, marginal distributions
Definition: Given a random experiment and its sample space Ω ; given two random variables X and Y such that X(Ω) = {x1, x2, …, xn} and Y(Ω) = {y1, y2, …, yp}.
The joint distribution of X and Y is the data p((X = xi)∩(Y = yj)) for each i (1 to n) and j (1 to p).
The marginal distribution of X is the data p(X = xi) for each i (1 to n).
The marginal distribution of Y is the data p(Y = yj) for each j (1 to p).
Definition: X and Y are said independent in case for each i (1 to n) and j (1 to p), p(X = xi)×p(Y = yj) = p((X = xi)∩p(Y = yj)).
We use to build a contingency table containing probabilities and not frequencies, in order to have an overview of both variables and their intersections. In the middle, the probabilities of intersections form what is called the joint distribution of X and Y; the last row contains the marginal distribution of one variable and the last column contains the marginal distribution of the other.