TD3 Sol

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Université Internationale de Rabat Academic Year 2024–2025

School of Aerospace & Automotive Engineering Calculus III

Tutorial 3
Probability Calculations and Random Variables

Exercice 1. Let Ω = {α, β, γ} be a fundamental set and consider the sets F1 = {∅, {α}, {β, γ}, Ω}
and F2 = {∅, {β}, {α, γ}, Ω}.
1) Show that F1 and F2 are σ-algebras on Ω.
2) Are the sets F1 ∩ F2 and F1 ∪ F2 σ-algebras on Ω ?
Solution – 1) We can easily verify the three conditions for a σ-algebra on Ω. We can write

Fi = {∅, Ai , Ai , Ω},
with A1 = {α} and A2 = {β}.
2) F1 ∩ F2 = {∅, Ω} is the trivial σ-algebra,
F1 ∪ F2 = {∅, {α}, {β}, {α, γ}, {β, γ}, Ω} is not a σ-algebra because {α, γ} ∩ {β, γ} = {γ} ∈
/
F1 ∪ F 2 .

Exercice 2. Consider a shooting game on a target with three zones 1, 2, and 3. We consider (Ω, F, P)
the probability space associated with this experiment, and X the random variable representing the
zone hit by each shot. We assume that P(X = 3) = p, P(X = 2) = 2p, and P (X = 1) = 3p.
For which value of p is this possible ?
Solution – p + 2p + 3p = 1 ⇒ p = 61 .
So the law of the rv X is given in the next table

xi 1 2 3 Σ
P(X = xi ) 3/6 2/6 1/6 1

Exercice 3. Let A, B, and C be three events with the probabilities : P(A) = 0.6, P(A ∩ B) = 0.2,
P(A ∩ C) = 0.1, and P(A ∩ B ∩ C) = 0.05.
We consider the two events E = A ∩ (B ∪ C) and F = A ∩ B̄ ∩ C̄.
1) Show that E and F are mutually exclusive.
2) What is E ∪ F ?
3) Calculate P(E) and P(F ).
Solution – 1) E = A ∩ (B ∪ C) and F = A ∩ B̄ ∩ C̄ = A ∩ (B ∪ C)
E∩F =A∩B∪C ∩B∪C =A∩∅=∅
2) E ∪ F = [A ∩ (B ∪ C)] ∪ [A ∩ (B ∪ C)] = A ∩ Ω = A
3) P(E) = P(A ∩ (B ∪ C)) = P((A ∩ B) ∪ (A ∩ C)) = P(A ∩ B) + P(A ∩ C) − P(A ∩ B ∩ C) = 0.25
P(A) = P(E ∪ F ) = P(E) + P(F ) ⇒ P(F ) = P(A) − P(E) = 0.35

Exercice 4. A box contains 6 white tokens, 4 black tokens, 3 red tokens, and 2 green tokens.
1) A token is drawn from the box, what is the probability that the token drawn is :
a) black,
b) white, red, or green.
2) Four tokens are drawn simultaneously from the box. Calculate the probability that the 4
tokens drawn are :
a) white,

1
b) all of the same color,
c) of different colors,
d) two red tokens.
3) Four tokens are drawn successively with replacement from the box.
a) Calculate the probability of drawing 2 white tokens in 4 draws.
b) Calculate the probability of drawing at least 2 white tokens in 4 draws.
Solution – The box contains 6 white tokens, 4 black tokens, 3 red tokens, and 2 green tokens, for
a total of 15 tokens.
1)
4
a) ≃ 0.27
15
6+3+2
b) ≃ 0.73
15
2)
C4
a) 46 ≃ 0.0109
C15
C64 + C44
b) 4
≃ 0.0117
C15
6×4×3×2
c) 4
≃ 0.1054
C15
C2 × C2
d) 3 4 12 ≃ 0.14505
C15
3)
C 2 × 62 × 92
a) 4 2 ≃ 0.35
15 × 152
94 C 1 × 6 × 93
b) 1 − P(drawing 0 or 1 white token) = 1 − 4 − 4 ≃ 0.52
15 15 × 153
Exercice 5. In a class of n ≤ 365 students, what is the probability of the event A : ”At least 2
students share the same birthday” ?
Solution –
Ω = {(a1 , a2 , ..., an ) : ai ∈ {1, 2, ..., 365}}
Card(Ω) < ∞(F = P(Ω))
Number of possible birthday configurations : Card(Ω) = 365n
365!
Number of configurations with all different birthdays : An365 = (365−n)!
365!
(365−n)!
=⇒ P(all birthdays are different) =
365n
365!
(365−n)!
=⇒ P(at least two birthdays are the same) = 1 −
365n
Example :
For a class of 25 students, the probability that at least two students share the same birthday is
0.5687.
For a class of 40 students, the probability that at least two students share the same birthday is
0.8912.

