0% found this document useful (0 votes)
17 views

Final Study Solutions

Uploaded by

sbozkurt20
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Final Study Solutions

Uploaded by

sbozkurt20
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

ENGR 200: Probability and Random Variables for Engineers

Fall 2019
Instructors: Lerzan Örmeci and Zafer Doğan
TFs: O. Demiray, M. Gurel, S. Kazmi, İ. Pehlivan, and F. Tunçalp
Final Review Solutions
Dec 20, 2019

1 Practice Problems
Problem 1.
Let discrete random variables X and Y have the following joint probability mass function:
pX,Y (1, 1) = 2/8, pX,Y (−1, −1) = 2/8, pX,Y (0, 0) = 2/8, pX,Y (1, −1) = 1/8, pX,Y (−1, 1) =
1/8.
1. Find P (XY > 0).

Note that xy > 0 if (x, y) ∈ {(1, 1), (−1, −1), }. So

P (XY > 0) = (2/8) + (2/8) = (4/8)

2. Find E[X].

E[X] = 1(2/8) + (−1)(2/8) + 1(1/8) + (−1)(1/8) = 0.

3. Find E[X|X ≥ 0].


4. Find Cov(X, Y ).
5. Let Xi (i = 1, 2, ..5) be independent random variables with the same probability mass
function as X. Let Z = X1 + X2 + ... + X5 . Find P (Z = 4).

Problem 2.
Let X and Y be jointly distributed random variables whose joint probability density function
is given by:

x(y + 1), 0 < x < 1, −1 < y < 1,
fX,Y (x, y) =
0, otherwise.

1. Find P (XY > 0).

Note that xy > 0 if x > 0 and y > 0


1 1
3
Z Z
P (XY > 0) = x(y + 1) dy dx = .
0 0 4

2. Find the marginal probability density function of X, fX (x).


Z 1
fX (x) = x(y + 1) dy = 2x if 0 < x < 1 and fX (x) = 0 otherwise
−1
3. Find E[X].

1
2
Z
E[X] = x(2x) dx =
0 3

4. Find V ar[X].

5. Find E[X|X > 1/2].


Note that
fX (x) 2x 8x
fX|X>1/2 (x) = = = if 1/2 < x < 1 and fX (x) = 0 otherwise
P (X > 1/2) 3/4 3

6. Find the conditional density function fY |X (y).


7. Are X and Y independent (explain)?

Problem 3.
The download time of large file (for example 1 GB) is an exponential random variable that
depends on the congestion level on the local network. Assume that the congestion level on
the local network is a continuous uniform random variable Y in the interval (0,0.9) (i.e.
fY (y) = 1/0.9 for 0 < y < 0.9 and fY (y) = 0 otherwise). For instance y = 0.8 denotes a
network congestion level of 80%. Now, assume that the probability density function of the
download time (in minutes) given Y = y is given by:

fT |Y (t) = (1 − y)e−(1−y)t for t > 0 and fT |Y (t) = 0 otherwise

1. Assume that Y = 1/2. What is the probability that the download time is over 2
minutes (P (T > 2|Y = 1/2))?


e−t/2
Z
P (T > 2|Y = 1/2) = dt = e−1 .
2 2

2. What is the probability that the download time is over 2 minutes(P (T > 2))?
To find P (T > 2), we condition to find P (T > 2|Y = y) and use the total law of
probability.
P (T > 2|Y = y) = e−(1−y)2 = 0.368.
Then: Z 0.9
P (T > 2) = (1/0.9)e−(1−y)2 dy = 0.380.
0

3. What is the probability density function of the download time (fT (t))?
Let’s first obtain the cumulative distribution FT (t) using the above argument.
0.9
(1/0.9)(e−0.1t − e−t
Z  
−(1−y)t
FT (t) = P (T ≤ t) = P (T ≤ 4) = 1− (1/0.9)e =1− dy for t > 0.
0 t

Then:
(0.1)e−0.1t e−0.1t e−t e−t
 
dFT (t)
fT (t) = = (1/0.9) + − − for t > 0.
dt t t2 t t2

and fT (t) = 0 otherwise.

2
4. What is the probability that the network congestion level was over 1/2 given that the
download time is over 2 minutes (P (Y > 1/2|T > 2))?

P (T > 2|Y > 1/2)P (Y > 1/2)


P (Y > 1/2|T > 2) = .
P (T > 2)
5. What is the probability density function of the network congestion level Y given that
the download time is t minutes?

fT |Y (t)fY (y)
fY |T (y) = .
fT (t)

Problem 4.
A small business has daily profits that are random and independent. Assume that the daily
profit X is a continuous random variable between 500 and 1500 TL. The business is open
for
p sale for 200 days in a year. Note that E[X] = 1000 TL and V ar(X) = 83, 333.33
( V ar(X) = 288.675).

1. Use the normal approximation to compute the probability that the yearly profit is over
220,000 TL.
Let Π be the profit. Note that

200
X
Π= Xi
i=1

Because Π is the sum of a large number of i.i.d. random variables, P i must have a
normal distribution.

E[Π] = 200E[Xi ] = 200, 000 T L


and

V ar(Π)] = 200V ar[Xi ] = 200(V ar(X)) = 1.67 × 107 T L


