0% found this document useful (0 votes)
22 views9 pages

GW1 Sol

The document consists of exercises on probability, random variables, and statistical concepts, structured into four parts. It covers basic probability principles, discrete and continuous random variables, and definitions of covariance and correlation, along with their properties and formulas. Each exercise includes problems related to real-world scenarios, demonstrating the application of statistical theories and calculations.

Uploaded by

Hind Quacini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views9 pages

GW1 Sol

The document consists of exercises on probability, random variables, and statistical concepts, structured into four parts. It covers basic probability principles, discrete and continuous random variables, and definitions of covariance and correlation, along with their properties and formulas. Each exercise includes problems related to real-world scenarios, demonstrating the application of statistical theories and calculations.

Uploaded by

Hind Quacini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Hassania School of Public Works Probability and Statistics

Fall 2024 Dr Khalil Amine

Solution to Group Work 1 on Probability and Random Variables

Part I
Basics of Probability
Exercise 1
Let A, B, and C be three events in a random experiment.

1. Translate the event expressed in set notation A ∩ B ∩ C into verbal expression :



All the three events A, B, and C occur
⃝ None of the three events A, B, or C occurs
⃝ At most one of the three events A, B, or C occurs
⃝ At least two of the three events A, B, or C occur
2. Translate the event expressed in set notation A ∩ B ∩ C into verbal expression :


All the three events A, B, and C occur
None of the three events A, B, or C occurs
⃝ At most one of the three events A, B, or C occurs
⃝ At least two of the three events A, B, or C occur
3. Translate the event expressed in set notation ( A ∩ B) ∪ ( A ∩ C ) ∪ ( B ∩ C ) into verbal expression :
⃝ All the three events A, B, and C occur


None of the three events A, B, or C occurs
At most one of the three events A, B, or C occurs
⃝ At least two of the three events A, B, or C occur
4. What is the equivalent set notation for the event ( A ∩ B) ∪ ( A ∩ C ) ∪ ( B ∩ C )
( ) ( ) ( )
⃝ A∪B∪C ∩ A∪B∪C ∩ A∪B∪C
( ) ( ) ( )
⃝ A∩B∩C ∪ A∩B∩C ∪ A∩B∩C
⊗ ( ) ( ) ( ) ( )
A∩B∩C ∪ A∩B∩C ∪ A∩B∩C ∪ A∩B∩C
( ) ( ) ( ) ( )
⃝ A∪B∪C ∩ A∪B∪C ∩ A∪B∪C ∩ A∪B∪C

1/9
Exercise 2
Consider a family with 2 children. Assume that the likelihood of having a girl is equal to that of having a
boy.

1. What is the probability that both children are boys, given that the eldest is a boy?

Let consider the two events:


G: "having a girl"
B: "having a boy"
In a family with 2 children, there are 4 possible outcomes: { BB, BG, GB, GG }. These outcomes are
1
independent and equiprobable with probability .
4
The event "both children are boys, given that the eldest is a boy" can be expressed as
{ BB | BG ∪ BB}, thus
1
P ( BB | BG ∪ BB) = 1
4

4 + 14
1
=
2

2. What is the probability that both children are boys, given that at least one of the children is a boy?

The event "both children are boys, given that at least one of the children is a boy" can be expressed
as { BB | BG ∪ GB ∪ BB}, thus:
1
P ( BB | BG ∪ GB ∪ BB) = 1
4

4 + + 14
1
4
1
=
3

2/9
Exercise 3
A certain system has 5 components. A system failure is caused by a failure in components A, B, C, D,
and E with probabilities of 35%, 30%, 20%, 10%, and 5%, respectively. It is assumed that simultaneous
failures in more than one component are so rare that they can be ignored.

1. If a system failure is not caused by A, what is the probability that it is caused by B?

Let consider the five events:


A: "the failure originates from component A" with probability 0.35.
B: "the failure originates from component B" with probability 0.3.
C: "the failure originates from component C" with probability 0.2.
D: "the failure originates from component D" with probability 0.1.
E: "the failure originates from component { E" with}probability 0.05.
The task is to find the probability of the event B | A :
( )
( )
P B∩A
P B|A = ( )
P A
P ( B) ( )
= Since B ∩ A = B, because A ∩ B = ∅
1 − P ( A)
0.3
=
1 − 0.35
35
=
60
≈ 0.46

2. If a system failure is caused by neither A nor B, what is the probability that it is caused by C or D?

{ }
The task is to find the probability of the event C ∪ D | A ∩ B :
( )
( )
P B∩A
P B|A = ( )
P A
P ( B) ( )
= Since B ∩ A = B, because A ∩ B = ∅
1 − P ( A)
0.3
=
1 − 0.35
35
=
60
≈ 0.46