Exercice 6. A person has N keys and wants to open their door in the dark. They try the keys
one by one, setting each aside after trying. What is the probability that the door opens on the mth
attempt ?
Solution – Reminder : Theorem of compound probabilities or the multiplication rule
P(A ∩ B) = P(B/A)P(A) = P(A/B)P(B).
Here is a generalization :

2
P(A1 ∩ A2 ∩ ... ∩ Am ) = P(Am /A1 ∩ A2 ∩ ... ∩ Am−1 ) × P(Am−1 /A1 ∩ A2 ∩ ... ∩ Am−2 )
× ... × P(A2 /A1 )P(A1 ).

Let Ai represent ”the ith attempt is a failure,” so we have failures from A1 to Am−1 , followed by
a success, Am .
We seek the probability P(A1 ∩ A2 ∩ ... ∩ Am−1 ∩ Am ), which is (as given in the course) :

P(A1 ∩ A2 ∩ ... ∩ Am ) = P(A1 )P(A2 /A1 )P(A3 /A1 ∩ A2 )...P(Am /A1 ∩ A2 ∩ ... ∩ Am−1 )
N −1 N −2 N −3 N −m+1 1 1
= × × × ... × × = .
N N −1 N −2 N −m+2 N −m+1 N

Exercice 7. A bank has an alarm system. If a burglary occurs, the system works with a probability
of 0.95. The probability that the alarm is triggered by error on any given day, without a burglary,
is 0.01. The probability of a burglary on any given day is 0.005.
1) Calculate the probability that the alarm is triggered on a given day.
2) Calculate the probability that a burglary actually occurred when the alarm is triggered.
Solution –
Let the events be :
D : ”Alarm is triggered” = ”Alarm functions”
C : ”Burglary occurs”
Given : P(A/C) = 0.95 ; P(A/C) = 0.01 and P(C) = 0.005.
1) P (A) = P(A/C)P(C) + P(A/C)P(C) = 0.0147
2) P(C/A) = P(C∩A)
P(A)
= P(A/C)P(C)
P(A)
= 0.3231