p
So Π is normal with µ = 200000 and σ = V ar(Π) = 4082.48.
 
220000 − 200000
P (Π > 220000) = 1 − φ = 0.
4082.48
2. The owner realizes that profits are above average on Fridays. Let the daily profit on
Fridays be a continuous uniform random variable
p Y between 1300 and 1500. Note that
E[Y ] = 1400 TL and V ar(Y ) = 3, 333.33 ( V ar(Y ) = 57.735). Assume that there
are 160 regular days (with profits X) and 40 Fridays (with profits Y ) in a year. Use
the normal approximation to compute the probability that the yearly profit is over
220,000 TL under this assumption.
Note that

E[Π] = (160)1000 + (40)1400 = 216000


V ar(Π) = (160)83333.33 + (40)3333.33 = 1.34 × 107
p
This time Π is normal with µ = 216000 and σ = V ar(Π) = 3669.7.
 
220000 − 216000
P (Π > 220000) = 1 − φ = 0.138.
3669.7

3
Problem 5.
Short questions (provide full explanations of your answers).
1. The Sariyer Storm and the Kilyos Thunder are playing the regional basketball play-off
finals. Each team has an equal probability of winning any game (ties are not allowed)
and the first team to reach 3 wins, wins the series. Assume that Sariyer has won the
first two games. What is the probability that Sariyer wins the series (i.e. reaches three
wins before Kilyos)?

Sariyer wins in the following ways: win game 3, lose game 3 and win game 4 and lose
game 4 and win game 5. The total probability is then: 1/2+1/4+1/8=7/8.
2. There are two coins (blue and red). The blue coin is unbiased and the red one is biased
and has P (Heads) = 3/4. You select a coin randomly and give it your friend without
looking at its color. Your friend tosses it and tells you that the outcome is Heads.
What is the probability that you chose the red coin?

P (H|R)P (R) (3/4)(1/2) 3


P (R|H) = = = .
P (H) (3/4)(1/2) + (1/2)(1/2) 5
3. Assume that there are four exams in a course and you think (before taking the exams)
that your grade in each of the exams is a normal random variable with mean 80 and
standard deviation 10. What is the probability that you receive a grade higher than
90 in at least three of the four exams (assuming that the grades in different exams are
independent)?
  
90 − 80
P (Xi > 90) = P Z > = 1 − Φ(1) = 0.159.
10
Then, let A be the even that at least three of the four exams have grades higher than
90. We obtain
P (A) = 4(0.159)3 (0.841) + (0.159)4 .

Problem 6.
Alice and Bob take turns tossing a biased coin that turns up heads with probability p. If
Alice tosses a head, she wins the game. If Bob tosses a tail, he wins the game. The coin
tossings continue until one of the two players wins. Alice tosses first.
Useful formula: For any real number a such that |a| < 1, we have
1
1 + a + a2 + a3 + . . . = .
1−a
(a) Find the probability that Alice wins the game. (Hint: the answer is not p)
Solution:
The scenarios from Alice to win the game are
H
THH
THTHH
THTHTHH
......
Thus, we get
p
P[Alice wins] = p 1 + p(1 − p) + p2 (1 − p)2 + p3 (1 − p3 )3 + . . . =
 
.
1 − p(1 − p)

4
(b) Now, find the probability that Bob wins the game from first principles, that is, do
not just write down P(Bob wins) = 1 − P(Alice wins) = 1 − {answer from part (a)}.
Solution:
For Bob, he wins if
TT
THTT
THTHTT
THTHTHTT
Thus, we get

