Upload
kenny-pham
View
214
Download
0
Embed Size (px)
Citation preview
7/28/2019 mid2sol-12(2)
1/5
UNIVERSITY OF CALIFORNIA, DAVISDepartment of Electrical and Computer Engineering
EEC161 Probabilistic Analysis of Electrical and Computer Systems Spring 2012
Midterm #2 Solutions
Problem 1
a) In order to ensure that fX Y(x, y) is a valid PDF, we must have
1 =
fX Y(x, y)dxdy
= C
10
x[
x0
y2dy]dx
= C3
1
0x4dx = C
15,
so C = 15.
b) The marginal probability density fX(x) of X is given by
fX(x) =
x0
fX Y(x, y)dy = 15x4
3= 5x4
for 0 x 1 and fX(x) = 0 otherwise. Similarly, the marginal PDF of Y is given by
fY(y) =1
yfX Y(x, y)dx =
15
2 (1 y2)y2
for 0 y 1 and fY(y) = 0 otherwise.c) Since
fX(x)fY(y) =75
2x4(1 y2)y2
for 0 x, y 1, we conclude that
fX(x)fY(y) = fX Y(x, y)
so X and Y are not independent.
d) We have
fY|X(y|x) =fX Y(x, y)
fX(x)= 3
y2
x3
for 0 y x and fY|X(y|x) = 0 otherwise.
7/28/2019 mid2sol-12(2)
2/5
EEC161 Probabilistic Analysis of Electrical and Computer Systems Spring 2012
e) The conditional expectation
E[Y|X = x] =
yfY|X(y|x)dy
=3
x3
x
0
y3dy =3
4x .
Problem 2:
a) For n 1, N = n visits to replacement parts stores are needed if the first n1 stores donot carry the desired replacement part (each with probability 1p), and the n-th store hasthe needed part (with probability p). Thus N is a type-1 geometric random variable with
P[N = n] = p(1 p)n1
for n 1. The moment generating function is
GN(z) = pz
N=1
((1 p)z)n1
=pz
1 (1 p)z ,
for (1 p)|z| < 1. Its first and second derivatives are given by
GN(z) =p(1 (1 p)z) +pz(1 p)
(1 (1 p)z)2=
p
(1 (1 p)z)2
d
2
GNdz2 = 2p(1 p)(1 (1 p)z)3 ,
so
mN =dGN
dz(1) =
1
p
E[N2] =d2GN
dz2(1) +
dGNdz
(1) =2(1 p)
p2+
1
p,
and
KN = E[N2] m2N =
1 pp2
.
b) The generating function of X is
MX(s) =
esxfX(x)dx =
0
e(s)xdx
=
s
2
7/28/2019 mid2sol-12(2)
3/5
EEC161 Probabilistic Analysis of Electrical and Computer Systems Spring 2012
for (s) < . The first and second derivatives of MX(s) are given bydMX
ds=
( s)2d2MX
ds2=
2
( s)3,
so
mX =dMX
ds(0) =
1
E[X2] =d2MX
ds2(0) =
2
2,
and
KX = E[X2] m2X =
1
2.
c) If Charles visits N = n stores until he finds the desired part, the time spent is
Y =n
i=1
Xi
and since the random variables Xi are independent
MY|N(s|n) = E[esY|N = n] =n
i=1
E[esXi ] = (MX(s))n .
d) By using the principle of total probability
MY(s) =
n=1
E[esY|N = n]P[N = n]
= pMX(s)
n=1
(MX(s)(1 p))n1 = pMX(s)1 (1 p)MX(s)
for values of s such that (1 p)MX(s) < 1. This gives
MY(s) =p/( s)
1 (1 p)/( s)=
p
p s.
e) Comparing MY(s) with MX(s), we conclude that Y is therefore an exponential randomvariable with parameter p. Its mean mY and variance KY are therefore
mY =1
p, KY =
1
(p)2.
3
7/28/2019 mid2sol-12(2)
4/5
EEC161 Probabilistic Analysis of Electrical and Computer Systems Spring 2012
Problem 3:
a) Since X and Y are independent, their joint density is given by
fX Y(x, y) = fX(x)fY(y) = exp((x + y))u(x)u(y) .
b) The transformation can be written in matrix form asUV
= A
XY
, (1)
where
A =
1 11 1
.
The transformation (1) is one-to-one and its inverse is given byXY
=
h1(U, V)h2(U, V)
= A1
UV
withA1 =
1
2
1 11 1
.
The Jacobian J(u, v) of the transformation (1) is given by
J = | det A1| = 12
,
and the joint density of U and V can be expressed as
fU V(u, v) = J(u, v)fX Y(h1(u, v), h2(u, v))
=1
2exp(u)u(u + v)u(u v)
=
12 exp(u) u > |v|
0 otherwise .
c) The marginal density of U is
fU(u) =
fU V(u, v)dv
=1
2exp(u)u(u)
uu
dv = u exp(u)u(u) ,
which is an Erlang distribution of order 1 and parameter = 1, as expected since U is the
sum of two exponential random variables with parameter = 1. The marginal density ofV is
fV(v) =
fU V(u, v)du
=1
2
|v|
exp(u)du = 12
exp(|v|) ,
4
7/28/2019 mid2sol-12(2)
5/5
EEC161 Probabilistic Analysis of Electrical and Computer Systems Spring 2012
so that V has a Laplace distribution with parameter = 1.
d) The joint densityfU,V(u, v) = fU(u)fV(v) ,
so U and V are not independent.
e) The random variables U and V have for meanmUmV
= A
mXmY
=
1 11 1
11
=
20
,
and for covarianceKU KU V
KV U KV
= E
U mUV mV
U mU V mV
= A
1 00 1
AT =
2 00 2
.
Since KU V = E[(UmU)(V mV)] = 0, we conclude that U and V are uncorrelated eventhough they are not independent.
Problem 4
a) By the central limit theorem, for large n, the random variable
Yn =Sn mXn
KXn=
Sn 3n3
n
is N(0, 1) distributed. For n = 100, we find therefore
P[Sn > 360] = P[Yn >60
30] = P[Yn > 2]
= Q(2) = 2.275.102 ,
so there is roughly only a 2% chance the parking lot capacity will be exceeded after 100days.
b) On day N, we have
P[SN > 360] = P
YN >
360 3N3
N = Q
120 N
N
= 1
2,
so that120 N
N= Q1(1/2) = 0
and thus N = 120.
5