Exercice 8. A film factory has four machines, M1 , M2 , M3 , and M4 , which respectively produce
10%, 20%, 30%, and 40% of the total production.
Knowing that the probability that a film produced by M1 , M2 , M3 , or M4 is defective is
respectively 0.06, 0.05, 0.03, and 0.01, calculate :
1) the probability that a film is defective ;
2) the probability that a defective film came from machine M1 ;
3) the probability that a non-defective film came from machine M3 .
Solution – Let the events be :
D : ”Defective film”
Mi : ”Film P produced by machine Mi ”
1) P (D) = 4i=1 P(D/Mi )P(Mi ) = 0.029.
1 ∩D) 1 )P(M1 )
2) P(M1 /D) = P(M P(D)
= P(D/M
P(D)
= 0.2069.
P(D/M3 )P(M3 )
3) P(M3 /D) = P(D)
= 0.2997.

Exercice 9. Let X be a random variable that takes the values 2, 4, 6, or 8 such that :

1 1
P(X < 6) = , P(X > 6) = , and P(X = 2) = P(X = 4).
3 2
1. Determine X(Ω).
2. Determine the distribution of X.
3. Is this an equiprobability distribution ? Why ?
4. Calculate P(X ≥ 5), P(X + 4 ≤ 7), and P(X ̸= 2).

3
5. Determine and plot the cumulative distribution function of X.
Solution –
1. X(Ω) = {2; 4; 6; 8}.
2. Let a = P(X = 2); b = P(X = 4); c = P(X = 6); d = P(X = 8)


 P(X < 6) = 13 ⇒ a + b = 13
P(X > 6) = 12 ⇒ d = 12


 P(X = 2) = P(X = 4) ⇒ a = b
a+b+c+d=1

 1


 2a = 3 
 a = 61
d = 12 b = 16
 
⇒ ⇒

 a=b 
 d = 21
a+b+c+d=1 c = 16
 

3. No, the probabilities are not equal, so it’s not an equiprobability distribution.
4. P(X ≥ 5) = P(X = 6) + P(X = 8) = 23 .
P(X + 4 ≤ 7) = P(X ≤ 3) = 0.
P(X ̸= 2) = 1 − P(X = 2) = 65 .

x 2 4 6 8
F (x) 1/6 2/6 3/6 6/6

5.

Additional Exercises

Exercice 10. Answer true or false :


Let A and B be two events in a probability space (Ω, P), then :
1. P(A ∪ B) ≤ P(A) + P(B).
2. If P(A) = P(B) = 12 , then P(A ∩ B) ≥ 14 .
3. P(A ∩ B) ≤ 12 (P(A) + P(B)).
4. If P(A) = P(B) = 1, then P(A ∩ B) = 1.
5. (P(A ∩ B))2 ≤ P(A)P(B).
Solution –
1. P(A ∪ B) ≤ P(A) + P(B). TRUE. From the lecture, P(A ∪ B) = P(A) + P(B) − P(A ∩ B).
Thus, P(A) + P(B) = P(A ∪ B) + P(A ∩ B) ≥ P(A ∪ B).
2. If P(A) = P(B) = 12 , then P(A ∩ B) ≥ 41 . FALSE. Counter-example : let B = A and
P(A) = 12 . P(A ∩ B) = P(A ∩ A) = P(∅) = 0, which is not greater than 14 .
3. P(A∩B) ≤ 12 (P(A)+P(B)). TRUE. In fact, P(A∩B) ≤ min(P(A), P(B)) ≤ 12 (P(A)+P(B)).
4. If P(A) = P(B) = 1, then P(A ∩ B) = 1. TRUE. P(A ∪ B) + P(A ∩ B) = P(A) + P(B) = 2,
which is only possible if P(A ∪ B) = P(A ∩ B) = 1.
5. (P(A ∩ B))2 ≤ P(A)P(B). TRUE. Since P(A ∩ B) ≤ P(A) and P(A ∩ B) ≤ P(B), by
multiplying these inequalities (with non-negative numbers), we obtain the desired inequality.

4
Exercice 11. A certain missile model hits its target with a probability of 0.2. How many missiles
must be fired to have a probability of at least 0.7 of hitting the target ?
ln(0.3)
Solution – We are looking for n such that 1 − (0.8)n ≥ 0.7, so 0.8n ≤ 0.3. Thus, n ≥ ≃
ln(0.8)
5.39. We take n = 6.

Exercice 12. Before the quarter-final draw of the UEFA Champions League, there are 4 English
teams remaining. Calculate the probability p that there is at least one quarter-final match involving
two English teams.

Exercice 13. A survey conducted among 400 students about their reading habits of two weekly
magazines, ”Tel Quel” and ”Alayam”, provided the following results : 165 students read ”Tel Quel”,
240 read ”Alayam”, and 90 read both. One student is chosen at random.
1. What is the probability that the student reads one or the other of these two magazines ?
2. What is the probability that the student reads only ”Alayam” ?
3. Using set notation, express the event ”Reads neither Alayam nor Tel Quel” and calculate
its probability.
Solution – Let us define the following events :
- A : ”The randomly selected student reads Tel Quel.”
- B : ”The randomly selected student reads Alayam.”
1. We have :

P (A ∪ B) = P (A) + P (B) − P (A ∩ B),


165 240 90 315
= + − = = 0.7875.
400 400 400 400
2. We have :

P (B ∩ A) = P (BnA) = P (BnA ∩ B) = P (B) − P (A ∩ B)


240 90
= − = 0.375.
400 400
3. We have :

P (A ∩ B) = P (A ∪ B) = 1 − P (A ∪ B),
= 1 − 0.7875 = 0.2125.

Exercice 14. Two coins are used : one is biased, so that the probability of getting heads is 1/4
when tossed ; the other is a normal coin, with the probability of getting heads being 1/2 on each
toss. One of the two coins is selected at random (each coin has a probability of 1/2 of being chosen).
1) What is the probability of getting heads ?
2) Given that heads was obtained, what is the probability that the biased coin was used ?

