department of electrical and electronic engineering

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING
EE 571 MIDTERM EXAM I
DATE : 8 Dec. 2004
DURATION : 150 min.
1-) There are two coins, one of which is fair and the other one two-headed (no tail on this coin). One
of these coins is picked at random and tossed twice. If head shows in both of these tosses, find the
probability that the coin picked is fair.
2-) In a Bernoulli trial, event A has a probability p of occurring ( P(A) = p ).
(a) Find the expected number of times the trial is repeated until event A occurs (Let
K be the number of times the trial is repeated until A occurs).
(b) Find the probability that event A occurs k times at the n th trial, but not earlier.
3-) X and Y are random variables with a joint pdf
e y
f X ,Y ( x, y)  
0
x 0,y  x
elsewhere
(a) Find the marginal pdfs of X and Y ( fX(x) and fY(y) ).
(b) Find the conditional probability P  X  2 Y  4 .
4-) Find the conditional pdf fY ( y X  0) , where Y = X 2 and X is N(0,1).
5-) X1 and X2 are i.i.d. random variables with pdf

1
x
 cos x
f X i ( x)   2
2

0
elsewhere

i  1, 2

(a) Find and sketch the pdf of Y= X1 + X2. Verify that


(b) Find P{ |Y| < π /4 }.
fY ( y )dy  1 .
SOLUTION
1-) Let A = { coin picked is fair } ,
P(A)= 1/ 2
; B = { head shows both times }
1 1 1
P ( B | A)   
2 2 4
P ( B | A)  1
1 1 1 5
 P ( B )  P ( B | A).P ( A)  P ( B | A).P ( A)    
4 2 2 8
P ( B | A).P ( A) 1/ 8 1
P( A | B) 


P( B)
5/8 5
2-) (a)
K = the number of times the trial is repeated until A occurs
P( AAA.... AA)  p.(1  p) K 1

K
P(K  k )  p.(1  p) k 1



k 1
k 1
E{K}   k . P(K  k )  p  k . q k 1

S   q k  1  q  q 2  ... 
Let
k 0
 E{K} 
1
1 q
dS 
1
1
  k . q k 1 
 2
2
dq k 1
(1  q)
p

p 1

p2 p
(b) E = {A occurs k times in n trials, but not earlier}
B = {A occurs k-1 times in n-1 trials}
C = {A occurs at the n th trial}
E = B∩C P(E) = P(B). P(C) since B and C are independent
 n  1 k 1
n 1 ( k 1)
P( B)  
P (C )  p
 p (1  p )
 k  1

 n  1 k
nk
P( E )  
 p (1  p )
k

1


3-) (a)


y
f X ( x)   f X ,Y ( x, y ).dy   e dy  e
x
x
y
y
0
0
y
x
fY ( x)   f X ,Y ( x, y ).dy   e  y dx  ye  y
x0
y0
4
2
x
(b)
P( X  2 | Y  4) 
P({ X  2}  {Y  4})
P(Y  4)
4 y
4
4
P({ X  2}  {Y  4})    e dxdy   ( y  2)e dy  (1  y )e   e 2 (1  3e 2 )  0.0804
y
2 2
4
4
0
0
y
y
2
2
P(Y  4)   fY ( y )dy   ye  y dy   (1  y )e  y   1  5e 4  0.9084
4
0

P( X  2 | Y  4)  0.0885
4-)
FY ( y | X  0)  P[Y  y | X  0] 
P[Y  y, X  0]
P[ X  0]
P[Y  y, X  0]  P[0  X  x (1) ]
where x (1) is the solution of y  x 2 for x  0.
y


f X ( x).dx  FX ( y ) FX (0)
0

P[ X  0]   f X ( x).dx  0.5
since X is Gaussian with zero mean.
0
FY ( y | X  0)  2  FX ( y )  FX (0) 

f X ( y ) e y / 2
dFY ( y | X  0)
d
fY ( y | X  0) 
 2 FX ( y ) 

dy
dy
y
2 y
y0
5-) (a)

fY ( y ) 


f X1 ( x) f X 2 ( y  x).dx
y  
fY ( y )  0
y
  y  0
fY ( y ) 

2
y

1
1 2
cos
x
.cos(
y

x
).
dx

cos y  cos(2 x  y) dx
4 / 2
8 / 2
1
( y   ) cos y  sin y 
8
1
fY ( y )   (  y ) cos y  sin y 
8

0 y 
due to symmetry
(b)
 /4
P  Y   / 4 

 / 4

 /4
fY ( y )dy  2

fY ( y )dy
due to symmetry
0
1
 /4
 (  y ) sin y  2 cos y 0  0.563
4