(1 − p)2
P[Bob wins] = (1 − p)2 1 + p(1 − p) + p2 (1 − p)2 + . . . =
 
.
1 − p(1 − p)

(c) Show that your answers to parts (a) and (b) add up to 1.
Solution:

p (1 − p)2 p + 1 − 2p + p2
+ = = 1.
1 − p(1 − p) 1 − p(1 − p) 1 − p(1 − p)

(d) For what value(s) of p is this a fair game (that is, a game that both Alice and Bob
have equal probability 1/2 of winning)?
Solution: √
p 1 2 3− 5
We know 1−p+p 2 = 2 . It implies p − p3 + 1 = 0, which yields p = 2 .

(e) Now consider once again the general game (with arbitrary value of p), and let X denote
the total number of coin tosses in the game. Thus, X is a discrete random variable
taking on values 1, 2, 3, ... Find the probability mass function PX (m) of the random
variable X.
Solution:
An odd X implies Alice wining, while an even X implies Bob wining.
( m−1
[p(1 − p)] 2 p, m = 1, 3, 5, . . .
PX (m) = m−2
2
[p(1 − p)] 2 (1 − p) , m = 2, 4, 6, . . . .

(f) Find E[X] as a function of p.


Solution:


X
EX = mPX (m)
m=1

X ∞
X
k
= (2k + 1)[p(1 − p)] p + (2k + 2)[p(1 − p)]k (1 − p)2
k=0 k=0

p + 2(1 − p)2 X
= + [2p + 2(1 − p)2 ] + k[p(1 − p)]k
1 − p(1 − p)
k=0
p + 2(1 − p)2 p(1 − p)
= + [2p + 2(1 − p)2 ] .
1 − p(1 − p) [1 − p(1 − p)]2

5
Problem 7.

Check the appropriate box for each of the statements below. No justification is required.

(a) Answer “TRUE” if the statement below is true for ALL events A and B with 0 <
P(A) < 1 and 0 < P(B) < 1. Otherwise answer “FALSE”.

TRUE FALSE

 2 P(A ∪ B) ≥ max{P(A), P(B)}

2  P(A ∩ B) ≥ min{P(A), P(B)}

2  P(A|B)P(B) + P(Ac |B)P(B) = P(A)

2  If P(A|B) = P(B|A), then P(A) = P(B)

2  If A ∩ B = ∅, then A and B are independent.

 2 If P(A|B) = P(A), then P(B c |A) = 1 − P(B)

(b) X is a continuous random variables with finite mean and variance. The functions
FX (x) and fX (x) denote the cumulative distribution function and the probability
density function of X, respectively. Answer “TRUE” if the statement is true for all
such random variables X, otherwise answer “FALSE”.

TRUE FALSE

2  fX (x) ≤ 1 for all x.

 2 There is some real number a such that 2 FX (a) > FX (2a) .

 2 P(a ≤ X < b) = P(ea ≤ eX < eb ) for all real numbers a < b.

 2 P(X 2 − 2X + 1 < −1) = 0.

 2 If Y = |X|, then E[Y ] ≥ E[X].

 2 If Y = |X|, then var[Y ] ≤ var(X).

(c) X and Y are random variables such that var(X) = var(Y ) = σ 2 < ∞. In addition, we
have that var(2X + 3Y + 4) = var(3X − 2Y + 1). Answer “TRUE” if the statement is
true for all such random variables X, Y , otherwise answer “FALSE”.

6
TRUE FALSE

2  E[X 2 ] = E[Y 2 ]

 2 X and Y are uncorrelated random variables.

2  X and Y are independent random variables.

 2 var(2X + 3Y + 4) = var(2X − 3Y + 1)

 2 cov(X + Y, X − Y ) = 0

 2 var(X + Y ) = 2σ 2

(d) [12 points] Let X1 , X2 , . . . , Xn be a sequence of independent and identically dis-


tributed random variables. Let Yn and Zn be two random variables defined as

Yn = X1 + X2 + . . . Xn ,
Zn = |X1 | + |X2 | + . . . |Xn |,

respectively. Assume that the random variables X1 , X2 , . . . , Xn have finite mean µ


and finite variance σ 2 , and that E[|X1 |] = τ .

TRUE FALSE

 2 var(|Xn |) = σ 2 + µ2 − τ 2 .

2  For sufficiently large n, Yn and Zn are approximately jointly Gaussian.

 2 For sufficiently large n, we have P(Yn − nµ ≤ Zn − nτ ) ≈ 0.5.

2  If X1 , X2 , . . . , Xn are Gaussian, then P(Y ≤ n) = P(X1 ≤ 1)

 2 P(Zn ≥ n) ≤ τ for all n.

Problem 8.

Check the appropriate box for each of the statements below. No justification is required.

(a) Answer “TRUE” if the statement below is true for ALL events A and B with 0 <
P(A), P(B) < 1. Otherwise answer “FALSE”.

7
TRUE FALSE

 2 P(A ∪ B) ≤ P(A) + P(B)

 2 P(A|B) ≤ 1

2  P(A|B) + P(A|B c ) = 1

2  P(A|B)
P(B) ≤1

 2 P(A ∩ B c ) = P(A) − P(A ∩ B)

 2 P(A|B) = P(B|A)P(A)/P(B)

(b) Answer “TRUE” if the statement is true for all continuous random variables X with
finite mean and variance, otherwise answer “FALSE”.

TRUE FALSE

2  If var(X) = 0 then E[X] = 0.

 2 (E[X])2 ≤ E[X 2 ]

2  g(X) is a continuous random variable for all functions g(·).

 2 If Y = |X|, then fY (v) = fX (v) + fX (−v) for all v > 0.

(c) Let X and Y be independent Gaussian random variables with parameters E[X] =
2
µX , E[Y ] = µY and var(X) = σX , var(Y ) = σY2 . Indicate whether each of the following
statements is true or false.
Notation: fXY (x, y), fX (x), fY (y) denote the joint and marginal PDFs of X and Y ,
respectively; Φ(x) is the CDF of a standard Gaussian random variable with zero mean
and unit variance, that is,
Z x
1 2
Φ(x) = √ e−t /2 dt.
2π −∞

Finally, cov(X, Y ) is the covariance of the two random variables.

8
TRUE FALSE

 2 fXY (x, y) = fX (x)fY (y)

2  E[XY ] = 0

 2 2
var(X + Y ) = σX + σY2

 
 2 P(X + Y < z) = Φ √ 2X −µ2Y
z−µ
σX +σY

2  P(X ≤ x|Y ≤ y) = Φ(x)

 2 cov(X, Y ) = 0

(d) Let X1 , X2 , . . . , Xn be a sequence of independent and identically distributed (IID)


random variables. Let Yn be a random variable defined as

Yn = X1 + X2 + . . . Xn .

Assume that the random variables X1 , X2 , . . . , Xn have finite mean µ and finite vari-
ance σ 2 .
TRUE FALSE

 2 If X bn ) = σ 2 /n.
