Chapter 1
Elements of
Probability Theory and Calculus
Dr Khalil Amine
kh.amine.sbai@gmail.com
2024 / 2025
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 1 / 67
Introduction to Probability
1. Introduction to Probability
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 2 / 67
Introduction to Probability
Introduction to Probability
Probability theory focuses on the study of
phenomena characterised by chance and
uncertainty.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 3 / 67
Introduction to Probability
Introduction to Probability
Probability theory focuses on the study of
phenomena characterised by chance and
uncertainty.
Quantifying uncertainty: Probability describe the
likelihood of an event occurrence, that is how
likely something is to happen.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 3 / 67
Introduction to Probability
Introduction to Probability
Probability theory focuses on the study of
phenomena characterised by chance and
uncertainty.
Quantifying uncertainty: Probability describe the
likelihood of an event occurrence, that is how
likely something is to happen.
Probability calculation enables a numerical
modelling of the frequency of occurrence of a
random event.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 3 / 67
Introduction to Probability
Introduction to Probability
Random vs Deterministic
Heating water to 100 degree Celsius at standard
pressure results in it boiling.
Flipping a coin results in either heads or tails.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 4 / 67
Introduction to Probability
Introduction to Probability
Random vs Deterministic
In deterministic scenarios / processes, the
outcome is fully predictable; it happens for sure.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 5 / 67
Introduction to Probability
Introduction to Probability
Random vs Deterministic
In deterministic scenarios / processes, the
outcome is fully predictable; it happens for sure.
In random scenarios / processes, the outcome is
uncertain but has a calculable likelihood.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 5 / 67
Introduction to Probability
Introduction to Probability
Use of Probabilities for Decision-Making in
Uncertain Contexts
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 6 / 67
Introduction to Probability
Introduction to Probability
Use of Probabilities for Decision-Making in
Uncertain Contexts
Probabilities are key tools for making decisions when
the outcomes are not certain.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 6 / 67
Introduction to Probability
Introduction to Probability
Use of Probabilities for Decision-Making in
Uncertain Contexts
Probabilities are key tools for making decisions when
the outcomes are not certain.
For example, if a particular treatment has a 90%
success rate, while another has a 70% success rate but
fewer side effects, the doctor would weigh these
probabilities when deciding on the best course of
action.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 6 / 67
Introduction to Probability
Introduction to Probability
Three approaches to calculate probability
A priori probability: Also known as classical
probability, this is the probability calculated
when the process is fully understood, and all
possible outcomes are known. It is based on what
theoretically should happen.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 7 / 67
Introduction to Probability
Introduction to Probability
Three approaches to calculate probability
A priori probability: Also known as classical
probability, this is the probability calculated
when the process is fully understood, and all
possible outcomes are known. It is based on what
theoretically should happen.
Observed probability: Also known as
estimated probability or empirical
probability, this is the probability calculated
when the process is not fully known, and it is
based on observed outcomes.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 7 / 67
Introduction to Probability
Introduction to Probability
Three approaches to calculate probability
Subjective probability: This is an educated
guess about the likelihood of an outcome when
there is a lack of data or detailed knowledge of
the process.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 8 / 67
Introduction to Probability
Introduction to Probability
Exercise:
Discuss the appropriate approach to calculate the
following probabilities.
1. What is the probability that a surgery performed
by a doctor in their clinic will be successful?
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 9 / 67
Introduction to Probability
Introduction to Probability
Exercise:
Discuss the appropriate approach to calculate the
following probabilities.
1. What is the probability that a surgery performed
by a doctor in their clinic will be successful?
2. What is the probability of successfully serving for
a tennis player who failed 340 serves out of 500
during their playing career?
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 9 / 67
Introduction to Probability
Introduction to Probability
Exercise:
Discuss the appropriate approach to calculate the
following probabilities.
1. What is the probability that a surgery performed
by a doctor in their clinic will be successful?
2. What is the probability of successfully serving for
a tennis player who failed 340 serves out of 500
during their playing career?
3. What is the probability to get the number 5 after
rolling a dice?
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 9 / 67
Element of Combinatorial Analysis
2. Element of Combinatorial
Analysis
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 10 / 67
Element of Combinatorial Analysis
Element of Combinatorial Analysis
Combinatorial analysis or counting is the
process of determining the number of elements of
a finite set of objects of large cardinality.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 11 / 67
Element of Combinatorial Analysis
Element of Combinatorial Analysis
Combinatorial analysis or counting is the
process of determining the number of elements of
a finite set of objects of large cardinality.
Combinatorial analysis provides useful methods
for calculating the probability of equiprobable
outcomes.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 11 / 67
Element of Combinatorial Analysis
Element of Combinatorial Analysis
Combinatorial analysis or counting is the
process of determining the number of elements of
a finite set of objects of large cardinality.
Combinatorial analysis provides useful methods
for calculating the probability of equiprobable
outcomes.
Three cases of counting: arrangements,
permutations, and combinations.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 11 / 67
Element of Combinatorial Analysis Arrangements
Element of Combinatorial Analysis
Definition
An arrangement of p distinct elements from n
elements is the selection of p elements, arranged in a
certain order from the n elements.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 12 / 67
Element of Combinatorial Analysis Arrangements
Element of Combinatorial Analysis
In an arrangement without repetition, the p objects in
the list are all distinct. This corresponds to a draw
without replacement, where the order matters.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 13 / 67
Element of Combinatorial Analysis Arrangements
Element of Combinatorial Analysis
In an arrangement without repetition, the p objects in
the list are all distinct. This corresponds to a draw
without replacement, where the order matters.
Proposition: Arrangement without repetition
The number of possible arrangements without
repetition of p distinct elements from n elements,
denoted by Apn , is given by:
n!
Apn = n(n − 1)(n − 2) . . . (n − p + 1) =
(n − p)!
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 13 / 67
Element of Combinatorial Analysis Arrangements
Element of Combinatorial Analysis
In an arrangement without repetition, the p objects in
the list are all distinct. This corresponds to a draw
without replacement, where the order matters.
Proposition: Arrangement without repetition
The number of possible arrangements without
repetition of p distinct elements from n elements,
denoted by Apn , is given by:
n!
Apn = n(n − 1)(n − 2) . . . (n − p + 1) =
(n − p)!
The number of different four-digit codes that can be
constructed with {1, 2, 3, 4, 5, 6, 7} is A47 = 840.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 13 / 67
Element of Combinatorial Analysis Arrangements
Element of Combinatorial Analysis
In the case of an arrangement with repetition, the p
objects in the list are not necessarily all distinct. This
corresponds to a draw with replacement, where the
order matters.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 14 / 67
Element of Combinatorial Analysis Arrangements
Element of Combinatorial Analysis
In the case of an arrangement with repetition, the p
objects in the list are not necessarily all distinct. This
corresponds to a draw with replacement, where the
order matters.
Proposition: Arrangement with repetition
The number of possible arrangements with repetition
of p distinct elements from n elements is equal to n p .
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 14 / 67
Element of Combinatorial Analysis Arrangements
Element of Combinatorial Analysis
In the case of an arrangement with repetition, the p
objects in the list are not necessarily all distinct. This
corresponds to a draw with replacement, where the
order matters.
Proposition: Arrangement with repetition
The number of possible arrangements with repetition
of p distinct elements from n elements is equal to n p .
Example:
The number of different four-digit codes that can be
constructed with {1, 2, 3, 4, 5, 6, 7} without restrictions
on repetition is equal to 74 = 2401.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 14 / 67
Element of Combinatorial Analysis Permutations
Element of Combinatorial Analysis
Definition
A permutation of n distinct elements, arranged in a
certain order, corresponds to a change in the order of
succession of these n elements.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 15 / 67
Element of Combinatorial Analysis Permutations
Element of Combinatorial Analysis
Proposition
The number of permutations without repetition of n
elements is equal to n!.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 16 / 67
Element of Combinatorial Analysis Permutations
Element of Combinatorial Analysis
Proposition
The number of permutations without repetition of n
elements is equal to n!.
Example:
The number of possible five-letter words is equal to
5! = 120.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 16 / 67
Element of Combinatorial Analysis Permutations
Element of Combinatorial Analysis
Permutations with repetition of objects are the
various ordered groupings of all these objects, some of
which are repeated. For example, 112, 121, and 211
for two digits 1 and one digit 2.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 17 / 67
Element of Combinatorial Analysis Permutations
Element of Combinatorial Analysis
Permutations with repetition of objects are the
various ordered groupings of all these objects, some of
which are repeated. For example, 112, 121, and 211
for two digits 1 and one digit 2.
Definition: Permutation with repetition
A permutation with repetition of n objects, not all
distinct, is an ordered sequence of n objects in p
(p < n) distinct classes, where class k contains nk
identical objects, 1 ≤ k ≤ p, with
n1 + n2 + ... + np = n.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 17 / 67
Element of Combinatorial Analysis Permutations
Element of Combinatorial Analysis
Proposition
The number of possible permutations with repetition
of n objects divided into p classes of elements is equal
n!
to:
n1 !n2 !...np !
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 18 / 67
Element of Combinatorial Analysis Permutations
Element of Combinatorial Analysis
Example:
An urn containing ten balls numbered from 1 to 10,
with three different colours (three red balls, four green
balls, and three yellow balls), is drawn without
replacement, resulting in 10! possible ordered draws.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 19 / 67
Element of Combinatorial Analysis Permutations
Element of Combinatorial Analysis
Example:
An urn containing ten balls numbered from 1 to 10,
with three different colours (three red balls, four green
balls, and three yellow balls), is drawn without
replacement, resulting in 10! possible ordered draws.
Now, if we erase the numbers on the green balls, the
4! permutations of these four balls lead to the same
permutation, hence the number of distinct
10!
permutations becomes .
4!
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 19 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Definition
A combination is an unordered subset of p objects,
which may or may not be repeated, chosen from a set
containing n objects.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 20 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Proposition
The number of possible combinations without
repetition of p objects chosen from a set of cardinality
n, denoted Cnp , is equal to:
Apn n!
Cnp = =
p! p!(n − p)!
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 21 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Proposition
The number of possible combinations without
repetition of p objects chosen from a set of cardinality
n, denoted Cnp , is equal to:
Apn n!
Cnp = =
p! p!(n − p)!
Example:
In a class of 16 students, the number of possible pairs
2
is C16 .
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 21 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Proposition
The number of possible combinations with repetition
of p objects chosen from a set of cardinality n is equal
p
to Cp+n−1 .
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 22 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Proposition
The number of possible combinations with repetition
of p objects chosen from a set of cardinality n is equal
p
to Cp+n−1 .
Example:
In how many different ways can three sweets be
distributed among two children?
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 22 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Proposition
The number of possible combinations with repetition
of p objects chosen from a set of cardinality n is equal
p
to Cp+n−1 .
Example:
In how many different ways can three sweets be
distributed among two children?
Without considering the order of the sweets for each
child, the number of possible combinations is C42 = 6.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 22 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Exercise:
We want to distribute 5 rags into 3 drawers. In how
many different ways can this distribution occur?
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 23 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Exercise:
We roll four identical fair dice.
1. Calculate the number of possibilities of getting
the same number four times.
2. Calculate the number of possibilities of getting
four numbers.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 24 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Proposition: Properties of Combinations
Given four positive integers p, r, n and m satisfying
r < n and p < n, the properties follow:
1. Identity: Cn0 = Cnn = 1 and Cn1 = n.
2. Symmetry of Combinations: Cnp = Cnn−p .
3. Recursive Relationship in Combinations:
p−1 p
Cnp = Cn−1 + Cn−1 .
∑ n
4. Sum Property: Cnp = 2n .
p=0
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 25 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Proposition: Binomial Theorem
For any non-negative integer n and any real numbers
x and y:
∑n
n
(x + y) = Cnp x n−p y p
p=0
Proof by mathematical induction.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 26 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Exercise:
Find the integer n if Cn42 + Cnn−42 = 2Cn43 .
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 27 / 67
Element of Combinatorial Analysis Combinations
Element of Combinatorial Analysis
Exercise:
A lock has a 3-digit code, each digit being a number
from 1 to 9. How many possible codes:
1. are there?
2. end with an even digit?
3. contain at least one digit that is 4?
4. contain exactly one digit that is 4?
Now the code must consist of three distinct digits.
How many possible codes:
1. are there?
2. end with an odd digit?
3. contain the digit 6?
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 28 / 67
Probability Calculus
3. Probability Calculus
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 29 / 67
Probability Calculus
Probability Calculus
Probability theory focuses on the study of phenomena
characterised by chance and uncertainty.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 30 / 67
Probability Calculus
Probability Calculus
Probability theory focuses on the study of phenomena
characterised by chance and uncertainty.
Probability calculus enables a numerical modelling of
the frequency of occurrence of a random event.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 30 / 67
Probability Calculus
Probability Calculus
Probability theory focuses on the study of phenomena
characterised by chance and uncertainty.
Probability calculus enables a numerical modelling of
the frequency of occurrence of a random event.
Probabilistic objects and results provide a necessary
foundation for statistics.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 30 / 67
Probability Calculus
Probability Calculus
Definition: Random Experiment
A random experiment, also known as a random
trial, is any practice, repeated under identical
conditions, that can lead to multiple possible
outcomes, and whose result cannot be predicted a
priori.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 31 / 67
Probability Calculus
Probability Calculus
Definition: Random Experiment
A random experiment, also known as a random
trial, is any practice, repeated under identical
conditions, that can lead to multiple possible
outcomes, and whose result cannot be predicted a
priori.
Example:
"Rolling a fair dice (unbiased)" is a random
experiment with possible results of 1, 2, 3, 4, 5, and 6.
However, "rolling a dice with all faces showing the
number 2" is not a random experiment.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 31 / 67
Probability Calculus
Probability Calculus
Definition: Universe and Event
The sample space, set of outcomes or universe is
the set of all possible results of a random experiment.
Any subset of the sample space is called an event.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 32 / 67
Probability Calculus
Probability Calculus
Definition: Universe and Event
The sample space, set of outcomes or universe is
the set of all possible results of a random experiment.
Any subset of the sample space is called an event.
Example:
The sample space for the experiment of "rolling a
dice" is Ω = {1, 2, 3, 4, 5, 6}.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 32 / 67
Probability Calculus
Probability Calculus
Remark
The sample space of a random experiment can contain
an infinite number of elements, as in the case of the
experiment "flipping a coin and noting the first
instance it lands on heads" where the sample space is:
Ω = N∗ .
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 33 / 67
Probability Calculus
Probability Calculus
Definition
A σ-algebra on a set is any collection of non-empty
subsets that is closed under complement and
countable unions.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 34 / 67
Probability Calculus
Probability Calculus
Definition
A σ-algebra on a set is any collection of non-empty
subsets that is closed under complement and
countable unions.
In other words, T ⊂ P(E) is a σ-algebra on a set E if:
1. T ̸= ∅;
2. For every element A ∈ T , we have A ∈ T ;
3. For every countable
∪ family (An )n∈N of elements
from T , we have An ∈ T .
n∈N
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 34 / 67
Probability Calculus
Probability Calculus
Example:
For a given set E, {∅, E} and the power set P(E) are
two σ-algebras on E, referred to as trivial σ-algebra
and discrete σ-algebra, respectively.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 35 / 67
Probability Calculus
Probability Calculus
Definition: Probability Measure
A probability measure, probability law, or
simply probability is any real-valued function
defined on a σ-algebra A on a set Ω, with values in
[0, 1] satisfying:
1. For any countable family (An )n∈N of pairwise
disjoint
( elements
) from A, we have
∪ ∑
P An = P (An );
n∈N n∈N
2. P (Ω) = 1.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 36 / 67
Probability Calculus
Probability Calculus
Remark: Boole’s Inequality
For at most countable families of events (An )n∈N , we
have: ( )
∪ ∑
P An ≤ P (An ) .
n n
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 37 / 67
Probability Calculus
Probability Calculus
Definition: Probability Space
A probability space or probability triple
(Ω, A, P) consists of a set Ω, a σ-algebra A on Ω, and
a probability measure P on A.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 38 / 67
Probability Calculus
Probability Calculus
Definition
Given a probability space (Ω, A, P), the elements of
the σ-algebra A are called events, and the σ-algebra
A is referred to as the event space.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 39 / 67
Probability Calculus
Probability Calculus
Definition
Given a probability space (Ω, A, P), the following
definitions hold:
Ω is said to be the certain event: P (Ω) = 1.
∅ is said to be the impossible event; it never
occurs: P (∅) = 0.
An event is said to be elementaryor simple if it
occurs in only one way.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 40 / 67
Probability Calculus
Probability Calculus
Definition
The complementary event of A, denoted A, is
the event consisting of the set of outcomes or
elementary events in Ω that do not belong to A.
Two events A and B are said to be incompatible
if they cannot occur simultaneously: A ∩ B = ∅.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 41 / 67
Probability Calculus
Probability Calculus
Examples:
Considering the random experiment "rolling a fair
dice":
1. "Getting 1, 2, 3, 4, 5, or 6" is a certain event.
2. "Getting 0" is an impossible event.
3. "Getting 1" is an elementary event.
4. The complementary event of the event "getting 2,
4, or 6" is the event "getting 1, 3, or 5".
5. "Getting 1" and "getting 2" are two incompatible
events.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 42 / 67
Probability Calculus
Probability Calculus
Definition: Set Operators
Consider Ω as a fundamental space associated with a
random experiment, and A, B ⊂ Ω as two events.
A ∪ B is read as "event A or B" and means that
at least one of the events A or B occurs.
A ∩ B is read as "event A and B" and means that
A and B occur simultaneously.
A − B is read as "event A minus B" and means
that A occurs alone.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 43 / 67
Probability Calculus
Probability Calculus
Definition: Set Operators
A∆B is read as "symmetric difference of A and
B" and is equal to the event
(A − B) ∪ (B − A) = (A ∪ B) − (A ∩ B). It means
that only one of the two events A or B occurs.
A ⊂ B is read as "A included in B" and means
that if A occurs, then B also occurs.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 44 / 67
Probability Calculus
Probability Calculus
Example:
The event A = {1, 2} is included in the event
B = {1, 2, 3}.
If A occurs, for instance with the outcome 1, then B
also occurs.
However, if we get the outcome 3, then only B occurs.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 45 / 67
Probability Calculus
Probability Calculus
Exercise:
We roll a dice and consider the following two events:
A = {1, 2, 3, 5} and B = {2, 3, 4}.
Determine A ∪ B, A ∩ B, A − B, and A∆B.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 46 / 67
Probability Calculus
Probability Calculus
Proposition: De Morgan’s Law
Let A and B be two events in an event space A, then
we have:
A∩B =A∪B
In general, for events A1 , A2 , . . . , An in an event space
A, we have:
∩n ∪n
Ai = Ai
i=1 i=1
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 47 / 67
Probability Calculus
Probability Calculus
Exercise:
Let Ω be the set of possible outcomes of a random
experiment, and let A, B, and C be three events.
Translate the following events in set-theoretical terms:
1. All three events A, B, and C occur.
2. None of the three events occurs.
3. At least one of the events occurs.
4. At most two of the events occur.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 48 / 67
Probability Calculus
Probability Calculus
Proposition
Let P : A → [0, 1] be a probability, and A, B ∈ A. The
following properties hold:
1. P(∅) = 0
2. P(A) = 1 − P(A)
3. A ⊂ B ⇒ P(A) ≤ P(B) (P is increasing)
4. P(A ∪ B) = P(A) + P(B) − P(A ∩ B) (Poincaré’s
formula)
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 49 / 67
Probability Calculus
Probability Calculus
Definition: Probability of Composite Event
Consider a finite sample space Ω = {ω1 , ω2 , ..., ωn }.
The probability of any (composite) event A ⊂ Ω is
equal to the sum of the probabilities of all elementary
events contained within it:
∑
P(A) = P(ω)
ω∈A
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 50 / 67
Probability Calculus
Probability Calculus
Example:
Considering the random experiment "rolling a fair
dice" whose sample space is Ω = {1, 2, 3, 4, 5, 6}, the
probability of getting a 1, 2, or 4 is:
P({1, 2, 4}) = P({1}) + P({2}) + P({4})
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 51 / 67
Probability Calculus
Probability Calculus
Remark: Equiprobability
In cases where all elementary events have the same
probability, the probability of any (composite) event
A ⊂ Ω is equal to the ratio of the cardinality of A to
the cardinality of Ω:
Card(A)
P(A) =
Card(Ω)
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 52 / 67
Probability Calculus
Probability Calculus
Definition: Conditional Probability
Let P : A → [0, 1] be a probability, and A, B ∈ A. The
probability of the event "A given B", that is the event
"A given that B has already occurred", is given by:
P(A ∩ B)
P(A|B) =
P(B)
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 53 / 67
Probability Calculus
Probability Calculus
Definition: Independent Events
Let P : A → [0, 1] be a probability and A, B ∈ A. A
and B are said to be independent if:
P(A ∩ B) = P(A) × P(B)
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 54 / 67
Probability Calculus
Probability Calculus
Stating that A and B are independent means that
knowledge of the occurrence of A does not provide
any information about the occurrence of B.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 55 / 67
Probability Calculus
Probability Calculus
Stating that A and B are independent means that
knowledge of the occurrence of A does not provide
any information about the occurrence of B.
Moreover, the occurrence of one event does not
influence the occurrence of the other; thus:
P(A ∩ B) P(A)P(B)
P(A|B) = = = P(A)
P(B) P(B)
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 55 / 67
Probability Calculus
Probability Calculus
Example:
We roll a 6-sided dice and denote A as the event "get
an even number", and B as the event "get a multiple
of 3". We have:
1 1
P(A) = ; P(B) =
3 2
1 1
P(A ∩ B) = ; P(A|B) =
6 3
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 56 / 67
Probability Calculus
Probability Calculus
Definition: Generalised Independence
Let P : A → [0, 1] be a probability and (Ai )i=1,...,n ⊂ A
be a sequence of events. (Ai )i=1,...,n are said to be
mutually independent if:
∩ ∏
∀I ⊂ {1, 2, . . . , n} : P( Ai ) = P(Ai )
i∈I i∈I
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 57 / 67
Probability Calculus
Probability Calculus
Proposition
For all independent events A and B:
1. A and B are independent.
2. A and B are independent.
3. A and B are independent.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 58 / 67
Probability Calculus
Probability Calculus
Definition
A sequence of events (A)1≤i≤n forms a complete
system (or partition) of Ω if:
∪
n
∀i ̸= j : Ai ∩ Aj = ∅ and Ai = Ω
i=1
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 59 / 67
Probability Calculus
Probability Calculus
Proposition: Total Probability Formula
For (A)1≤i≤n a complete system of a sample space Ω
and B ⊂ Ω, we have
∑
n
P(B) = P(Ai ∩ B)
i=1
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 60 / 67
Probability Calculus
Probability Calculus
Proposition: Total Probability Formula
For (A)1≤i≤n a complete system of a sample space Ω
and B ⊂ Ω, we have
∑
n
P(B) = P(Ai ∩ B)
i=1
Thus, we can conclude that for two events A and B:
P(B) = P(A ∩ B) + P(A ∩ B)
= P(A)P(B|A) + P(A)P(B|A)
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 60 / 67
Probability Calculus
Probability Calculus
Exercise:
In a field, there are only three species of plants that
we denote as A, B, and C.
12% of the plants of species A, 7% of those of species
B, and 15% of those of species C are resistant to the
common herbicide. Furthermore, it is known that 30%
of the plants in the field are of species A and 20% are
of species B.
What is the probability that randomly selected plant
is resistant to the common herbicide?
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 61 / 67
Probability Calculus
Probability Calculus
Exercise:
During a seasonal epidemic of a disease affecting a
certain proportion x of a small population, a screening
test is implemented. It is assumed that the entire
population is subjected to the test, and a random
individual from this population is encountered.
It is known that the probability that this individual
has a positive test result given that they are sick is
95%, and the probability that this individual has a
negative test result given that they are healthy is 85%.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 62 / 67
Probability Calculus
Probability Calculus
Additionally, it is known that the probability that this
individual has a positive test result is 31%.
What is the probability x that the individual is sick?
You can start by writing an equation involving x.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 63 / 67
Probability Calculus
Probability Calculus
Theorem: Bayes’ Formula
Let (A)1≤i≤n be a complete system of events in a
sample space Ω, all with non-zero probability. For any
event B ⊂ Ω such that P(B) ̸= 0, we have:
P(B|Ai ) × P(Ai )
P(Ai |B) = ∑
n
P(B|Aj ) × P(Aj )
j=1
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 64 / 67
Probability Calculus
Probability Calculus
Exercise:
We randomly select between two urns U1 and U2 with
respective probabilities 31 and 32 , then we draw a ball
from the chosen urn.
U1 contains 5 red balls and 6 black balls.
U2 contains 7 red balls and 3 black balls.
Calculate the probability of choosing U1 given that a
black ball was drawn?
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 65 / 67
Probability Calculus
Probability Calculus
Exercise: Paradox of Screening Tests
A disease is present in the population at a rate of one
sick person per 10,000. A representative of a large
pharmaceutical laboratory boasts about their new
screening test to the Ministry of Health: if a person is
sick, the test is positive 99% of the time. If a person is
not sick, the test is positive 0.1% of the time.
These figures seem excellent. However, before allowing
the marketing of this test, the Ministry has consulted
a statistician to calculate the probability that a
person is sick given that the test is positive.
Perform the calculation using Bayes’ formula.
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 66 / 67
Probability Calculus
Probability Calculus
Exercise:
Let A, B, and C be three events in a probability
space (Ω, A, P).
1. Show that: A ∪ B ∪ C = A ∩ B ∩ C and
A ∩ B ∩ C = A ∪ B ∪ C.
2. Show that:
P(A ∩ B ∩ C ) ≥ 1 − P(A) − P(B) − P(C ).
Khalil Amine (EHTP, Casablanca) kh.amine.sbai@gmail.com 67 / 67