Exercice 15. An insurance company classifies its clients into 3 categories : R1 , R2 , and R3 : good
risks, medium risks, and bad risks. The proportions of these 3 categories in the total population
are 20% for class R1 , 50% for class R2 , and 30% for class R3 . Statistics show that the probability
of having an accident during the year for a person from each of these 3 categories is 0.05, 0.15, and
0.30, respectively.
We consider the following events :

5
A : ”The randomly chosen person has an accident”, B1 : ”The randomly chosen person is a
good risk”, B2 : ”The randomly chosen person is a medium risk”, and B3 : ”The randomly chosen
person is a bad risk”.
1) What is the probability that a randomly chosen person has an accident and is a medium
risk ?
2) What is the probability that a randomly chosen person has an accident ?
3) If Mrs. Hind did not have an accident this year, what is the probability that she is a good
risk ?
4) If Mr. Anas had an accident this year, what is the probability that he is a medium or bad
risk ?

Exercice 16. Patients in a hospital are classified according to their blood group as follows : 60% for
group A, 30% for group B, and the remainder for group O. It has been observed that the infection
rates for a certain virus are 10% for group A, 20% for group B, and 25% for group O.
1) What is the probability that a randomly chosen person is infected and has blood group A ?
2) What is the probability that a randomly chosen person is infected ?
3) If Mr. Ali is not infected, what is the probability that he has blood group B ?
4) If Mrs. Samia is infected, what is the probability that she has blood group A or O ?

Exercice 17. Two players, A and B, participate in a game where their respective probabilities of
winning each round are p and q = 1 − p. The winner is the first player to achieve two more victories
than the other.
What is the probability of each player winning the game ?
Solution –
Let’s draw, for example, for player A, a tree diagram of the outcomes of the first two rounds,
and at the end of each of the four branches, we indicate the updated probability of player A winning :

Let P (A) be the probability that player A wins the game at the start. We now examine how this
probability changes after the first two rounds. If A wins both rounds, this probability becomes 1,
and if A loses both rounds, it becomes 0. If A wins one round and loses the other, the probability
remains unchanged. Hence, we have the following relation :

P (A) = 1 × p2 + 0 × q 2 + P (A) × pq + P (A) × qp

From this, we deduce :


p2 p2
P (A) = = 2
1 − 2pq p + q2
Thus, the probability for player B is :

P (B) = 1 − P (A).

6
Exercice 18. The 160 students in a section have the option to continue their studies in three
tracks : A, B, and C. It is known that 90 choose track A, 40 choose track B, and the rest choose
track C. It is also known that 70% of the students in track A pass their year, 20% pass after retakes,
and the remaining students do not pass. These percentages are 80% and 15% for track B, and 60%
and 30% for track C. A student is chosen at random.
1) What is the probability that the student passes the year ?
2) What is the probability that the student passes or passes after retakes ?
3) What is the probability that the student is in track B, given that they passed after retakes ?
4) What is the probability that the student is in track B or C, given that they did not pass ?
Solution –
We define the following events :
A : ”The student chooses track A”
B : ”The student chooses track B”
C : ”The student chooses track C”
V : ”The student passes the year”
V R : ”The student passes the year after retakes”
N V : ”The student does not pass the year”
Note that :
– The events A, B, and C form a partition ; – The events V , V R, and N V form a partition ;
We also have the following information :

Event ⋆ A B C Σ
90 40 30
P(⋆) 160
= 0.5625 160
= 0.25 160
= 0.1875 1
P(V /⋆) 0.7 0.8 0.6 ///
P(V R/⋆) 0.2 0.15 0.3 ///
P(N V /⋆) 0.1 0.05 0.1 ///
Σ 1 1 1 ///

1. What is the probability that the student passes the year ?


Using the law of total probability, we find :

P(V ) = P(V /A)P(A) + P(V /B)P(B) + P(V /C)P(C)


= 0.7 × 0.5625 + 0.8 × 0.25 + 0.6 × 0.1875 = 0.70625.