3/9
Exercise 4
There are 50, 75, and 100 employees in three warehouses A, B, and C respectively, with the proportions of
female employees being 50%, 60%, and 70%, respectively. A resignation is equally likely to occur among
all employees, regardless of gender.
A female employee resigns. What is the probability that she is from warehouse C?

Let consider the three events:


50 2
A: "the resignee is from warehouse A" with probability = .
50 + 75 + 100 9
75 1
B: "the failure originates from component B" with probability = .
50 + 75 + 100 3
100 4
C: "the failure originates from component C" with probability = .
50 + 75 + 100 9
and let consider the two events:
1
F: "the resignee is a female" with probability .
2
1
M: "the resignee is a man" with probability .
2
The task is to find the probability of the event {C | F }. Noting that { A, B, C } is a complete system,
the Bayes’ formula provides:

P ( F | C ) P (C )
P (C | F ) =
P ( F | A) P ( A) + P ( F | B) P ( B) + P ( F | C ) P (C )
7 4
×
= 10 9
1 2 3 1 7 4
× + × + ×
2 9 5 3 10 9
1
=
2

4/9
Part II
Discrete Random Variable
In each of the following situations, identify the common distribution of the given random variable, and
provide its density (mass) function.

1. A factory produces light bulbs, and it is known that 5% of them are defective. A quality control
inspector randomly selects 10 bulbs from the production line. Let X be the number of defective bulbs
in this sample.

Distribution: Binomial
Explanation: Each bulb has a fixed probability of being defective, and the selection of bulbs is
independent.
Mass Function: P ( X = k) = Ckn pk (1 − p)n−k , where n = 10 and p = 0.05.

2. A fair six-sided die is rolled repeatedly until a six appears. Let Y be the number of rolls needed to
get the first six.

Distribution: Geometric
Explanation: This models the number of trials required for the first success in a sequence of
independent trials with a constant success probability.
Mass Function: P (Y = k ) = (1 − p)k−1 p, where p = 16 .

3. An urn contains 5 red balls and 8 blue balls. Four balls are randomly selected without
replacement. Let W be the number of red balls in the selection.

Distribution: Hypergeometric
Explanation: This involves sampling without replacement, where the probability of selecting a red
ball changes with each draw.
Crk CnN−−kr
Mass Function: P (W = k ) = CnN , where r = 5, N = 13, and n = 4.

4. A call centre receives an average of 6 calls per hour. Let V be the number of calls received in a
randomly selected hour.

Distribution: Poisson
Explanation: The number of calls occurs randomly over a fixed interval, with a constant average
rate and independence between events.
k −λ
Mass Function: P (V = k ) = λ k!e , where λ = 6.

5. In a multiple-choice quiz, each question has four choices, only one of which is correct. Each
question is guessed without any prior knowledge. Let Z be the number of questions answered
correctly out of 20.

Distribution: Binomial
Explanation: Each question has two outcomes (correct or incorrect) with a fixed probability of
success, and the results are independent.
Mass Function: P ( Z = k) = Ckn pk (1 − p)n−k , where n = 20 and p = 41 .