bn = Yn /n, then var(X

2  Yn is a Gaussian random variable.


 2 For sufficiently large n, we have P(Yn ≤ nµ + σ n) ≈ Φ(1).

 2 If µ = σ = 1, then the variance of the product X1 · X2 · · · Xn is 2n − 1.

Problem 9.

The random point (X, Y ) is uniformly distributed on the shaded region shown below.

(a) The joint PDF of X, Y can be written as


(
c, if (x, y) is in the shaded region;
fXY (x, y) =
0, otherwise.

What is the value of the constant c?


Solution:
1 4
c= =
4 3

9
Y
1

05

05 1 X

(b) Find the marginal PDF fX (x) of the random variable X. In order to obtain full credit,
you must specify the value of fX (x) for all real numbers x.
Solution:
n
2
fX (x) = 3 , if 0 < x < 0.5, 43 , if 0.5 < x < 1, 0, otherwise.

(c) Find P(X < Y < 2X).


Solution:
1 1
4 4 2 + 4 1 1
P[X < Y < 2X] = × Area in the figure below = · · = .
3 3 2 2 4

(d) Find the PDF of the random variable Z = Y /X. In order to obtain full credit, you
must specify the value of fZ (z) for all real numbers z.
Solution:

We know that
Y
FZ (z) = P( ≤ z) = P(Y ≤ zX).
X

10
z
4 2 +z 1 z
If z ≤ 1 (see the figure above), we get FZ (z) = 3 · 2 · 2 = 2.
1 1
4 2z + z 1 1
If z > 1 (see the figure below), we get FZ (z) = 1 − 3 · 2 · 2 = 1− 2z , which yields

1
2,
 0<z<1
1 −2
fZ (z) = 2 z , z ≥ 1

0 otherwise.

Problem 10.
On any given flight, an airline’s goal is to fill the plane as much as possible without over-
booking. If, on average, 10% of customers cancel their tickets, all independently of each
other, what is the probability that a particular flight will be overbooked if the airline sells
320 tickets for a plane that has a maximum capacity of 300 people? What is the probabil-
ity that a plane with maximum capacity 150 people will be overbooked if the airline sells
160 tickets? Express the answers in terms of the standard normal cumulative distribution
function, Φ(x). (Hint. Consider the probability p of a success to be the probability that a
given person actually shows up for the flight. From this, deduce what the effective mean
and standard deviation are for the number of successes in the case when n = 320 or when
n = 160, respectively.)
Solution:
Let N be the number of people that actually show up for the flight. The flight will be
overbooked if N > 300. We can use the normal approximation to the binomial to calculate
this probability. Note that n = 320 and p = 0.9 where p is the probability of a success
(a customer does show up for √ the flight). So the effective mean is 0.9 · 320 = 288 and the
effective standard deviation is 320 · 0.9 · 0.1 = 5.367. Then we have,
   
320 − 288 301 − 288
P (301 ≤ N ≤ 320) = Φ −Φ = 1 − Φ(2.4181) = 0.0078.
5.367 5.367
A similar computation for the smaller plane shows that the effective mean and standard
deviation are 144 and 3.794, respectively, and that the probability of overbooking in that
case is:
 
151 − 144
P (151 ≤ N ≤ 160) = 1 − Φ = 1 − Φ(1.8450) = 0.0329.
3.794

Problem 11.
Two coins, one fair and one coming up heads with probability 1/3, are in a pocket. Other
than this difference in their bias, the coins are indistinguishable. One coin is drawn from
the pocket, with each of the two coins equally likely to be chosen. We want to know which
coin we actually picked by flipping it multiple times and observing the results.
(a) Suppose the coin drawn is flipped three times. What is the probability that heads
show up on all three flips?
Solution:
1 1 3 1 1 3
P[HHH] = ·( ) + ( ) .
2 2 2 3

11
(b) Given that a total of two heads show up on the three flips, what is the probability
that the coin is fair?
Solution:

1 3 1 3

P[fair]P[2H|fair] 2 2 (2)
P[fair|2H] = = 1 31 3
 1 3 1 22

2 2 2) + 2 2 (3) 3
(
P[2H]

(No need to simplify the answer.)


(c) If you flip the selected coin 1000 times, what is the probability that the number of
heads is no greater than 250? You just need to get an approximate answer in terms
of the function φ(x), defined as
Z x
1 2
φ(x) = √ e−t /2 dt.
2π −∞

Solution:

P[X1 + . . . + X1000 ≤ 250]


1 1
= P[X1 + . . . + X1000 ≤ 250| fair ] + P[X1 + . . . + X1000 ≤ 250| biased ]
2 2
1 X1 + . . . + X1000 − 500 250 − 500
= P[ q ≤q ]
2 1000 · 1 1000 · 1
4 4

1 X1 + . . . + X1000 − 1000/3 250 − 1000/3


+ P[ q ≤q ]
2 1 2
1000 · 3 · 3 1000 · 13 · 32
1 √ 1 5√
= φ(− 250) + φ(− 5)
2 2 2

Problem 12.

Let X and Y be two continuous random variables with joint pdf


(
c, if (x, y) is in the shaded parallelogram region
fX,Y (x, y) =
0, otherwise.

1 2 x

12
(a) What is the value of the constant c?
Solution:
1
c= = 1.
Area

(b) Are X and Y independent? Justify your answer.


Solution:
No. For example, if X = 1, Y can take values from [0, 1] and if X = 1.5, Y can only
take values from [0.5, 1].
(c) Find the marginal pdf fX (x). To obtain full credit, you must specify the value of
fX (x) for all x, −∞ < x < ∞.
Solution:

Z +∞ x,
 0≤x≤1
fX (x) = fX,Y (x, y)dy = 2 − x, 1≤x≤2
−∞ 
0, otherwise.

(d) Find P(Y < X < 1).


Solution:

From the figure above, we get P[Y < X < 1] = 21 .


(e) Find the CDF of the random variable Z = Y − X. In order to obtain full credit, you
must specify the value of FZ (z) for all real numbers z.
Solution:

13
From the figure above, we get

0,
 z < −1
FZ (z) = P(Y − X ≤ z) = P(Y ≤ X + z) = 1, z>0

1 + z. −1 < z < 0

14

You might also like