2. What is the probability that the student passes or passes after retakes ?

P(V ∪ V R) = P(V ) + P(V R) − P(V ∩ V R) = P(V ) + P(V R)

since V ∩ V R = ∅.

P(V R) = P(V R/A)P(A) + P(V R/B)P(B) + P(V R/C)P(C)


= 0.2 × 0.5625 + 0.15 × 0.25 + 0.3 × 0.1875 = 0.20625.

Therefore, P(V ∪ V R) = 0.70625 + 0.20625 = 0.9125.


3. What is the probability that the student is in track B given that they passed after retakes ?
Bayes’ formula gives :

P(V R/B) × P(B) 0.15 × 0.25


P(B/V R) = = ≃ 0.1818.
P(V R) 0.20625

7
4. What is the probability that the student is in track B or C given that they did not pass ? We
are looking for P(B ∪ C/N V ) :

P(B ∪ C/N V ) = PN V (B ∪ C) = PN V (B) + PN V (C) = 1 − PN V (A)


where,

P(N V /A) × P(A) 0.1 × 0.5625


PN V (A) = P(A/N V ) = = = 0.6428571.
P(N V ) 0.0875
where,
P(N V ) = P(N V /A)P(A) + P(N V /B)P(B) + P(N V /C)P(C)
= 0.1 × 0.5625 + 0.05 × 0.25 + 0.1 × 0.1875 = 0.0875.
OR, P(N V ) = 1 − P(V ) − P(V R) = 0.0875.
Thus :

P(B ∪ C/N V ) = 1 − PN V (A) = 1 − 0.6428571 = 0.3571429.

Exercice 19. We consider two arbitrary events A and B. Express the following conditional probabilities
in terms of P(A), P(B), and P(A ∩ B) :
a) P(A|A ∪ B),
b) P(A|A ∩ B),
c) P(B|A). What does this probability become when A and B are independent ?
Solution –
a) By applying Bayes’ theorem and noting that A ⊂ A ∪ B :
P(A) P (A)
P(A|A ∪ B) = =
P (A ∪ B) P (A) + P (B) − P (A ∩ B)
b) If both A and B have occurred, then clearly A has occurred, and we can verify that P(A|A ∩
B) = 1.
c) By applying Bayes’ theorem again :

P(A ∩ B) P(A ∪ B) 1 − P(A ∪ B) P(B) − P(A ∩ B)


P(B|A) = = = =1−
P(A) P(A) 1 − P(A) 1 − P(A)
If A and B are independent, then P(A ∩ B) = P(A) × P(B), which gives

P(B|A) = 1 − P(B) = P(B).


This proves the following result : If A and B are independent, then A and B are also
independent.

Exercice 20. A smoker, after reading a series of statistics about cancer risks, decides to quit
smoking. According to the statistics, the following probabilities are estimated : if the person did
not smoke on the n-th day, then the probability that they will not smoke the next day is 0.3 ; but
if they smoked on the n-th day, then the probability that they will not smoke the next day is 0.9.
For n ≥ 0, we consider the event :
Fn : ”The person smokes on the n-th day” and we define pn = P(Fn ). In particular, we have
p0 = 1.
1) Prove that pn+1 = −0.6pn + 0.7.
2) Will the person eventually stop smoking ?
Solution –

8
1. The probability that the person smokes on the (n + 1)-th day can be written as :

pn+1 = P(Fn+1 ) = P(Fn+1 /Fn )P(Fn ) + P(Fn+1 /Fn )P(Fn )

Given the problem’s data, we know :


— P(Fn+1 /Fn ) = 1 − 0.9 = 0.1
— P(Fn+1 /Fn ) = 1 − 0.3 = 0.7
Thus, we have :

pn+1 = 0.1pn + 0.7(1 − pn ) = 0.1pn + 0.7 − 0.7pn = −0.6pn + 0.7

2. To find whether the person will eventually stop smoking, we analyze the steady state by
finding the limit of pn as n → ∞. Assume that pn → p as n → ∞. Then :

p = −0.6p + 0.7

Solving for p gives :


0.7
1.6p = 0.7 ⇒ p= = 0.4375
1.6
Since the limiting value of p is not zero, the person will not completely stop smoking, but the
probability that they smoke will stabilize at 0.4375.

You might also like