5/9
Part III
Continuous Random Variable
In a ceramics workshop, small square tiles are produced with width W. This value W is a random variable
whose density function is defined as follows:
{
6x (1 − x ) if 0 < x < 1,
fW ( x) =
0 otherwise.

1. Calculate the density function of the surface area A of a tile.

Considering the random variable A = W 2 , the probability density function of A can be calculated
from the cumulative distribution function of A:

F A (x) = P ( A < x)
( )
= P W2 < x
( √ )
=P W< x

= F W ( x ),

which leads to:


d
f A (x) = F A (x)
dx
d (√ )
= FW x
dx
√ d √
= fW ( x) · ( x)
dx
1 √
= √ fW ( x)
2 x

for 0 < x < 1, and 0 otherwise. Substituting f W ( x ) = 6x (1 − x ), it follows:

1 √ √
f A ( x ) = √ · 6 x (1 − x )
2 x

= 3(1 − x ), 0 < x < 1

In conclusion: { √
3(1 − x) if 0 < x < 1,
f A (x) =
0 otherwise.

6/9
2. Calculate the expected value of the random variable A.

The expectation of A is given by:


∫ +∞
E( A ) = x f A ( x ) dx
−∞
∫ 1 √
= x · 3(1 − x ) dx
0
∫ 1
=3 ( x − x3/2 ) dx
0
[ ]1
x2 2x5/2
=3 −
2 5
0
3
=
10

7/9
Part IV
Covariance and Correlation
Definition 1 (Covariance) Let X and Y be two discrete random variables. The covariance of X and Y is
defined by
cov ( X, Y ) = E [( X − E[ X ]) (Y − E[Y ])]

Definition 2 (Correlation) Let X and Y be two discrete random variables. The correlation between X and
Y is defined by
cov ( X, Y )
cor ( X, Y ) =
σ ( X ) σ (Y )
where σ ( X ) and σ (Y ) are the standard deviation of X and Y.

Let X, Y, and Z be three random variables, and a, b and c be three real numbers. Prove the following
expressions:

1. Using only the linearity of the expected value, show that:

var [ aX + bY ] = a2 var[ X ] + b2 var[Y ] + 2ab cov( X, Y )

and deduce the expression for: var [ aX + bY + cZ ]


[ ]
2
var [ aX + bY ] = E ( aX + bY − E [ aX + bY ])
[ ]
= E ( aX + bY − a E [ X ] + b E [Y ])2
[ ]
= E ( a ( X − E [ X ]) + b (Y − E [Y ]))2
[ ]
= E a2 ( X − E [ X ])2 + b2 (Y − E [Y ])2 + 2ab ( X − E [ X ]) (Y − E [Y ])
[ ] [ ]
= a2 E ( X − E [ X ])2 + b2 E (Y − E [Y ])2 + 2ab E [( X − E [ X ]) (Y − E [Y ])]
= a2 var[ X ] + b2 var[Y ] + 2ab cov( X, Y )

Therefore,

var [ aX + bY + cZ ] = var [ aX + (bY + cZ )]


= a2 var[ X ] + var[bY + cZ ] + 2a cov( X, bY + cZ )
= a2 var[ X ] + b2 var[Y ] + c2 var[ Z ]
+ 2bc cov(Y, Z ) + 2a cov( X, bY + cZ )
= a2 var[ X ] + b2 var[Y ] + c2 var[ Z ]
+ 2bc cov(Y, Z ) + 2a cov( X, bY ) + 2a cov( X, cZ )
= a2 var[ X ] + b2 var[Y ] + c2 var[ Z ]
+ 2bc cov(Y, Z ) + 2ab cov( X, Y ) + 2ac cov( X, Z )
= a2 var[ X ] + b2 var[Y ] + c2 var[ Z ]
+ 2ab cov( X, Y ) + 2ac cov( X, Z ) + 2bc cov(Y, Z )

Note that division by a, b, or c is not possible here, as they may be zero!

8/9
2. cov ( aX, Y ) = a cov ( X, Y )

cov ( aX, Y ) = E [( aX − E[ aX ]) (Y − E[Y ])]


= E [( aX − a E[ X ]) (Y − E[Y ])]
= E [ a( X − E[ X ]) (Y − E[Y ])]
= a E [( X − E[ X ]) (Y − E[Y ])]
= a cov ( X, Y )

3. cov ( X + b, Y ) = cov ( X, Y )

cov ( X + b, Y ) = E [(( X + b) − E[ X + b]) (Y − E[Y ])]


= E [( X + b − (E[ X ] + b)) (Y − E[Y ])]
= E [( X − E[ X ]) (Y − E[Y ])]
= cov ( X, Y )

4. cov ( X + Y, Z ) = cov ( X, Z ) + cov (Y, Z )

cov ( X + Y, Z ) = E [(( X + Y ) − E[ X + Y ]) ( Z − E[ Z ])]


= E [( X + Y − E[ X ] − E[Y ]) ( Z − E[ Z ])]
= E [(( X + E[ X ]) + (Y − E[ X ])) ( Z − E[ Z ])]
= E [( X + E[ X ]) ( Z − E[ Z ]) + (Y − E[ X ]) ( Z − E[ Z ])]
= E [( X + E[ X ]) ( Z − E[ Z ])] + E [(Y − E[ X ]) ( Z − E[ Z ])]
= cov ( X, Z ) + cov (Y, Z )

( )
X − E [ X ] Y − E [Y ]
5. cor ( X, Y ) = cov ,
σ( X ) σ (Y )

Using cov ( X, Y ) = cov(Y, X ) it follows cov ( X, aY ) = a cov ( X, Y ) and cov ( X, Y + b) =


cov ( X, Y ), then:
( ) ( )
X − E [ X ] Y − E [Y ] 1 Y − E [Y ]
cov , = cov X − E[ X ],
σ( X ) σ (Y ) σ( X ) σ (Y )
1 1
= cov ( X − E[ X ], Y − E[Y ])
σ ( X ) σ (Y )
1 1
= cov ( X, Y − E[Y ])
σ ( X ) σ (Y )
1 1
= cov ( X, Y )
σ ( X ) σ (Y )
= cor ( X, Y )

9/9

You might also like