ECE342 Course Notes PDF
ECE342 Course Notes PDF
Winter 2013
Copyright ©2013 C. Tellambura and M. Ardakani. All rights reserved.
Contents
Goals of EE387
• Introduce the basics of probability theory,
4. Duality Principle
Definition 1.7: A set of mutually exclusive sets (events) whose union equals
the sample space is an event space of S. Mathematically, Bi ∩ Bj = ϕ for all
i ̸= j and B1 ∪ B2 ∪ . . . ∪ Bn = S.
Theorem 1.5:
For any event A and event space B = {B1 , B2 , · · · , Bm } ,
∑
m
P [A] = P [A ∩ Bi ].
i=1
P [A ∩ B]
P [A|B] = .
P [B]
P [A|B]P [B]
Theorem 1.7 (Bayes’ Theorem): P [B|A] = .
P [A]
4 Basics of Probability Theory
P [A|Bi ]P [Bi ]
P [Bi |A] = ∑m .
i=1 P [A|Bi ]P [Bi ]
1.6 Independence
Definition 1.10: Events A and B are independent if and only if P [A ∩ B] =
P [A]P [B].
Relationship with conditional probability: P [A|B] = P [A], P [B|A] = P [B]
when A and B are independent.
P [A ∩ B] = P [A]P [B]
P [B ∩ C] = P [B]P [C]
P [A ∩ C] = P [A]P [C]
P [A ∩ B ∩ C] = P [A]P [B]P [C].
a) A ∩ (B − C) = (A ∩ B) − (A ∩ C),
b) A − (A ∩ B) = A − B.
3. Sketch A − B for
a) A ⊂ B,
b) B ⊂ A,
c) A and B are disjoint.
6 Basics of Probability Theory
9. Consider an elevator in a building with four stories, 1-4, with 1 being the
ground floor. Three people enter the elevator on floor 1 and push buttons for
their destination floors. Let the outcomes be the possible stopping patterns
for all passengers to leave the elevator on the way up. For example, 2-2-4
means the elevator stops on floors 2 and 4. Therefore,
2-2-4 is an outcome in S.
10. This problem requires the use of event spaces. Consider a random exper-
iment and four events A, B, C, and D such that A and B form an event
space and also C and D form an event space. Furthermore, P [A ∩ C] = 0.3
and P [B ∩ D] = 0.25.
a) Find P [A ∪ C].
b) If P [D] = 0.58, find P [A].
a) P [A ∪ B] ≤ P [A] + P [B].
b) P [A ∩ B] ≥ P [A] + P [B] − 1.
12. This problem requires the law of total probability and conditional
probability. A study on relation between the family size and the number
of cars reveals the following probabilities.
Number of Cars
0 1 2 More than 2
Family size
S: Small (2 or less) 0.04 0.14 0.02 0.00
M: Medium (3, 4 or 5) 0.02 0.33 0.23 0.02
L: Large(more than 5) 0.01 0.03 0.13 0.03
13. A communication channel model is shown Fig. 1.1. The input is either 0 or
1, and the output is 0, 1 or X, where X represents a bit that is lost and not
arrived at the channel output. Also, due to noise and other imperfections,
the channel may transmit a bit in error. When Input = 0, the correct output
(Output = 0) occurs with a probability of 0.8, the incorrect output (Output
= 1) occurs with a probability of 0.1, and the bit is lost (Output = X)
with a probability of 0.1. When Input = 1, the correct output (Output = 1)
occurs with a probability of 0.7, the wrong output (Output = 0) occurs with
a probability of 0.2, and the bit is lost (Output = X) with a probability of
0.1. Assume that the inputs 0 and 1 are equally likely (i.e. P [0] = P [1]).
14. This problem requires Bayes’ theorem. Considering all the other evidences
Sherlock was 60% certain that Jack is the criminal. This morning, he found
1.10 Illustrated Problems 9
Input Output
0 0
1 1
another piece of evidence proving that the criminal is left handed. Dr.
Watson just called and informed Sherlock that on average 20% of people are
left handed and that Jack is indeed left handed. How certain of the guilt of
Jack should Sherlock be after receiving this call?
15. This problem requires Bayes’ theorem. Two urns A and B each have 10
balls. Urn A has 3 green, 2 red and 5 white balls and Urn B has 1 green, 6
red and 3 white balls. One urn is chosen at (equally likely) and one ball is
drawn from it (balls are also chosen equally likely)
16. Two urns A with 1 blue and 6 red balls and B with 6 blue and 1 red balls
are present. Flip a coin. If the outcomes is H, put one random ball from A
in B, and if the outcome is T , put one random ball from B in A. Now draw
a ball from A. If blue, you win. If not, draw a ball from B, if blue you win,
if red, you lose. What is the probability of wining this game?
17. Two coins are in an urn. One is fair with P [H] = P [T ] = 0.5, and one is
biased with P [H] = 0.25 and P [T ] = 0.75. One coin is chosen at random
(equally likely) and is tossed three times.
A C
18. Answer the following questions about rearranging the letters of the word
“toronto”
19. Consider a class of 14 girls and 16 boys. Also two of the girls are sisters. A
team of 8 players are selected from this class at random.
a) What is the probability that the team consists of 4 girls and 4 boys?
b) What is the probability that the team be uni-gender (all boys or all
girls)?
c) What is the probability that the number of girls be greater than the
number of boys?
d) What is the probability that both sisters are in the team?
20. In the network (Fig. 1.2), a data packet is sent from A to B. In each step,
the packet can be sent one block either to the right or up. Thus, a total of
9 steps are required to reach B.
R R
1
a b
R R
22. In a communication system the signal sent from point a to point b arrives
along two paths in parallel (Fig. 1.3). Over each path the signal passes
through two repeaters in series. Each repeater in Path 1 has a 0.05 prob-
ability of failing (because of an open circuit). This probability is 0.08 for
each repeater on Path 2. All repeaters fail independently of each other.
a) Find the probability that the signal will not arrive at point b.
A ∩ (B − C) = A ∩ (B ∩ C c ) = (A ∩ B) ∩ C c = (A ∩ B) ∩ C c
= (A ∩ B) − C.
(A ∩ B) − (A ∩ C) = (A ∩ B) ∩ (A ∩ C)c = (A ∩ B) ∩ (Ac ∪ C c )
= (A ∩ B ∩ Ac ) ∪ (A ∩ B ∩ C c )
3. a) null set
b)
(A – B) B
c)
S
A
(A – B) B
4. a) R1 ∪ R2 = {1, 2, 3, 4, 5, 6}
b) R4 ∩ R5 = {1, 3}
1.11 Solutions for the Illustrated Problems 13
c) R5c = {2, 4, 6}
d) (R1 ∪ R2 ) ∩ R3 = {2, 4, 6}
e) R1c ∪ (R4 ∩ R5 ) = {1, 3, 4, 6}
f) (R1 ∩ (R2 ∪ R3 ))c = {1, 3, 4, 6}
g) ((R1 ∪ R2c ) ∩ (R4 ∪ R5c ))c = {3, 4, 5, 6}
h) One solution is {1,2,3} and {4,5,6} which partition S to two disjoint
sets.
7. A = {V V I, V V D, V V V, V IV, V DV, IV V, DV V }
B = {DDD, DDI, DID, IDD}
nA
8. a) n
= 112+119+131
500
= 0.724
nB 85+43
n
= 500
= 0.256
nC 10
n
= 500
= 0.02
nA∪B∪C
b) n
= 500
500
=1
nA nB nC nA∪B∪C
n
+ n
+ n
= 0.724 + 0.256 + 0.02 = 1 = n
9. a) S = {2 − 2 − 2, 2 − 2 − 3, 2 − 2 − 4, 2 − 3 − 3, 2 − 3 − 4, 2 − 4 − 4,
3 − 3 − 3, 3 − 3 − 4, 3 − 4 − 4, 4 − 4 − 4}
b) There are 10 elements in S, thus the probability of each outcome is
1/10. To be mathematically rigorous, one can define 10 mutually exclu-
sive outcomes: E1 = {2−2−2}, E2 = {2−2−3}, . . ., E10 = {4−4−4}.
These outcomes are also collectively exhaustive.
Thus, using the second and the third axioms of probability, P [E1 ] +
P [E2 ] + ...P [E10 ] = P [S] = 1.
Now, since these outcomes are equally likely, each has P [Ei ] = 1/10.
c) E = {2 − 2 − 2, 2 − 2 − 4, 2 − 4 − 4, 4 − 4 − 4},
T = {2 − 2 − 3, 2 − 2 − 4, 2 − 3 − 3, 2 − 4 − 4, 3 − 3 − 4, 3 − 4 − 4}
Thus, P [E] = 4/10, P [T ] = 6/10
d, e) E ∩ T = {2 − 2 − 4, 2 − 4 − 4}
E ∪ T = {2 − 2 − 2, 2 − 2 − 3, 2 − 2 − 4, 2 − 3 − 3, 2 − 4 − 4, 3 − 3 −
4, 3 − 4 − 4, 4 − 4 − 4}
Thus, P [E ∩ T ] = 2/10, P [E ∪ T ] = 8/10.
14 Basics of Probability Theory
10. A = B c and C = Dc
a) P [B ∩ D] = P [C c ∩ Ac ] = P [(A ∪ C)c ] = 1 − P [A ∪ C]
⇒ P [A ∪ C] = 0.75
b) P [A ∪ C] = P [A] + P [C] − P [A ∩ C]
⇒ P [A] = P [A ∪ C] − P [C] + P [A ∩ C]
P [C] = 1 − P [D] = 0.42
⇒ P [A] = 0.75 − 0.42 + 0.3 = 0.63
11. a) }
P [A ∪ B] = P [A] + P [B] − P [A ∩ B]
⇒ P [A ∪ B] ≤ P [A]+P [B]
P [A ∩ B] ≥ 0
Notice that from a) it can easily be concluded that
P [A ∪ B ∪ C ∪ · · ·] ≤ P [A] + P [B] + P [C] + · · ·
b) }
P [A ∪ B] = P [A] + P [B] − P [A ∩ B]
⇒ P [A]+P [B]−P [A ∩ B] ≤
P [A ∪ B] ≤ 1
1
⇒ P [A ∩ B] ≥ P [A] + P [B] − 1
12. a) We define A to be the event that a random family has less than two
cars and N to be number of cars.
P [A ∩ S] = P [N = 0 ∩ S] + P [N = 1 ∩ S] = 0.04 + 0.14 = 0.18
P [A ∩ M ] = P [N = 0 ∩ M ] + P [N = 1 ∩ M ] = 0.02 + 0.33 = 0.35
P [A ∩ L] = P [N = 0 ∩ L] + P [N = 1 ∩ L] = 0.01 + 0.03 = 0.04
P [A] = P [A ∩ S] + P [A ∩ M ] + P [A ∩ L] = 0.18 + 0.35 + 0.04 = 0.57
d)
P [ out=1|in=1]·P [in=1]
13. a) P [ in = 1| out = 1] = P [ out=1|in=1]·P [in=1]+P [ out=1|in=0]·P [in=0]
0.7·0.5
= 0.7·0.5+0.1·0.5 = 0.875
P [ out=X|in=1]·P [in=1]
b) P [ in = 1| out = X] = P [ out=X|in=1]·P [in=1]+P [ out=X|in=0]·P [in=0]
0.1·0.5
= 0.1·0.5+0.1·0.5 = 0.5
P [ out=X|in=0]·P [in=0]
P [ in = 0| out = X] = P [ out=X|in=1]·P [in=1]+P [ out=X|in=0]·P [in=0]
0.1·0.5
= 0.1·0.5+0.1·0.5 = 0.5
or
P [ in = 0| out = X] = 1 − P [ in = 1| out = X] = 1 − 0.5 = 0.5.
c) P [0] + P [1] = 1 ⇒ 3P [1] + P [1] = 1 ⇒ P [1] = 0.25
P [ out=1|in=1]·P [in=1]
P [ in = 1| out = 1] = P [ out=1|in=1]·P [in=1]+P [ out=1|in=0]·P [in=0]
⇒ P [ in = 1| out = 1] = 0.7·0.25+0.1·0.75
0.7·0.25
= 0.7
c) Let A & B denote drawing the first ball from urn A & B respectively.
Then
16 Basics of Probability Theory
e) yes.
( )
7 7!
18. a) = (3!)·(2!)·(1!)·(1!)
= 420
3, 2, 1, 1
b) For every arrangement that r appears before n, there is a counterpart
where n appear before r (just interchange r and n). Thus in half of the
arrangements r appears before n. The answer, therefore, is 420
2
= 210.
6!
c) The middle letter can be t, r or n. If t, we have 3!
= 120 arrangements.
6!
If r (or n), we have (3!)·(2!) = 60 arrangements.
Total = 120 + 60 + 60 = 240.
1.11 Solutions for the Illustrated Problems 17
(144)(164) 1001×1820
19. a) = = 0.31
(308) 5852925
(148)(160) 3003×1
b) P [all girl] = = 5852925 = 0.000513
(308)
(14)(16)
P [all boy] = 0 30 8 = 1×12870 = 0.0022
(8) 5852925
Therefore,
P [one gender] = 0.0022 + 0.00051 = 0.00271
c)
( )( ) ( )( ) ( )( ) ( )( )
14 16 14 16 14 16 14 16
8 0
+ 7 1
+ 6 2
+ 5 3
P [g > b] = ( )
30
8
3003 + 54912 + 360360 + 1121120
= = 0.263
5852925
(286)(22) 376740
d) = = 0.064
(308) 5852925
20. a) We can look at this question as follows: from the 9 steps, 4 needs to
be upward and 5 to be to the right. Therefore, out of 9 steps we want
to pick 4 upward ones.
( ) We get,
Number of paths = 94 = 126.
( )
4
b) Number of paths from A to C (similar part a) is and number
( ) 2
5
of paths from C to B is . Thus the number of all paths from A
3 ( ) ( )
to B which pass through C is 4
2
· 5
3
. So the required probability
(4)·(5)
P [C] = 2 9 3 = 6×10 = 0.476.
(4) 126
21. a)
if X = +2 if X = −2
HH HT or T H TT HH HT or T H TT
Y 0 +1 +2 Y 0 -1 -2
S = {(+2, 0), (+2, +1), (+2, +2), (−2, 0), (−2, −1), (−2, −2)}
b) E = {+1, +2}
c) {Y = 0} ={number of heads tossed was 2}
d)
1.11 Solutions for the Illustrated Problems 19
(X,Y) Probability
HH (+2,0) 1/8
1/4
1/2 1/4
TT (+2,+2) 1/8
HH (-2,0) 1/8
1/4
1/2
1/2 HT or TH (-2,-1) 1/4
-2
1/4
TT (-2,-2) 1/8
g) P [X = 2|Y = 0] = P [X=2,Y
1/4
=0]
= 1/2
Similarly, P [X = +2|Y = +1] = 1, P [X = +2|Y = +2] = 1,
P [X = +2|Y = −1] = P [X = +2|Y = −2] = 0.
22. a)
Ans
a) S = {1, 2, 3, 4, 5, 6}
b) P [A] = 0.5
3
c) P [A] = 7
2. An unbiased 4-sided die is tossed. Let the events A and B be defined as:
A =‘outcome is a prime number’ and B = {4}.
Ans
Ans
a) S = {(1, 1), (1, 2), (1, 3), (1, 4),
(1, 5), (1, 6), (2, 1), (2, 2), (2, 3),
(2, 4), (2, 5), (2, 6), (3, 1), (3, 2),
(3, 3), (3, 4), (3, 5), (3, 6), (4, 1),
(4, 2), (4, 3), (4, 4), (4, 5), (4, 6),
(5, 1), (5, 2), (5, 3), (5, 4), (5, 5),
(5, 6), (6, 1), (6, 2), (6, 3), (6, 4),
(6, 5), (6, 6)}
b) A = {(2, 1), (2, 2), (2, 3), (2, 4)},
B = {(1, 2), (2, 2), (3, 2), (4, 2)},
P [A] = 61 , P [B] = 16
c) A ∩ B = {(2, 2)}, P [A ∩ B] = 36 1
d) P [A ∪ B] = 11 36
e) no
f) yes
22 Basics of Probability Theory
Ans
a) P [A ∩ B] = 0, P [A ∪ B] = 0.375,
P [A ∩ B c ] = 0.25, P [A ∪ B c ] = 0.875
b) no
c) P [C ∩ D] = 0.2344, P [C ∩ Dc ] = 0.3906,
P [C c ∩ Dc ] = 0.2344
d) yes
e) P [A|B] = 0, P [B|A] = 0
f) P [C|D] = 0.625, P [D|C] = P [D] = 3/8
Ans
capacitors diodes
B1 3 3
B2 1 5
Ans
b) 0.6667
c) 0.25
d) 0.75
24 Basics of Probability Theory
Ans
( )
100
a) P [k] = k
q k (1−q)100−k
b) {( )
98
k
q k (1−q)100−k , k ∈ {0,..,98}
0 , k ∈ {99, 100}
c) {( )( )
k
1− 100 k
1− 99 , k ∈ {0,..,98}
0 , k ∈ {99, 100}
9. In a binary digital communication channel the transmitter sends symbols
{0, 1} over a noisy channel to the receiver. Channel introduced errors may
make the symbol received to be different from what transmitted.
Let Si = {the symbol i is sent} and Ri = {the symbol i is received}, where
i ∈ {0, 1}.
Relevant symbol and error probabilities are tabulated below.
Ans
b) 0.08
c) 0.9643
d) 0.0357
Ans
b) 0.095
c) 0.9563
d) 0.026
e) 0.0177
26 Basics of Probability Theory
Ans
b) 0.1536
c) 0.9298
d) 0.0344
12. A machine produces photo detectors in pairs. Tests show that the first photo
detector is acceptable with probability 0.6. When the first photo detector is
acceptable, the second photo detector is acceptable with probability 0.85. If
the first photo detector is defective, the second photo detector is acceptable
with probability 0.35.
Let Ai the event ‘i-th photo detector is acceptable’.
Ans
b) P [(Ac1 ∩ A2 ) ∪ (A1 ∩ Ac2 )] = 0.74
c) P [Ac1 ∩ Ac2 ] = 0.49
d) P [A1 |A2 ] = 0.7846
Figure 1.5: a system that includes both series and parallel subsystems
2.1 Definitions
FX (r) = P [X ≤ r]
• FX (−∞) = 0, FX (∞) = 1.
• If xj ≥ xi , FX (xj ) ≥ FX (xi ).
where α > 0.
2.5 Averages
Theorem 2.3:
i.e., P [Y = y] is the sum of the probabilities of all the events X = x for which
g(x) = y.
Theorem 2.5: Given X with PMF PX (x) and Y = g(X), the expected value
of Y is ∑
E[Y ] = µY = E[g(X)] = g(x)PX (x).
x∈SX
2.8 Variance and Standard Deviation 33
Theorem 2.6:
VAR[X] = E[X 2 ] − (E[X])2
VAR[aX + b] = a2 VAR[X]
Theorem 2.8:
P [X = x, B] P [B] , x ∈ B
P [X=x]
Theorem 2.9: For B ⊂ SX , PX|B (x) = = .
P [B] 0, otherwise
I(X)
η= × 100%
E[L]
2.11 Illustrated Problems 35
2. An experiment consists of tossing a fair coin until either three heads or two
tails have appeared (not necessarily in a row). Let X be the number of
tosses required.
3. Ten balls numbered from 1 to 10 are in an urn. Four balls are to be chosen
at random (equally likely) and without replacement. We define a random
variable X which is the maximum of the four drawn balls (e.g., if the drawn
balls are numbered 3, 2, 8 and 6, then X = 8).
4. The Oilers and Sharks play a best out 7 playoff series. The series ends as
soon as one of the teams has won 4 games. Assume that Sharks (Oilers)
36 Discrete Random Variables
a) Find the value of k and the range of c for which this is a valid PMF.
b) For c = 0 and k found in part a, compute and plot the CDF of X.
c) Compute the mean and the variance of X.
7. Studies show that 20% of people are left handed. Also, it is known that 15%
of people are allergic to dust.
9. Phone calls received on a cell phone are totally random in time. Therefore
(as we proved in class), the number of telephone calls received in a 1 hour
period is a Poisson random variable. If the average number of calls received
during 1 hour is 2 (meaning that α = 2) answer the following questions:
a) What is the probability that exactly 2 calls are received during this one
hour period?
b) The cell phone is turned off for 15 minutes, what is the probability that
no call is missed.
c) What is the probability that exactly 2 calls are received during this one
hour period and both calls are received in the first 30 minutes?
d) Find the standard deviation of the number of calls received in 15 min-
utes.
11. Find the n-th moment and the n-th central moment of X ∼ Bernoulli(p).
38 Discrete Random Variables
a) Compute FX (x).
b) Compute E[X] and VAR [X].
c) Consider the function Y = 2X 2 . Find PY (y).
d) Compute E[Y ] and Var[Y ].
13. Consider a source sending messages through a noisy binary symmetric chan-
nel (BSC); for example, a CD player reading from a scratched music CD, or
a wireless cellphone capturing a weak signal from a relay tower that is too
far away.
For simplicity, assume that the message being sent is a sequence of 0’s and
1’s. The BSC parameter is p. That is, when a 0 is sent, the probability that
a 0 is (correctly) received is p and the probability that a 1 is (incorrectly)
received is 1 − p. Likewise, when a 1 is sent, the probability that a 1 is
(correctly) received is p and the probability that a 0 is (incorrectly) received
is 1 − p.
Let p = 0.97 for the BSC. Suppose the all-zero byte (i.e. 8 zeros) is trans-
mitted over this channel. Let X be the number of 1s in the received byte.
14.
c/(1 + x2 ), x = −3, −2, . . . , 3
PX (x) =
0, otherwise
c) Find E[X|B].
d) Find Var[X|B].
b)
A1 A1c A2 A1c A2c A3 A1c A2c Anc−1 An
S
SX 1 2 3 n
(1/2)t , t ∈ {1, 2, . . .}
c) PX (t) =
0, otherwise
0, t<1
..
d) FX (t) = .
1 + 1
+ ··· + 1
=1− 1
, n − 1 ≤ tt < n
2 4 2n−1 2n−1
or
0, t<1
FX (t) = ( )n−1
F (t − 1) + 1
, n−1≤t<n
X 2
2. a)
40 Discrete Random Variables
H H
1/2 1/2
1/2 1/2
H T T
1/2
T T
1/2
1/2 1/2 1/2
T H H H
1/2 1/2 1/2
T T T
1/4,
t=2
3/8,
t=3
c) PX (t) =
3/8, t = 4
0, otherwise
0,
t<2
1/4,
2≤t<3
d) FX (t) =
5/8, 3 ≤ t < 4
1, t≥4
3. a) SX = {4, 5, 6, 7, 8, 9, 10}
2.12 Solutions for the Illustrated Problems 41
b) The probability that x = n means one of these four balls is n and the
other three are chosen form n − 1 balls with number less than n.
( )( )
n−1 1
3 1 (n − 1).(n − 2).(n − 3)
P [X = n] = ( ) =
10 1260
4
1 4×3×2
P [X = 4] = 210 = 0.0048 P [X = 5] = 1260
= 0.019
5×4×3 6×5×4
P [X = 6] = 1260 = 0.048 P [X = 7] = 1260
= 0.095
P [X = 8] = 7×6×5
1260
= 0.167 P [X = 9] = 8×7×6
1260
= 0.267
9×8×7
P [X = 10] = 1260 = 0.4
c) P [X ≥ 7] = 0.095 + 0.167 + 0.267 + 0.4 = 0.929
b)
0, x < −2
1/12, x = −2
7/24, x = −1
FX (x) =
17/24, x = 0
22/24, x = 1
1, x≥2
42 Discrete Random Variables
6. a) r = 0, t = 1, 0.3 ≤ s ≤ 0.9
Recall that FX (−∞) = 0, FX (∞) = 1 and that FX (a) is non-decreasing.
b) P [a < X ≤ b] = FX (b) − FX (a)
P [2 < X ≤ 5] = FX (5) − FX (2) = 0.9 − 0.3 = 0.6
lim
c) P [X = 3] = (FX (3) − FX (3 − ε)) = s − 0.3
ε→0
lim
P [X = 4] = (FX (4) − FX (4 − ε)) = 0.9 − s
ε→0
s − 0.3 = 0.9 − s ⇒ s = 0.6
0,
a<1
0.3, 1 ≤ a < 3 0.3, t ∈ {1, 3, 4}
⇒ FX (a) = 0.6, 3 ≤ a < 4 ⇒ PX (t) = 0.1, t = 6
0.9, 4 ≤ a < 6 0, otherwise
1, 6≤a
∑
Notice that t PX (t) = 1
( )
7. a) X ∼ Binomial(40, 0.2) ⇒ P [X = 8] = 40
8
(0.2)8 (0.8)32
b) P [both] = 0.2 × 0.15 = 0.03 ⇒ Y ∼ Binomial(30, 0.03)
P [Y > 2] = 1 − P [Y
( = ) 0] − P [Y = 1] ( )
where P [Y = 0] = 0 (0.97)30 (0.03)0 , P [Y = 1] = 30
30
0
(0.97)29 (0.03)1
c) The last person tested is allergic (since the group is formed and no need
( ⇒
for more tests) ) Z ∼ Pascal(10, 0.15).
P [Z = 75] = 9 (0.15)10 (1 − 0.15)65
74
8. Award-winning cases all end with W and thus can be modeled with Pascal(10, 0.4).
2.12 Solutions for the Illustrated Problems 43
( )
10W → X = 10 → 9
(0.4)10 (0.6)0 =a
( 9)
10W, 1F → X = 11 → 10
(0.4)10 (0.6)1 =b
(9)
10W, 2F → X = 12 → 11
9
(0.4)10 (0.6)2 =c
P [$100] = a + b + c
d) For 15 minutes we saw that α = 0.5. We also know that for Poisson
RV VAR = α.√ √
Thus, std = VAR[X] = 0.5 = 0.71.
Alternative solution:
( )( ∑∞ ( )n−1
) ( )(∑ ∞ ( )m+12
)
P [failure] = P [X > 12] = 69
70
· 1
70
= 69
70
· 1
70
)12 (∑ )m )
n=13 m=0
( ) ( ∞( ( ) ( )12 ( )12
= 69
· 1 1
= 69
· 1
· 1
1
1−( 70
= 1
70 70 m 70 70 70 ) 70
Without
( )12
detailed derivation, it could be easily argued that the solution
1
is 70 . How?
d) The probability that Y = n n ≥ 100 is the probability that in the first
n − 1 transmissions, only 99 of them were successful and also the nth
transmission is also successful [In other words, Y is a Pascal(100, 69/70)
RV]. Therefore:
( ) ( )100 ( )n−100
P [Y = n] = n−199
· 70
69
· 701
44 Discrete Random Variables
k 100
e) Y is a Pascal random variable. Thus, E[Y ] = = = 101.45 and
p ( 69
70 )
VAR [Y ] = k(1 − p)/p2 = 1.47.
11. E[X n ] = 1n p + 0n q = p
E[(X − µ)n ] = E[(X − p)n ] = (1 − p)n p + (−p)n q
∑
3
12. a) c
1+x2
=1⇒c= 5
13
x=−3
so,
0, x < −3
1
, x = −3
26 1
26 , −3 ≤ x < −2
2
, x = −2
26
3
, −2 ≤ x < −1
5
26 ,
x = −1
4
26
10 13
, −1 ≤ x < 0
PX (x) = , x=0 FX (x) =
26
9,
0≤x<1
5
13
, x=1
26
23
, 1≤x<2
2
26
, x=2
26
,
25
2≤x<3
1, x=3
26
1,
26
x≥3
∑
3 ( )
5 x
b) E[X] = 13 1+x2
=0
x=−3
∑
3 ( )
x2
VAR[X] = E[X 2 ] − 0 = 5
13 1+x2
= 22
13
= 1.6923
x=−3
1
,
y = 18
13
2,
y=8
c) PY (y) = 13
5
13
, y ∈ {0, 2}
0, otherwise
d) E[Y ] = 18
13
16
+ 13 + 10
13
= 44
13
= 3.3846
182 82 ×2 22 ×5
E[Y ] = 13 + 13 + 13 = 472
2
13
VAR[Y ] = E[Y 2 ] − E[Y ]2 = 24.852
( )
8 (0.03)x (0.97)8−x , x = 0, 1, . . . , 8
x
13. a) PX (x) =
0, otherwise
It is Binomial distribution with n = 8, p = 0.03.
∑
8
b) E[X] = xPX (x) = np = 8 × 0.03 = 0.24
x=0
VAR[X] = npq = 8 × 0.03 × 0.97 = 0.2328
c) E = {X is even and X ̸= 0} = {undetectable error} P [E] = PX (2) +
PX (4) + PX (6) + PX (8) = 0.02104
2.12 Solutions for the Illustrated Problems 45
( )
5
14. a) P (B) = 13
1 + 12 + 15 + 1
10
= 9
13
5
x=0
,
9
5,
x=1
18
1
PX|B (x) = 9 , x = 2
1
, x=3
18
0, otherwise
0,
x<0
0≤x<1
5
9,
b) FX|B (x) = 6 , 1 ≤ x < 2
5
18 , 2 ≤ x < 3
17
1, x ≥ 3
5
c) E[X|B] = + 29 + 18
3
= 23
18 ( )2
E[X 2 |B] = 185
+ 49 + 189
= 119
⇒ VAR[X|B] = 11
9
− 2
3
= 7
9
b)
P [X = 0|B] =0
P [X = 1|B] = P [X]P [B|X]
P [B]
= 0.198×1
0.198+0.254+0.047+0.001
= 0.396
P [X = 2|B] =0
P [X = 3|B] = 0.508
P [X = 4|B] =0
P [X = 5|B] = 0.094
P [X = 6|B] =0
P [X = 7|B] = 0.002
P [X = 8|B] =0
∑
c) E[X|B] = kP [X = k|B] = 1×0.396+3×0.508+5×0.094+7×0.002 =
k
2.4
∑
d) E[X 2 |B] = k 2 P [X = k|B] = 12 × 0.396 + 32 × 0.508 + 52 × 0.094 +
k
72 × 0.002 = 7.42
VAR [X|B] = E[X 2 |B] − (E[X|B])2 = 7.42 − 2.42 = 1.64
46 Discrete Random Variables
Ans
0 k<0
1/6 0 ≤ k < 1
a) 1/6 b) (i) 1/2 (ii) 1 (iii) 1/3 c) FK [k] =
1/2 1 ≤ k < 2
1 k≥2
Ans
0 n<0
4/7 0 ≤ n < 1
a) 4/7 b] 6/7 c) 6/7 [d) FN [n] =
6/7 1 ≤ n < 2
1 n≥2
Ans
0 x<2
4/7 2 ≤ x < 4
a) 8/7 b) 2/7 c) 4/7 d) 3/7 [e) FX [x] =
6/7 4 ≤ x < 8
1 x≥8
f) E[X] = 24/7,VAR[X] = 208/49
a) Show that PK (k) is a proper PMF. What is the name of this RV?
b) What is P [K > 1]?
c) What is P [2 ≤ K ≤ 4]?
d) Compute E[K] and VAR[K] of K.
Ans
( )
[a) Poisson(λ) b) 1 − e−λ − λe−λ c) λ2
2
+ λ3
6
+ λ4
24
e−λ
d) E[K] = VAR[K] = λ
5. Let X be the random variable that denotes the number of times we roll a
fair die until the first time the number 5 appears.
Ans
{
5x−1
6x
x = 1, 2, . . .
a) PX (x) = Geometric(1/6)
0 otherwise
( )⌊x⌋
b) FX (x) = 1 − 6 x≥1
5
0 otherwise
c) E[K] = 6, VAR[X] = 30
6. Let X be the random variable that denotes the number of times we roll a
fair die until the first time the number 3 or 5 appears.
Ans
{
2x−1
3x
x = 1, 2, . . .
a) PX (x) = Geometric(1/3)
0 otherwise
( )⌊x⌋
b) FX (x) = 1 − x≥1
2
3 [c) E[K] = 3, VAR[X] = 6
0 otherwise
7. A random variable K has the PMF
( )
5
PK (k) = (0.1)k (0.9)5−k , k ∈ {0, 1, 2, 3, 4, 5}.
k
Ans
a) What is the probability that at least two calls arrive within one hour?
b) What is the probability that at most three calls arrive within one hour?
2.13 Drill Problems 49
c) What is the probability that the number of calls that arrive within one
hour is greater than three but less than or equal to six?
Ans
Calculate the mode, expected value and the variance of this random variable.
Ans
mode = 0, expected value = 1/2, variance = 3/4
10. A recruiter needs to hire 10 chefs. He visits NAIT first and interviews only
10 students; because of high demand he can’t get more students to sign up
for an interview. He knows that the probability of hiring any given NAIT
chef is 0.4. He then goes to SAIT and keeps interviewing until his quota is
filled. At SAIT the probability of success on any given interview is 0.8, and
plenty of students are looking for jobs. Let X be the number of chefs hired
at NAIT, Y the number hired at SAIT, and N = the number of interviews
required to fill his quota.
a) Find PX (x)
b) Find E[X]
c) Find E[Y ]
d) Find E[N ]
Ans
a) B10 (x, 0.4) b) 4.0 c) 6.0 d) 17.5
Ans
1/6 k = 0
0 k<0
1/3 k = 1 1/6 0 ≤ k < 1
a) 1/6 b) PY (k) = , and FY (k) = .
1/2 k = 4
1/2 1 ≤ k < 4
0 otherwise 1 k≥4
2/3 k = 0
0 k<0
c) PZ (k) = 1/3 k = 1 , and FZ (k) = 2/3 0 ≤ k < 1 .
0 otherwise 1 k≥1
Ans
Ans
Ans
1/3 k = 0
a) 1/6 b) 1/2 c) PK|B (k) = 2/3 k = 1
0 otherwise
d) E[K|B] = 2/3, VAR[K|B] = 2/9
Ans
a) 5 b) 3
16. An exam has five problems in it, each worth 20 points. Let N be the num-
ber of problems a student answers correctly (no partial credit). The PMF
of N is PN (0) = 0.05, PN (1) = 0.10,PN (2) = 0.35,PN (3) = 0.25,PN (4) =
0.15,PN (5) = 0.1, zow.
Ans
a) G = 20N b) PG (20x) = PN (x) for x = 0, 1, 2, 3, 4, 5 c) 55.8 d) 530
17. You rent a car from the Fly-by-night car rental company. Let M represent
the distance in miles beyond 100 miles that you will be able to drive before
the car breaks down. If the car has a good engine, denoted as event G, then
M is Geometric(0.03). Otherwise it is Geometric(0.1). Assume further that
P [G] = 0.6.
a) What is the PMF of M , given that the engine is bad? What is E[M ]
and VAR[M ] in this case ?
b) What is the PMF of M generally?
c) What is the probability of the successful completion of a trip of 120
miles without the engine failure?
d) What is your expected distance to travel before engine failure?
Ans
a) PM (m) = 0.1 × (0.9)m−1 , E[M ] = 10, V AR[M ] = 90 b) 0.04 × 0.9m−1 +
0.018 × 0.97m−1 c)0.3904 d) 124 miles
2.13 Drill Problems 53
19. Construct a Huffman code for five symbols with probabilities 1/2, 1/4, 1/8, 1/16, 1/16.
Show that the average length is equal to the source information.
Ans
1.875
20. The types and numbers of vehicles passing a point in a road are to be
recorded. A binary code is to be assigned to each type of vehicle and the
appropriate code recorded on the passage of that type. The average num-
bers of vehicles per hour are as follows:
Design a Huffman code. Find its efficiency and compare it with that of
a simple equal-length binary code. Comment on the feasibility and useful-
ness of this system.
Chapter 3
1. FX (−∞) = 0
2. FX (∞) = 1
1. fX (x) ≥ 0
∫∞
2. −∞ fX (x) dx = 1
∫x
3. FX (x) = −∞ fX (t) dt
∫b
4. P [a < X ≤ b] = a fX (x) dx
You can use this theorem to calculate the moments and the variance.
Definition 3.5: If Y = g(X) = (X − µX )2 , then E[Y ] measures the spread of
X around µX .
∫ ∞
VAR[X] = 2
σX = E[(X − µX ) ] =2
(x − E[X])2 fX (x) dx.
−∞
3.4 Families of Continuous Random Variables 57
VAR[aX + b] = a2 VAR[X]
where b > a.
where λ > 0.
58 Continuous Random Variables
Definition 3.10: The standard normal random variable Z is the N (0, 1) RV.
The CDF is ∫ z
1 u2
FZ (z) = P [Z ≤ z] = √ e− 2 du = Φ(z).
−∞ 2π
The tabled values of Φ(z) are used to find FX (x). Note that Φ(−z) = 1 − Φ(z).
dFY (y)
fY (y) = .
dy
Theorem 3.13: Let X ∼ Uniform(0,1) and let F (x) denote CDF with an
inverse F −1 (u) defined for 0 < u < 1. The RV Y = F −1 (X) has CDF F (y).
We use this theorem to calculate the conditional moments and the variance.
0,
x < −1
a) F (x) = x2 , |x| ≤ 1
1, 1 < x
0,
x<0
x2
b) F (x) =
2
, 0≤x≤1
1, 1<x
3.8 Illustrated Problems 61
0,
x<0
c) F (x) = sin(x), 0 ≤ x ≤ π
2
π
1, 2
<x
0, x ≤ −4
d) F (x) =
1 − exp(−a(x + 4)), −4 < x
a) What is the probability that a light bulb purchased at random will last
at least five months?
b) Given that a light bulb has last more than five months, what is the
probability that it is manufactured by plant A?
10. A study shows that the height of a randomly selected Canadian man is a
Gaussian random variable with mean 175 cm and standard deviation 10 cm.
A random Canadian man is selected. Given that his height is at least 165 cm,
answer the following:
λ −λ|x|
fX (x) = e , −∞ < x < ∞
2
a) For λ = 1, find the conditional PDF of X given that |X| > 2.
b) For λ = 1, find E[X||X| > 2].
13. Let Xbe uniform RV on [0, 2]. Compute the mean and variance of Y = g(X)
where
0, x<0
2x, 0 ≤ x < 21
g(x) =
2 − 2x, 21 ≤ x < 1
0, 1<x
Repeat the above if X is exponential with a mean of 0.5.
∫∞ ∫1 1 2 8+1
d) E[Y 2 ] = y 2 f (y)dy = 3
y dy = 9
=1
−∞ −2
VAR [Y ] = E[Y 2 ] − E 2 [Y ] = 0.75
e) FY (a) = 1 − FY (a) ⇒ FY (a) = 0.5 ⇒ y = −0.5
∫a
3. a) Solving (3 − 4x) dx = 1 ⇒ 3a − 2a2 = 1 we get a ∈ {0.5, 1}.
0
PDF fX (x) is non-negative only if 3 − 4a ≥ 0 ⇒ a ̸= 1.
Therefore, a = 0.5
∫a
b) E[X 3 ] = x3 (3 − 4x)dx = 0.75a4 − 0.8a5 = 0.0219
0
∫∞ ∫4
4. a) fX (x)dx = 1 ⇒ (cx + 1)dx = 0.5 ⇒ 6c + 2 = 0.5 ⇒ c = −0.25
−∞ 2
x≤0
0,
∫x x,
0<x≤2
b) FX (x) = fX (x)dx = 4 x2
−∞
−1 + x − 8 , 2 < x ≤ 4
1, x>4
c) P [1 < X < 3] = P [1 < X ≤ 3] = FX (3)−FX (1) = 0.875−0.25 = 0.625
7. Let X be a random variable denoting the height of a Canadian man (in cm)
under consideration. Then we know that, X ∼ N (175, 100).
[ ] [ ]
a) P [X > 165] = P X−175
10
> −1 = 1 − P X−175
10
≤ 1 = 1 − Φ(1) =
0.84134 = 84.134%
b)
8. The conditional PDFs fX|A (x) = 0.25e−0.25x , x ≥ 0 and fX|B (x) = 0.5e−0.5x , x ≥
0 of life time X of a bulb are known, given the plant which manufactured
it. We also know that P [B] = 3P [A].
F (x)
, x < −2
P [|X|>2]
11. a) FX (x| |X| > 2) = P [|X|>2,X≤x]
= F (−2)
, −2 ≤ x ≤ 2
P [|X|>2]
P [|X|>2]
F (x)−P [|X|<2] ,
P [|X|>2]
x>2
−2
P [|X| > 2] = e
Therefore, the PDF is equal to
2−|x|
2 , x < −2
e
c)
∫∞ ∫∞
E[Z] = x2 fx (x) dx = 1
10
x2 e−x/10 dx = 100 × Γ(3) = 200
−∞ 0
∫∞ ∫∞
E[Z 2 ] = x4 fx (x)dx = 1
10
x4 e−x/10 d = 10000 × Γ(5) = 240000
−∞ 0
VAR[Z] = 240000 − 40000 = 200000
∫∞
E[Y ] = E[g(X)] = g(x)fX (x) dx
−∞
∫
1/2 ( ) ∫1 ( )
= 2x 1
2
dx + (2 − 2x) 1
2
dx = 1
4
0 1/2
∫∞
E[Y 2 ] = E[g 2 (X)] = (g(x))2 fX (x)dx
−∞
∫
1/2 ( ) ∫1 ( )
= (2x)2 1
2
dx + (2 − 2x)2 1
2
dx = 1
6
0 1/2
( )2
VAR[Y ] = E[Y ] − (E[Y ]) =2 2 1
6
− 1
4
= 0.1042
For the exponential case
For X ∼ Exponential(λ), we know that E[X] = λ1 . Therefore, we find λ = 2
and PDF fX (x) = 2e−2x , x ≥ 0.
∫∞
E[Y ] = E[g(X)] = g(x)fX (x)dx
−∞
∫1/2 ( ) ∫1 ( )
−2x
= 2x 2e dx + (2 − 2x) 2e−2x dx = 0.3996
0 1/2
∫∞
E[Y 2 ] = E[g 2 (X)] = (g(x))2 fX (x)dx
−∞
∫1/2 ( ) ∫1 ( )
−2x
= (2x) 2
2e dx + (2 − 2x)2 2e−2x dx = 0.2578
0 1/2
14.
∫∞ ∫2
P [A] = P [W > 1] = fW (w)dw = (w − 1)dw = 1
2
1 1
∫
1.5 ∫1 ∫
1.5
P [B] = P [0.5 < W < 1.5] = fW (w)dw = (1 − w)dw + (w − 1)dw = 1
4
0.5 0.5 1
a) Conditioning on A we get,
2(w − 1), 1 ≤ w ≤ 2
fW |A (w) =
0, otherwise
∫w
w<1 0,
b) FW |A (w) = fW |A (t)dt = (w − 1) , 1 ≤ w < 2 2
−∞
1, w≥2
3.10 Drill Problems 69
c) Conditioning on B we get,
4(1 − w), 0.5 < w < 1
fW |B (w) = 4(w − 1), 1 < w < 1.5
0, otherwise
0, w < 0.5
( )
∫w w − 12 (3 − 2w), 0.5 ≤ w ≤ 1
d) FW |B (w) = fW |B (t)dt =
−∞
0.5 + 2(w − 1)2 , 1 ≤ w < 1.5
1, w ≥ 1.5
Ans
a) 1/4 b) 5/8 c) 1/2 d) 0.6
e) {
1/2 , −1 ≤ x ≤ 1
fX (x) =
0 , otherwise
a) the constant c,
b) P [0 ≤ X ≤ 1],
c) P [−1/2 ≤ X ≤ 1/2],
d) the CDF FX (x).
Ans
a)1/2 b) 1/4 c) 1/16
d)
0 ,x < 0
FX (x) = x2 /4 , 0 ≤ x ≤ 2
1 ,x > 2
Ans
a) What is E[U ]?
b) What is VAR[U ]?
c) What is E[2U ]?
Ans
a) 2 b) 37/3 c) 13.001
6. You take bus to the university from your home. The time X for this trip
is uniformly distributed between 40 and 55 minutes. (a) Find E[X] and
VAR [X], (b) the probability that it takes more than 50 minutes. (c) The
probability that it takes less than 45 minutes.
Ans
a) E[X] = 47.5 min. Var[X] = 18.75 min2 .
b)1/3 c) 1/3
7. Let X be uniform RV on [0, 2]. Compute the mean and variance of Y = g(X)
where
0
x<0
2x 0 < x < 12
g(x) =
2 − 2x 12 < x < 1
0 1 < x.
Ans
case: X ∼ Uniform(0,2)
E[Y] = 1/4 Var[Y] = 5/48
72 Continuous Random Variables
8. The random variable X, which represents the life time in years of a commu-
nication satellite, has the following PDF:
0.4e−0.4v v≥0
fX (v) =
0 otherwise
10. X is a Erlang(3, 0.2). Calculate the value of P [1.3 < X < 4.6].
Ans
0.0638
Ans
a) 0.8068 b) 0.00394 c) 23, 48 d) 0.9995
a) The random variable is positive on 32% of the trials. What is the mean
value?
b) This random variable is changed to another Gaussian random variable
through the linear transformation Y = X2 + 1. Find the expected value
of Y .
c) Find the variance of Y .
d) Find the mean of the square of Y .
Ans
a) -1.871 b) 0.0646 c) 4 d) 4.0042
Ans
a)
1
√ 0≤y≤4
4 y
fY (y) =
0 otherwise
0√
y<0
y
FY (y) =
2
0≤y≤4
1 y>4
b)E[Y]=4/3 c)Var[Y]=64/45
Ans
a)
fY (y) = 0.5 for y ∈ {1, 2}, ZOW.
0
y<1
FY (y) =
0.5 1 ≤ y < 2
1 y≥2
b)E[Y]=3/2 c)Var[Y]=1/4
and let B be the event B = {X > 2}. What are fX|B (x), µX|B , and σX|B
2
?
Ans
2−x
1e 3 x>2
3
fX|B (x) =
0 otherwise
2
µX|B = 4.9997, σX|B = 9.0007
17. X is Gaussian with a mean of 997 and a standard deviation of 31. What is
the probability of B where B = {X > 1000}? And what is the pdf for X
conditioned by B?
Ans
P [X > 1000] = 0.4615
fX (x)
x > 1000
P [X>1000]
fX|B (x) =
0 otherwise
Chapter 4
Theorem 4.1: The joint PMF PX,Y (x, y) has the following properties
Theorem 4.2: For discrete RV’s X and Y with joint PMF PX,Y (x, y), the
marginals are ∑
PX (x) = PX,Y (x, y) and
y∈SY
∑
PY (y) = PX,Y (x, y).
x∈SX
76 Pairs of Random Variables
Theorem 4.3:
∂ 2 FX,Y (x, y)
fX,Y (x, y) =
∂x∂y
Theorem 4.4: A joint PDF fX,Y (x, y) satisfies the following two properties
Theorem 4.5: The probability that the continuous random variables (X, Y )
are in B is ∫∫
P [B] = fX,Y (x, y)dxdy.
(x,y)∈B
Note -the expected value of W can be computed without its PMF or PDF.
Theorem 4.11: E[g1 (X, Y ) + · · · + gn (X, Y )] = E[g1 (X, Y )] + · · · + E[gn (X, Y )]
Theorem 4.13:
Cov[X,Y ]
Definition 4.5: The correlation coefficient of RV’s X and Y is ρX,Y = σX σY
.
Theorem 4.15: For event B, a region in the (X, Y ) plane with P [B] > 0,
{ PX,Y (x,y)
P [B]
(x, y) ∈ B
PX,Y |B (x, y) = .
0 otherwise
Theorem 4.17: For RV’s X and Y and an event B with P [B] > 0, the
conditional expected value of W = g(X, Y ) given B is
∑ ∑
g(x, y)PX,Y |B (x, y) discrete
E[W |B] = x∈SX y∈SY
∫ ∞ ∫ ∞ g(x, y)f
−∞ −∞ X,Y |B (x, y)dxdy continuous
.
4.8 Conditioning by an RV
Theorem 4.18: For discrete RV’s X and Y with joint PMF PX,Y (x, y) and x
and y such that PX (x) > 0 and PY (y) > 0,
This allows us to derive the joint PMF from conditional joint PMF and marginal
PMF.
4.9 Independent Random Variables 79
fX,Y (x, y)
fX|Y (x|y) =
fY (y)
fX,Y (x, y)
fY |X (y|x) = .
fX (x)
Theorem 4.19: X and Y are discrete RV’s. Find any y ∈ SY , the conditional
expected value of g(X, Y ) given Y = y is
∑
E[g(X, Y )|Y = y] = g(x, y)PX|Y (x|y).
x∈SX
Definition 4.8: For continuous RV’s X and Y , and any y such that fY (y) > 0,
the conditional expected value of g(X, Y ) given Y = y is
∫ ∞
E[g(X, Y )|Y = y] = g(x, y)fX|Y (x|y)dx.
−∞
To calculate the conditional moments, we need the conditional joint PMF and
PDF first.
Theorem 4.20: Iterated Expectation
E[E[X|Y ]] = E[X].
Discrete: PX,Y (x, y) = PX (x)PY (y). Continuous: fX,Y (x, y) = fX (x)fY (y),
Theorem 4.23: Bivariate Gaussian RV’s X and Y have the correlation coeffi-
cient ρX,Y = ρ.
Theorem 4.24: Bivariate Gaussian RV’s X and Y are uncorrelated if and only
if they are independent, i.e., ρ = 0 implies that X and Y are independent.
a) Find P [X < Y ].
b) Find E[Y ].
c) Find E[X|Y = 2].
X 0 1 2 3
Y
1 0.03 0.10 0.02 0.02
2 0.05 0.07 0.02 0.05
3 0.02 0.20 0.02 0.05
4 0.05 0.23 0.04 0.03
a) Find P [A].
b) Find the conditional PDF fX,Y |A (x, y).
c) Find the conditional PDF fX|A (x).
d) Find the conditional PDF fY |A (y).
a) Find E[XY ].
b) Find E[X 2 Y 2 ].
∫∫ ∫1 ∫2
3. a) fX,Y (x, y)dxdy = c x2 ydxdy = 1 ⇒ 2c
3
=1⇒c= 3
2
x=0 y=0
∫1 ∫1 1
b) P [Y < 1] = 1.5x2 dx ydy = 4
0 0
∫1 ∫x 3 ∫1 3
c) P [Y < X] = 1.5x2 ydydx = 4
x4 dx = 20
0 0 0
∫1 ∫2 25
d) P [Y > X 2 ] = 1.5x2 ydydx = 28
0 x2
f)
X
FU (u) = P [U < u] = P [ < u]
Y
∫2 ∫
uy
1.5x2 y dxdy, u < 0.5
y=0 x=0
=
∫1 x/u
∫
1 −
1.5x2 y dydx, u > 0.5
x=0 y=0
3.2u3 , u < 0.5
=
1 − 3
, u > 0.5
20u2
9.6u2 , u < 0.5
As a result: fU (u) =
0.3u−3 , u > 0.5
∫
f
X,Y (x, y)dy, −1 ≤ x ≤ 1
4. a) fX (x) =
0, otherwise
2
∫ 2.5x2 dy, −1 ≤ x ≤ 1
x
= 0
0, otherwise
4.12 Solutions for the Illustrated Problems 85
2.5x4 , −1 ≤ x ≤ 1
=
0, otherwise
b)
∫
f
X,Y (x, y)dx, 0 ≤ y ≤ 1
fY (y) =
0, otherwise
√
∫1 −∫ y
2.5x2 dx + 2.5x2 dx, 0 ≤ y ≤ 1
= √y −1
0, otherwise
( )
5 1 − y 3/2 , 0 ≤ y ≤ 1
3
=
0, otherwise
c)
∫ ∫1
E[X] = x fX (x)dx = 2.5 x5 dx = 0
−1
2
∫ 2
∫1 5
E[X ] = x fX (x)dx = 2.5 x6 dx = 7
−1
∫ ∫1 ( )
E[Y ] = y fY (y)dy = 5
3
y 1 − y 3/2 dy = 5
14
0
∫ ∫1 ( )
E[Y ] 2 2
= y fY (y)d = 5
3
y 2 1 − y 3/2 dy = 5
27
0
VAR[X] = E[X 2 ] − E 2 [X] = 5
− 0 = 57
7 ( )2
VAR[Y ] = E[Y 2 ] − E 2 [Y ] = 5
27
− 5
14
= 0.05763
∫∫ ∫1 ∫2
x
d) E[XY ] = xyfX,Y (x, y)dxdy = xy (2.5x2 ) dydx = 0
x=−1 0
⇒ COV [X, Y ] = E[XY ] − E[X]E[Y ] = 0 and ρx,y = √ COV [X,Y ]
=
VAR[X]VAR[Y ]
0
∫∫ ∫∞ ∫∞
5. a) fX,Y (x, y)dxdy = k e−3x−2y dxdy = k
6
=1⇒k=6
0 0
∫∞
∫ 6 e−3x−2y dy, x≥0
fX (x) = fX,Y (x, y)dy = 0
0, otherwise
3e−3x , x≥0
=
0, otherwise
∞
∫
∫ 6 e−3x−2y dx, y≥0
fY (y) = fX,Y (x, y)dy = 0
0, otherwise
2e−2y , y≥0
=
0, otherwise
86 Pairs of Random Variables
∫ ∫∞
b) E[X] = x fX (x)dx = 3 xe−3x dx = 1
3
0
∫ ∫∞ ( )2
E[X ] = 2 2
x fX (x)dx = 3 x2 e−3x dx = 2
9
⇒ VAR[X] = 2
9
− 1
3
= 1
9
0
∫ ∫∞
E[Y ] = y fY (y)dy = 2 ye−2y dx = 1
2
0
∫ ∫∞ ( )2
E[Y ] =2 2
y fY (y)dy = 2 y 2 e−2y dy = 2
4
⇒ VAR[X] = 2
4
− 1
4
= 1
4
0
c) Yes; because fX,Y (x, y) = fX (x)fY (y) for every x and y.
∴ ρX,Y = 0 (because X and Y are uncorrelated)
∫∫ ∫∞ ∫x
6. a) fX,Y (x, y)dxdy = k e−3x−2y dydx = k
15
= 1 ⇒ k = 15
0 y=0
∫x
∫ 15 e−3x−2y dy, x≥0
fX (x) = fX,Y (x, y)dy = 0
0, otherwise
7.5 (e−3x − e−5x ) , x≥0
=
0, otherwise
∞
∫
∫ 15 e−3x−2y dx, y≥0
fY (y) = fX,Y (x, y)dy = y
0, otherwise
5e−5y , y≥0
=
0, otherwise
∫ ∫∞
b) E[X] = x fX (x)dx = 7.5 x (e−3x − e−5x ) dx = 8
15
0
∫ ∫∞
E[X 2 ] = x2 fX (x)dx = 7.5 x2 (e−3x − e−5x ) dx = 98
225
⇒ VAR[X] =
0
( )2
98
225
− 8
15
= 34
225
∫ ∫∞
E[Y ] = y fY (y)dy = 5 ye−5y dx = 1
5
0
∫ ∫∞ ( )2
E[Y ] =2 2
y fY (y)dy = 5 y 2 e−5y dy = 2
25
⇒ VAR[X] = 2
25
− 1
5
0
1
= 25
c) No; because ∫f∫X,Y (x, y) ̸= fX (x)fY (y)for some x and y.
E[XY ] = xy fX,Y (x, y)dxdy
∫∞ ∫x
= 15 xye−3x−2y dydx
x=0 y=0 ( )
∫∞ −3x
∫x
= 15 xe ye−2y dy dx
x=0 y=0
∫∞ ( )
1−(1+2x)e−2x
= 15 xe−3x 4
dx = 11
75
x=0
∴ By definition:
ρX,Y = √
E[XY ]−E[X]E[Y ]
√
= 11/75−(8/15)(1/5) = √1/25
34/75
= √3
34
= 0.5145
VAR[X]VAR[Y ] (34/225)(1/25)
4.12 Solutions for the Illustrated Problems 87
∫∫ ∫1 ∫
1−y
7. a) fX,Y (x, y)dxdy = c dxdy = c
2
=1⇒c=2
y=0 x=0
Consider the CDF ofZ.
0,
z<0
∫z ∫
z−x
FZ (z) = P [Z ≤ z] = 2 dydx, 0 ≤ z ≤ 1
x=0 y=0
1, z>1
0,
z<0
= z , 0≤z≤12
1, z > 1
2z, 0≤z≤1
d
fZ (z) = F (z)
dz Z
=
0, otherwise
∫1 2
b) E[Z] = 2z 2 dz = 3
0
∫1 ( )2
E[Z ] =2
2z 3 dz = 1
2
⇒ VAR[Z] = 1
2
− 2
3
= 1
18
0
∫
0.5 ∫1 1
8. a) P [A] = fX,Y (x, y)dxdy = 8
y=0 x=0
fX,Y (x,y) , A is True
1/8
b) fX,Y |A (x, y) =
0, A is False
8(x+y) , 0 ≤ x ≤ 1, 0 ≤ y ≤ 0.5
3
=
0, otherwise
∫
0.5 4x+1 , 0≤x≤1
c) fX|A (x) = fX,Y |A (x, y)dy = 3
0 0, otherwise
∫1 4(1+2y) , 0 ≤ y ≤ 0.5
3
d) fY |A (y) = fX,Y |A (x, y)dx =
0 0, otherwise
12. No, for example: if we know that X equals 2, then Y can only be zero. In
other words, information about X can change the probability of Y .
The other way to show this is to find marginal distributions and see that
the product of the marginal PDFs is not equal to the joint PDF.
4+6
13. From given data: E[X] = 5, VAR[X] = 15, E[Y ] = 2
= 5, VAR[Y ] =
(6−4)2
12
= 13
Ans
1, 0≤x≤3 1, 0≤y≤4
1
a) c = 12
b) fX (x) = 3 fY (y) = 4
0, otherwise 0, otherwise
c) Yes
Ans
a) c = 0.2
b) PX (x) = 0.5 for x ∈ {0, 1} and ZOW. PY (y) = 0.5 for y ∈ {0, 1} and
ZOW. No
3. Fig. 4.1 shows a region in the x-y plane where the bivariate PDF fX,Y (x, y) =
cx2 . Elsewhere, the PDF is 0.
Ans
3
a) c = 32 2 3
x (2−x) , −2 ≤ x ≤ 2 y +8 , −2 ≤ y ≤ 2
32 32
b) fX (x) = fY (y) =
0, otherwise 0, otherwise
4.13 Drill Problems 91
a) Find a and b.
b) Find the conditional PMF PX,Y |A (x, y), where the event A is defined
as {(x, y)|x ≤ y}.
c) Compute PX|A (x) and PY |A (y). Are X and Y still independent (even
when conditioned on A)? Can you explain why?
Ans
3/8, x = 0, y = 0
6/8, x = 0, y ∈ {0, 1}
a) a = 0.2; b = 0.2 b) PX,Y |A (x, y) =
2/8, x = 1, y = 1
0, otherwise
6/8,
x=0 6/8, y = 0
c) PX|A (x) = 2/8, x = 1 PY |A (y) = 2/8, y = 1
0, otherwise 0, otherwise
No. Conditioning creates a dependency.
Ans
a)
fX,Y |A (x, y)
3x2 , −2 ≤ x ≤ 0, 0 ≤ y ≤ 2
= 16
0, otherwise
3x2 , −2 ≤ x ≤ 0 1, 0≤y≤2
8 2
b) fX|A (x) = fY |A (y) = c) Yes
0, otherwise 0, otherwise
Ans
) ρ = −0.7; No
2
a) µX = µY = 0; σX = σY2 =(1 b)
x2
c) fX (x) = fY (x) = 2π exp − 2
√1
Chapter 5
5.1 Summary
5.1.1 PDF of sum of two RV’s
Continuous case
Theorem 5.1: The PDF of W = X + Y is
∫ ∞ ∫ ∞
fW (w) = fX,Y (x, w − x)dx = fX,Y (w − y, y)dy.
−∞ −∞
Discrete case
Theorem 5.3: The PMF of W = X + Y is
∑
PW (w) = PX,Y (x, w − x).
x
.
We use this theorem to calculate the PMF or PDF of a sum of independent RV’s.
Theorem 5.8 central limit theorem (CLT): Let Sn = X1 + X2 + · · · + Xn
be a sum of n i.i.d. RV’s with E[Xi ] = µ and VAR [X] = σ 2 . Then E[Sn ] = nµ
and VAR [Sn ] = nσ 2 . The following holds:
Sn − nµ
√ ∼ N (0, 1) as n → ∞.
nσ 2
We use this theorem to approximate the PMF or PDF of Yn when the PMF’s or
PDF’s of Xi are unknown but their means and variances are known to be identical.
3. Consider X ∼ N (0,2).
5. Random variable Y has MGF ϕY (s) = 1/(1 − s). X has MGF ϕX (s) =
1/(1 − 2s)2 . X and Y are independent. Let W = X + Y .
6. Telephone calls handled by a certain phone company can be either voice (V)
or data (D). The company estimates that P [V ] = 0.8 and P [D] = 0.2. All
telephone calls are independent of one another. Let X be the number of
voice calls in a collection of 100 telephone calls.
a) What is E[X]?
b) What is VAR[X]?
c) Use the CLT to estimate P [X ≥ 18].
d) Use the CLT to estimate P [16 ≤ X ≤ 24].
a) What is the probability that this month bill is $30? (meaning that the
total airtime is less than or equal to 300 minutes).
b) What is the probability that this month bill is more than $35?
8. A random walk in two dimensions is the following process: flop a fair coin
and move one unit in the +x direction if heads and one unit in the −x
direction if tails; flip another fair coin and move one unit in the +y direction
if heads and one unit in the −y direction if tails. This is one cycle. Repeat
the cycle 200 times. Let X and Y be the final position. Let Xk ∈ {+1, −1}
be the movement along the x axis during the k-th cycle. Let Yk ∈ {+1, −1}
be the movement along the y axis during the k-th cycle.
a) Give the exact PMF of X and find the exact probability that X exceeds
10 at the end of the process. Find the same probability using the CLT.
b) Find the exact probability that both X and Y exceeds 10 at the end
of the process. Find the same probability using the CLT.
c) Find the probability that the final position lies outside the circle cen-
tered on the origin and goes through (+10, +10).
we−w , 0≤w<∞
fW (w) =
0, otherwise
∫∞ 1, 0≤x≤1
2. a) fX (x) = −∞ fX,Y (x, y)dy =
0, otherwise
∫∞ 1, 0≤y≤1
fY (y) = −∞ fX,Y (x, y)dx =
0, otherwise
1,
0 ≤ x ≤ 1, 0 ≤ y ≤ 1
b) fX (x)fY (y) = = fX,Y (x, y)
0, otherwise
Therefore, X and Y are independent.
5.3 Solutions for the Illustrated Problems 97
7. Since the duration (airtime) Xk , k ∈ {1, . . . , 90} of each call is given to have
the distribution Xk ∼ Exponential(λ) such that E[Xk ] = 1/λ = 4(⇒ λ =
0.25), we know that σXk = 1/λ = 4.
∑90
Let X denote the total airtime (in minutes). Then, we have X = k=1 Xk .
∑90
Therefore, E[X] = k=1 E[Xk ] = 90(4) = 360 minutes.
Assuming
√∑ duration X√ k of the calls to be independent,
90 2
σX = k=1 σXk = 4 90 = 37.95 minutes.
b) Similarly, probability that the monthly bill is more than $35 is given
by ( ) ( )
P [X > 320] = 1 − ϕ 320−360
37.95
= ϕ 40
37.95
= 0.8531
∑200 ( )
200
Therefore, P [X > 10] = P [X̂ > 105] = 0.5200 k=106 k
= 0.21838
Hint: you may use the following MATLAB code to compute this value.
p = 0;
for k = 106:200
p = p + nchoosek(200,k);
end
p = (0.5^200) * y
Hint: you may use the following MATLAB code to compute this value
to be 0.59978.
100 Sums of Random Variables
p = 0;
for j = 0:200
for k = 0:200
if (2*j-200)^2 + (2*k-200)^2 > 200
p = p + nchoosek(200,k)* nchoosek(200,j);
end
end
end
y = y * (0.5^400)
Using CLT approximation
√
Let R = X 2 + Y 2 . Since X, Y ∼ Gaussian(0, 200), √ and X and Y are
independent, R is Rayleigh with parameter σ = 10 2.
√ √
Therefore, P [R > 10 2] = e−(10 2/σ) /2 = e−0.5 = 0.60653.
2
Ans
1.5
a) E[Y ] = 0.3; VAR[Y ] = 53
= 0.0283
b) E[Z] = 0.3(53) = 15.9; VAR[Z] = 1.5(53) = 79.5
6. Compute the MGF of an Erlang(n, λ) RV. Calculate the mean and variance.
Ans
( )−n
1 − λs ; mean = nλ ; variance = n
λ2
Ans
2
a3 +ab2 +a2 b+ab2 +b3
a) E[X] = a+b2
; VAR[X] = (b−a) 2
b) E[X 3 ] = 4
;
5 4 2 3 3 b2 +ab4 +b5
E[X 5 ] = a +ab +a b +a6
Appendix A
2009 Quizzes
b) A − (B − C) = (A − B) − C.
2. Consider the experiment of flipping a coin four times and recording the T and
H sequence. For example, THTT is a possible outcome.
a) How many elements does the event A = {at least one heads} have?.
b) Let B = {even number of tails}. All outcomes are equally likely. Find P [AorB].
104 2009 Quizzes
1.
a) Using the axioms of probability prove that P [Ac ] = 1 − P [A].
∪
b) It is known that P [A B] = 0.24, P [A] = 0.15, P [B] = 0.18. Find P [A|B].
1. From a group of five women and seven men, two women and three men are
randomly selected for a committee?
a) How many ways can the committee be selected?
b) Suppose that two of the men (say, John and Tim) cannot serve in the committee
together. What is the probability that a randomly selected committee meets this
requirement?
2. In a lot of 100 used computers, 18 have faulty hard drives and 12 have faulty
monitors. Assume that these two problems are independent. If a computer chosen
at random, find the probability that
(a) it has a hard disc problem,
(b) it does not have a faulty monitor,
(c) it has a hard disc problem only.
106 2009 Quizzes
1. A fair die is rolled twice, and the two scores are recorded. The random variable
X is 1 if both scores are equal. If not, X is the minimum of the two scores. For
example, if the first score is 3 and the second one is 5, then X = 3, but if both
are 3, then X = 1.
(a) Write SX , the range, and PX (x), the PMF of X. Be sure to write the value of
PX (x) for all x from −∞ to ∞.
2.
(a) Two percent of the resistors manufactured by a company are defective. You
need 23 good resistors for a project. Suppose you have a big box of the resistors
and you keep on picking resistors until you have 23 good ones. Let X be the total
number of resistors that you pick. Write down the PMF of X.
(b) A student takes a multiple choice test with 20 questions. Each question has
5 answers (only one of which is correct). The student blindly guesses. Let X be
the number of correct answers. Find the PMF of X.
A.5 Quiz Number 5 107
a) Find FX (0.5).
b) A PDF is given by
{
cy − 2
1
0<y<1
fY (y) =
0 otherwise
a) Find E[X 3 ].
b) Find E[eX ].
b) Find the probability of a positive net profit, i.e., P [Y ≥ 0]. Leave your answer
in the form of Φ(x) function.
3. Telephone calls arrive at a switchboard at the average rate of 2 per hour. You
can assume that the time between two calls is an exponential random variable.
Find the probability that it will be at least 3 hours between two calls?
A.7 Quiz Number 7 109
1
(b) Suppose Y = g(X) = X
. Find the CDF of Y , FY (a). Be sure to consider all
cases for −∞ < a < ∞.
110 2009 Quizzes
(b) Find FW (a). Be sure to consider all cases for −∞ < a < ∞.
(c) Find P [X ≤ 2Y ].
Appendix B
b) A − (B − C) = (A − B) − C.
A − (B − C) = A − {2, 3} = {1, 4}
while
(A − B) − C = {4} − C = {4}.
2. Consider the experiment of flipping a coin four times and recording the T and
H sequence. For example, THTT is a possible outcome.
a) How many elements does the event A = {at least one heads} have?.
112 2009 Quizzes: Solutions
Solution: A={at least one H} is equivalent to the set of all outcomes except for
the TTTT. Since there are 2 × 2 × 2 × 2 = 16 outcomes in S, A has 15 elements.
b) Let B = {even number of tails}. All outcomes are equally likely. Find P [AorB].
A ∪ B = S has 16 elements.
B.2 Quiz Number 2 113
1.
a) Using the axioms of probability prove that P [Ac ] = 1 − P [A].
A ∩ Ac = Φ ⇒ P [A ∪ Ac ] = P [A] + P [Ac ]
Moreover, using axiom 2,
A ∪ Ac = S ⇒ P [A ∪ Ac ] = P [S] = 1
Therefore,
∪
b) It is known that P [A B] = 0.24, P [A] = 0.15, P [B] = 0.18. Find P [A|B].
Solution :
P [A ∩ B]
P [A|B] =
P [B]
P [A ∩ B] = P [A] + P [B] − P [A ∪ B] = 0.15 + 0.18 − 0.24 = 0.09
0.09
P [A|B] = = 0.5
0.18
P [A] = P [D]P [A|D] + P [E]P [A|E] + P [F ]P [A|F ] = 0.14 + 0.11 + 0.03 = 0.28
P [A|F ]P [F ] 0.03
P [F |A] = = = 0.107
P [A] 0.28
114 2009 Quizzes: Solutions
( )( )
5 7
Solution: Number of ways = 2 3
= 350
b) Suppose that two of the men (say, John and Tim) cannot serve in the commit-
tee together. What is the probability that a randomly selected committee meets
this requirement? Solution: The total number of ways that the committee does
not meet the requirement is equivalent to the number of ways that both John
and Tim are in the committee. So only one other man should be selected for
the committee out of 5 men. If we call the event that the committee meets the
requirement, A,
( )( )
5 5
2 1 300
P r[A] = 1 − =
350 350
One can also find the same result using the total number of ways that the com-
mittee meets the requirement.We can divide the menś group into two groups,
one group which only has two members (John and Tim) and one group which
includes all other possible members (has 5 members). The committee meets the
requirement if one of the members is selected out of the first group and two other
members are selected out of the second group or if {all the members of the com-
mittee are selected out of the second group},
( ) ( )( ) ( )( )
5 2 5 2 5
2
[ 1 2
+ 0 3
] 300
P r[A] = =
350 350
2. In a lot of 100 used computers, 18 have faulty hard drives and 12 have faulty
monitors. Assume that these two problems are independent. If a computer chosen
at random, find the probability that
(a) it has a hard disc problem,
(b) it does not have a faulty monitor,
(c) it has a hard disc problem only.
Solution:
B.3 Quiz Number 3 115
1. A fair die is rolled twice, and the two scores are recorded. The random variable
X is 1 if both scores are equal. If not, X is the minimum of the two scores. For
example, if the first score is 3 and the second one is 5, then X = 3, but if both
are 3, then X = 1.
(a) Write SX , the range, and PX (x), the PMF of X. Be sure to write the value of
PX (x) for all x from −∞ to ∞.
Solution:
a) SX = {1, 2, 3, 4, 5}.
In the following equations, {nm} means {dice1= n & dice2= m}.
16
PX (x = 1) = P {11, 22, 33, 44, 55, 66, 12, 21, 13, 31, 14, 41, 15, 51, 16, 61} =
36
8
PX (x = 2) = P {23, 32, 24, 42, 25, 52, 26, 62} =
36
6
PX (x = 3) = P {34, 43, 35, 53, 36, 63} =
36
4
PX (x = 4) = P {45, 54, 46, 64} =
36
2
PX (x = 5) = P {56, 65} =
36
Solution:
2+4 6
b) PX (x > 3) = 36
= 36
2.
(a) Two percent of the resistors manufactured by a company are defective. You
need 23 good resistors for a project. Suppose you have a big box of the resistors
and you keep on picking resistors until you have 23 good ones. Let X be the total
number of resistors that you pick. Write down the PMF of X.
Solution: Using the information given, the xth resistor must be a good one. More-
over, 22 resistors out of x − 1 resistors must be good too. Therefore:
( )
x−1
PX (x) = (0.98)23 (0.02)x−1−22
22
B.4 Quiz Number 4 117
You could also argue that X has a Pascal(23, 0.02) distribution and get the exact
same result immediately.
(b) A student takes a multiple choice test with 20 questions. Each question has
5 answers (only one of which is correct). The student blindly guesses. Let X be
the number of correct answers. Find the PMF of X.
Solution:
1 15
P [1 < X < 2] = FX (2) − FX (1) = 1 − =
16 16
Solution: {
d x3
,0 < x < 2
fX (x) = FX (x) = 4
dx 0 , otherwise
a) Find FX (0.5).
Solution:
∫ ( ) 0.5
0.5 1 x2 1 3
FX (0.5) = P [X ≤ 0.5] = x+ dx = + x =
0 2 2 2 0 8
b) A PDF is given by
cy − 2 0 < y < 1
1
fY (y) =
0 otherwise
Find the value of the constant c.
B.5 Quiz Number 5 119
∫
Solution: Using the fact that fY (y)dy = 1,
∫ 1 1
cy − 2 dy = 2cy 2 = 2c = 1
1 1
0 0
1
∴c =
2
120 2009 Quizzes: Solutions
a) Find E[X 3 ].
Solution:
{
−2 ≤ x ≤ 2
1
,
X ∼ Uniform(−2, +2) ⇒ fX (x) = 4
0, otherwise
∫ 2
1 3
E[X 3 ] = x dx = 0 (from odd symmetry of the integrand)
−2 4
b) Find E[eX ].
Solution:
∫
X
2 1 x ex 2 e2 − e−2
E[e ] = e dx = = = 1.81343
−2 4 4 −2 4
E[Y ] = E[X]
5
−5=5
Var[X]
Var[Y ] = 52 = 4
b) Find the probability of a positive net profit, i.e., P [Y ≥ 0]. Leave your answer
in the form of Φ() function.
[ ]
Y −5
Solution: P [Y ≥ 0] = P 2
≥ −2.5 = 1 − Φ(−2.5) = Φ(2.5) = 0.99379
B.6 Quiz Number 6 121
3. Telephone calls arrive at a switchboard at the average rate of 2 per hour. You
can assume that the time between two calls is an exponential random variable.
Find the probability that it will be at least 3 hours between two calls?
Solution:
Given average call arrival rate 2 per hour (i.e. average inter-arrival time of 0.5
hours),
we find that inter-arrival time T ∼ Exponential(2).
∴ P [T > 3] = e−3λ = e−6 = 2.4787 × 10−3
λ=2
122 2009 Quizzes: Solutions
Solution:
By definition,
{ fX (x)
P [B]
, when B is true
fX|B (x) =
0, when B is false
There’s no need to compute P [B] since the above equation hints that X|B ∼
Uniform(2,3).
{
1, 2 ≤ x < 3
∴ fX|B (x) =
0, otherwise
2+3
E[X|B] = = 2.5
2
(3 − 2)2 1
Var[X|B] = = = 0.0833
12 12
1
(b) Suppose Y = g(X) = X
. Find the CDF of Y , FY (a). Be sure to consider all
cases for −∞ < a < ∞.
[ ]
[
]
P X≥ 1
, a>0
1 a
FY (a) = P [Y ≤ a] = P ≤a = [ ]
X
P X ≤ 1
a
, a<0
( )
1 − FX a1 , a > 0
= ( )
FX 1 ,
a
a<0
0, x<2
But, we know that FX (x) = x−2
, 2≤x≤6 .
4
1, x>6
Hence, we get
0, a < 16
0, a < 16
−1
FY (a) =
1 − a 4−2 , 16 ≤ a ≤ 1
2
= 6a−1
4a
, 61 ≤ a ≤ 1
2
1, a > 12 1, a > 12
B.8 Quiz Number 8 123
2x
Solution: Consider w = y
, the relationship a particular instantiation w of RV
(b) Find FW (a). Be sure to consider all cases for −∞ < a < ∞.
Solution:
Y
(1, 1)
y=x
y = 2x/a
(for: a ≥ 2)
(0, 0) x X
(c) Find P [X ≤ 2Y ].
Solution: P [X ≤ 2Y ] = P [ X
Y
≤ 2] = P [W = 2X
Y
≤ 4] = FW (4) = 1 − 2
4
= 1
2
Appendix C
2010 Quizzes
b) [1 mark] Are the outcomes of this sample space equally likely? Explain.
3. In a company 40% of employees are female. Also, 15% of the male (M)
employees and 10% of female (F) employees hold managerial positions.
a) [2 marks] Let A be the event that a randomly selected employee of this company
holds a managerial position. Find P [A]?
b) [1 mark] In part (a), what is the probability that the employee does not have
a managerial position?
1. [5 marks] Events A and B are independent and events A and C are disjoint
(mutually exclusive). Let P [A] = 0.2, P [B] = 0.4, and P [C] = 0.1. Please answer
the following parts:
a) [1 mark] Find P [A ∪ B].
( )
n
2. For this question, you may leave your answers as ratios of k
terms.
b) [2 marks] Find the probability that the majority of the team members are girls.
c) [2 mark] There are 6 students in this class, that do not like to be in the team.
Find the probability that the randomly chosen team has none of these 6 students.
C.3 Quiz Number 3 127
(b) (3 marks) Sketch the PMF. Find FX (0.5), where FX (·) represents the CDF of
X.
2. (4 marks) A biased coin with P [T ] = 0.2 and P [H] = 0.8 is tossed repeatedly.
Identify the type of the random variable (for example, X ∼Binomial(10,0.1)) in
each of the following cases.
d) After the occurrence of the first H, X is the number of extra tosses before the
second H (inclusive).
128 2010 Quizzes
(b) [2 marks] Find the probability that it lasts longer than 3 years.
(c) [2 marks] Given that it has lasted for 5 years, what is the probability that it
lasts for another 3 years.
[2 marks] Find c.
[2 marks] Find the marginal PDF of X, fX (x). Be sure to consider the whole
range −∞ < x < ∞.
[2 marks] Find the marginal PDF of Y , fY (y). Be sure to consider the whole
range −∞ < y < ∞.
Y
[4 marks] Find the PDF of Z = X
, fZ (a). Be sure to consider the whole range
−∞ < a < ∞.
Appendix D
b) [1 mark] Are the outcomes of this sample space equally likely? Explain.
Solution: No. Some outcomes are more likely than others. For example 2 can just
be the outcome when both die rolls result in 1 (i.e., (x1 , x2 ) = (1, 1)), while 7 is the
outcome of the experiment when any of the pairs (1, 6), (2, 5), (3, 4), (4, 3), (5, 2),
or (6, 1) happens (i.e., (x1 , x2 ) ∈ {(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)}).
Solution: Sum less than or equal to 2, means both die rolls should have resulted
in 1. Hence we have, P [B] = P {(x1 , x2 ) = (1, 1)} = P (x1 = 1) × P (x2 = 1) =
1
6
× 16 = 36
1
. Note that the die rolls are independent.
134 2010 Quizzes: Solutions
3. In a company 40% of employees are female. Also, 15% of the male (M)
employees and 10% of female (F) employees hold managerial positions.
a) [2 marks] Let A be the event that a randomly selected employee of this company
holds a managerial position. Find P [A]?
Solution: P [A] = P [A|F ]P [F ] + P [A|F c ]P [F c ] = 0.1 × 0.4 + 0.15 × 0.6 = 0.13
b) [1 mark] In part (a), what is the probability that the employee does not have
a managerial position?
1. [5 marks] Events A and B are independent and events A and C are disjoint
(mutually exclusive). Let P [A] = 0.2, P [B] = 0.4, and P [C] = 0.1. Please answer
the following parts:
a) [1 mark] Find P [A ∪ B].
(202)×(103)
Solution:
(305)
b) [2 marks] Find the probability that the majority of the team members are girls.
(202)×(103)+(201)×(104)+(200)×(105)
Solution:
(305)
c) [2 mark] There are 6 students in this class, that do not like to be in the team.
Find the probability that the randomly chosen team has none of these 6 students.
(30−6
5 )
Solution:
(305)
136 2010 Quizzes: Solutions
(b) (3 marks) Sketch the PMF. Find FX (0.5), where FX (·) represents the CDF of
X.
2. (4 marks) A biased coin with P [T ] = 0.2 and P [H] = 0.8 is tossed repeatedly.
Identify the type of the random variable (for example, X ∼Binomial(10,0.1)) in
each of the following cases.
Solution: Geometric(0.8)
Solution: Pascal(3,0.2)
Solution: Binomial(5,0.8)
d) After the occurrence of the first H, X is the number of extra tosses before the
second H (inclusive).
Solution: Geometric(0.8)
138 2010 Quizzes: Solutions
22 12
Solution: P [1 < X < 2] = FX (2) − FX (1) = 9
− 9
= 3
9
= 1
3
{
2x
9
0<x<3
Solution: fX (x) =
0 otherwise
∫ +∞ ∫3 2x3 3
Solution: E[X] = −∞ xfX (x)dx = 0 x 2x
9
dx = |
27 0
=2
D.5 Quiz Number 5 139
1 1
Solution: λ
= 0.2
=5
(b) [2 marks] Find the probability that it lasts longer than 3 years.
(c) [2 marks] Given that it has lasted for 5 years, what is the probability that it
lasts for another 3 years.
∫3 −x−1 3
Solution: 1
1 x2 × 12 dx = 2
|1 = 1
2
− 1
6
= 1
3
Solution: E[Y ] = 1
4
× E[X] + 6 ⇒ E[Y ] = 8
VAR[Y ] = 1
16
× VAR[X] ⇒ VAR[Y ] = 1
E[W ] = A × E[X] + B = 0 ⇒ B = −4
[2 marks] Find c.
∫ 1 ∫ 2x ∫ 1 2c 3
Solution: cx dydx = 2cx2 dx = 1 ⇒ =1 ⇒ c=
0 0 0 3 2
[2 marks] Find the marginal PDF of X, fX (x). Be sure to consider the whole
range −∞ < x < ∞.
∫
2x 3
x dy = 3x2 , 0 < x < 1
Solution: fX (x) = 0 2
0, otherwise.
[2 marks] Find the marginal PDF of Y , fY (y). Be sure to consider the whole
range −∞ < y < ∞.
∫
1 3 3 3y 2
x dx = − , 0<y<2
Solutions: fY (y) = y/2 2 4 16
0, otherwise.
Y
[4 marks] Find the PDF of Z = X
, fZ (a). Be sure to consider the whole range
−∞ < a < ∞.
∫ 1 ∫ ax 3
Solution: For 0 < a < 2, FZ (a) = P [Z ≤ a] = P [Y ≤ aX] = x dydx =
0 0 2
a
.
2
For a ≥ 2, FZ (a) = 1 and for a ≤ 0, FZ (a) = 0.
0, a ≤ 0
1, 0 < a < 2
⇒ FZ (a) = 2 , 0 < a < 2 ⇒ fZ (a) = 2
a
0, otherwise.
1, a ≥ 2.
Appendix E
2011 Quizzes
2. [2 marks] Let P [A] = 0.2, P [B] = 0.3 and A and B are mutually exclusive.
Find P [A|B c ].
b) [1 mark] Are all outcomes in S equally likely? Briefly justify your answer.
5. In a cosmetic product store 30% of products are for males and 70% for females.
Also, 50% of the male products are hair-care products, whereas 20% of female
products are hair-care products.
1. [4 marks] Events A and B are independent and events A and C are disjoint
(mutually exclusive). Let P [A] = 0.2, P [B] = 0.4, and P [C] = 0.1. Please answer
the following parts:
a) [1 mark] Find P [A ∪ B c ].
e) [1 mark] Find P [A ∩ B ∩ C c ].
2. [2 mark] A student goes to EE387 class on a snowy day with probability 0.4,
but on a nonsnowy day attends with probability 0.7. Suppose that 20% of the
days in March are snowy in Edmonton. What is the probability that it snowed
on March 10 given that the student was in class on that day?
( )
n
3. For this question, you may leave your answers as ratios of k
terms.
b) [1 mark] Find the probability that the team has an odd number of girls.
c) [1 mark] Three students in this class cannot attend the competition. Find the
probability that the randomly chosen team has none of these 3 students.
E.3 Quiz Number 3 145
b) (1 mark) What is the probability that she gets 19 or more questions right?
(e) (2 marks) A fair coin is tossed three times. Let X be the number of Heads.
Find E[X], the expected value of X.
E.5 Quiz Number 5 147
(c) (2 marks) Find the mean square of X, E[X 2 ]. Find the variance of X.
(e) (2 marks) What is the percentage of the individuals whose income exceed
22000$?
148 2011 Quizzes
2. The time T in minutes between two successive bus arrivals in a bus stop is
Exponential ( 0.2).
(a) [ 1 mark] When you just arrive at the bus stop, what is the probability that
you have to wait for more than 5 minutes?
(c) [ 1 mark] You are waiting for a bus, and no bus has arrived in the past 2
minutes. You decide to go to the adjacent coffee shop to grab a coffee. It takes
you 5 minutes to grab your coffee and be back at the bus station. Determine the
probability that you will not miss the bus.
3. [ 4 marks] You borrow your friend’s car to drive to Hinton to see your signifi-
cant other. The driving distance is 100 km. The gas gauge is broken, so you don’t
know how much gas is in the car. The tank holds 40 liters and the car gets 15 km
per liter, so you decided to take a chance.
(a) [2 marks] Suppose X is the distance (km) that you can drive until the car
runs out of gas. Out of Uniform, Exponential and Gaussian PDFs, which one is
most suitable for modeling X? Briefly justify your choice. Use your choice with
the appropriate parameters to answer the following questions.
(b) [ 1 mark] What is the probability that you make it to Hinton without running
out of gas?
(c) [1 mark] If you don’t run out of gas on the way, what is the probability that
you will not run out of gas on the way back if you decide to a take chance again?
Appendix F
Solution:
P [A ∩ B] = P [A] + P [B] − P [A ∪ B] = 0.2 + 0.2 − 0.3 = 0.1
P [(A ∩ B)c ] = 1 − P [A ∩ B] = 0.9.
2. [2 marks] Let P [A] = 0.2, P [B] = 0.3 and A and B are mutually exclusive.
Find P [A|B c ].
Solution:
P [A ∩ B c ] P [A] 0.2
c
= c
= .
P [B ] P [B ] 0.7
will stop when they have a child of each sex, or stop when they have 3 children.
Consider a collection of such families and use the notation: B=boy and G=girl.
You pick such a family and observe the kids in that family. For example, one
possible outcome is GB (ie younger girl and older boy).
a) [1 mark] Give the sample space (S) of this experiment.
Solution:
S = {GB, GGB, GGB, GGG, BG, BBG, BBB}.
b) [1 mark] Are all outcomes in S equally likely? Briefly justify your answer.
Solution:
No. Clearly GB is more likely than GGB.
5. In a cosmetic product store 30% of products are for males and 70% for females.
Also, 50% of the male products are hair-care products, whereas 20% of female
products are hair-care products.
Solution:
P [A] = P [A|M ]P [M ] + P [A|F ]P [F ] = 0.5 × 0.3 + 0.2 × 0.7 = 0.29.
Solution:
1. [2 marks] Events A and B are independent. Also P [A] = 0.2 and P [B] = 0.4.
a) [1 mark] Find P [A ∪ B c ].
Solution:
P [A ∪ B c ] = P [A] + P [B c ] − P [A ∩ B c ] = 0.2 + (1 − 0.4) − 0.2(1 − 0.4) = 0.68.
Solution:
P [Ac |B] = P [Ac ] = 0.8.
2. [2 marks] A student goes to EE387 class on a snowy day with probability 0.4,
but on a non-snowy day attends with probability 0.7. Suppose that 20% of the
days in March are snowy in Edmonton. What is the probability that it snowed
on March 10 given that the student was in class on that day?
Solution:
P [C|S] = 0.4, P [C|S c ] = 0.7, P [S] = 0.2
P [C] = P [C|S]P [S] + P [C|S c ]P [S c ] = 0.4 × 0.2 + 0.7 × 0.8 = 0.64
Solution:
( ) ( )
20 10
5
+ 5
1− ( )
30
.
5
b) [2 marks] Find the probability that the team has an odd number of girls.
Solution:
( )( ) ( )( ) ( )( ) ( )( )
10 20 10 20 10 20 10 20
1 4
+ 2 3
+ 3 2
+ 4 1
( ) .
30
5
c) [2 marks] Three students in this class cannot attend the competition. Find the
probability that the randomly chosen team has none of these 3 students.
Solution:
( )
27
5
( ).
30
5
F.3 Quiz Number 3 153
A 1
2×A+2×( )=1⇒A= .
2 3
1/6 1/6
-2 -1 0 1
1
P [0.5 < X ≤ 3] = P [X = 1] = .
6
2/3
1/3
0 1 2 3 4
Solution:
( )
20 1 i 4 (20−i)
PX (i) = ( )( ) .
i 5 5
b) (1 mark) What is the probability that she gets 19 or more questions right?
Solution:
( ) ( )
20 1 19 4 20 1 20 4 0 81
( ) ( )+ ( ) ( ) = 20 .
19 5 5 20 5 5 5
Solution:
( )
20 1 0 4 20 4
( ) ( ) = ( )20 .
0 5 5 5
F.4 Quiz Number 5 155
4
dFX (x) 1≤x<∞
fX (x) = = x5
dx
0 x ≤ 1.
∫ ∫ ∞ 4
E[X] = xfX (x)dx = x dx
∫
1 x5
∞ 4
= 4x dx = x−3 |∞
−4
1
1 3
4
=
3
(c) (2 marks) Find the mean square of X, E[X 2 ]. Find the variance of X.
∫ ∫ ∞
2
E[X ] = 2
x fX (x)dx = 4x−3 dx
1
= −2x−2 |∞
1
=2
4 2
VAR[X] = E[X 2 ] − E 2 [X] = 2 − ( )
3
2
=
9
(d) (2 marks) Suppose the wealth measured in dollars is given by Y = 10000X +
2000. Find the mean wealth E[Y ] and standard deviation STD[Y ].
156 2011 Quizzes: Solutions
(e) (2 marks) What is the percentage of the individuals whose income exceed
22000$?
X − 10 16 − 10 12 − 10
P [1 < < 3] = Φ( ) − Φ( ) = Φ(3) − Φ(1).
2 2 2
X − 10 5 − 10 X − 10
P[ > ] = 1 − P[ < −5] = 1 − Φ(−5) = 1 − (1 − Φ(5)) = Φ(5).
2 2 2
2. The time T in minutes between two successive bus arrivals in a bus stop is
Exponential ( 0.2).
(a) [ 1 mark] When you just arrive at the bus stop, what is the probability that
you have to wait for more than 5 minutes?
Solution:
1
E[T ] = = 5.
λ
158 2011 Quizzes: Solutions
(c) [ 1 mark] You are waiting for a bus, and no bus has arrived in the past 2
minutes. You decide to go to the adjacent coffee shop to grab a coffee. It takes
you 5 minutes to grab your coffee and be back at the bus station. Determine the
probability that you will not miss the bus.
Solution:
3. [ 4 marks] You borrow your friend’s car to drive to Hinton to see your significant
other. The driving distance is 100 km. The gas gauge is broken, so you don’t
know how much gas is in the car. The tank holds 40 liters and the car gets 15 km
per liter, so you decided to take a chance.
(a) [2 marks] Suppose X is the distance (km) that you can drive until the car
runs out of gas. Out of Uniform, Exponential and Gaussian PDFs, which one is
most suitable for modeling X? Briefly justify your choice. Use your choice with
the appropriate parameters to answer the following questions.
Solution:
First note that our random variable is limited and should have zero probability
for values larger than 600. In addition there is no information about the value of
available gas then every value between 0 and 600 should have the same probability
then,
X ∼ Uniform(0, 600).
(b) [ 1 mark] What is the probability that you make it to Hinton without running
out of gas?
Solution:
100 − 0 5
P [X > 100] = 1 − P [X < 100] = 1 − = .
600 6
(c) [1 mark] If you don’t run out of gas on the way, what is the probability that
you will not run out of gas on the way back if you decide to a take chance again?
F.5 Quiz Number 6 159
Solution: