function x=modemrv(m);
%Usage: x=modemrv(m)
%generates m samples of X, the modem
%receiver voltage in Exampe 3.32.
%X=+-5 + N where N is Gaussian (0,2)
sb=[-5; 5]; pb=[0.5; 0.5];
b=finiterv(sb,pb,m);
noise=gaussrv(0,2,m);
x=b+noise;
The commands
x=modemrv
(a) If X is uniform (b, c), then Y = a X has PDF
f Y (y) =
1
a(cb)
1
f X (y/a) =
a
0
b y/a c
otherwise
1
acab
=
0
ab y ac
otherwise
(2)
Thus Y has the PDF of a uniform (ab, ac) random variable.
(b) Using Theorem 3.19, the PDF of Y = a X is
f Y (y) =
1
f X
Problem 3.7.11 Solution
The PDF of U is
fU (u) =
1/2 1 u 1
0
otherwise
(1)
Since W 0, we see that FW (w) = 0 for w < 0. Next, we observe that the rectier output W is a
mixed random variable since
0
P [W = 0] = P [U < 0] =
1
fU (u) du = 1/2
(2)
The above f
Problem 3.7.9 Solution
The uniform (0, 2) random variable U has PDF and CDF
u < 0,
0
u/2 0 u < 2,
FU (u) =
1
u > 2.
1/2 0 u 2,
0
otherwise,
fU (u) =
(1)
The uniform random variable U is subjected to the following clipper.
U
1
W = g(U ) =
U 1
U >1
(2)
To
(b) For 0 l 0.5,
FL (l) = P [|V | l] = P [l v l] = FV (l) FV (l)
= 1/2(l + 1) 1/2(l + 1) = l
0 l<0
l 0 l < 0.5
FL (l) =
1 l 0.5
So the CDF of L is
(6)
(7)
(8)
(c) By taking the derivative of FL (l), the PDF of L is
1 + (0.5)(l 0.5) 0 l 0.5
0
otherwise
f
(b) By taking the derivative, the PDF is
f X (x) =
ex
0
x 0
otherwise
(4)
Thus, X has an exponential PDF. In fact, since most computer languages provide uniform
[0, 1] random numbers, the procedure outlined in this problem provides a way to generate
expon
Hence, the CDF of Y is
y<0
0
y 0y<1
FY (y) =
1
y1
By taking the derivative of the CDF, we obtain the PDF
1/(2 y) 0 y < 1
f Y (y) =
0
otherwise
(3)
(4)
Problem
3.7.2 Solution
Since Y = X , the fact that X is nonegative and that we asume the squre root is
(a) We can nd the CDF of Y , FY (y) by noting that Y can only take on two possible values, 0
and 100. And the probability that Y takes on these two values depends on the probability that
X < 0 and X 0, respectively. Therefore
y<0
0
P [X < 0] 0 y < 100
FY
Another way to write this CDF is
FD (y) = 0.3u(y) + 0.7u(y 60)(1 e(y60)/10 )
(6)
However, when we take the derivative, either expression for the CDF will yield the PDF. However,
taking the derivative of the rst expression perhaps may be simpler:
0.3(y)
0.
Therefore the CDF of Y is
FY (y) =
0
y<a
ayb
yb
ya
ba
1
(5)
By differentiating with respect to y we arrive at the PDF
1/(b a) a x b
0
otherwise
f Y (y) =
(6)
which we recognize as the PDF of a uniform (a, b) random variable.
Problem 3.7.14 Solution
Since
Problem 3.7.16 Solution
We can prove the assertion by considering the cases where a > 0 and a < 0, respectively. For the
case where a > 0 we have
FY (y) = P [Y y] = P X
yb
= FX
a
yb
a
(1)
Therefore by taking the derivative we nd that
f Y (y) =
yb
a
1
fX
Problem 3.8.9 Solution
For this problem, almost any non-uniform random variable X will yield a non-uniform random
variable Z . For example, suppose X has the triangular PDF
8x/r 2 0 x r/2
0
otherwise
f X (x) =
In this case, the event Bi that Y = i
+
/2 oc
Thus,
P T |H P [H ]
P [T |D] P [D] + P [T |H ] P [H ]
0.841(0.9)
=
= 0.986
0.106(0.1) + 0.841(0.9)
P H |T =
(10)
(11)
(d) Since T , T 0 , and T + are mutually exclusive and collectively exhaustive,
P T 0 |H = 1 P T |H P T + |H = 1 0.841 0.006 = 0.153
(12)
(b) If instead we learn that D 70, we can calculate the conditional PDF by rst calculating
70
P [D 70] =
f D (y) dy
(4)
0
60
=
0.3(y) dy +
0
70
0.07e(y60)/10 dy
(5)
70
60
(6)
60
= 0.3 + 0.7e(y60)/10
= 1 0.7e1
The conditional PDF is
f D (y)
P[D70]
f D|D70
The conditional expected value of T is
E [T |T > 0.02] =
t (100)e100(t0.02) dt
(4)
0.02
The substitution = t 0.02 yields
E [T |T > 0.02] =
0
=
( + 0.02)(100)e100 d
(5)
( + 0.02) f T ( ) d = E [T + 0.02] = 0.03
(6)
0
(b) The conditional second moment of T
(a) Since W has expected value = 0, f W (w) is symmetric about w = 0. Hence P[C] =
P[W > 0] = 1/2. From Denition 3.15, the conditional PDF of W given C is
2
f W (w) /P [C] w C
2ew /32 / 32 w > 0
(2)
f W |C (w) =
=
0
otherwise
0
otherwise
(b) The condition
(b) The conditional expected value of Y given A is
E [Y |A] =
1/5
1 e2/5
y f Y |A (y) dy =
Using the integration by parts formula
yields
u dv = uv
2
yey/5 dy
(5)
0
v du with u = y and dv = ey/5 dy
2
1/5
2
5yey/5 0 +
5ey/5 dy
1 e2/5
0
1/5
2
=
10e2/5 25ey/
To show B A, we suppose event B is true so that U FX (x). We dene the set
L = x |FX x
U .
(8)
We note x L. It follows that the minimum element mincfw_x |x L x. That is,
min x |FX x
U x,
(9)
which is simply event A.
Problem 3.8.1 Solution
The PDF of X is
Problem 3.7.18 Solution
(a) Given FX (x) is a continuous function, there exists x0 such that FX (x0 ) = u. For each value of
u, the corresponding x0 is unique. To see this, suppose there were also x1 such that FX (x1 ) =
u. Without loss of generality, we
(c) From the PDF f W (w), calculating the moments is straightforward.
E [W ] =
w f W (w) dw = (1/2)
w f X (w) dw = E [X ] /2
(5)
w 2 f X (w) dw = E X 2 /2
(6)
The second moment is
E W2 =
w 2 f W (w) dw = (1/2)
The variance of W is
Var[W ] = E W 2 (E [W ])
Problem 3.6.4 Solution
The PMF of a Bernoulli random variable with mean p is
1 p x =0
p
x =1
PX (x) =
0
otherwise
(1)
The corresponding PDF of this discrete random variable is
f X (x) = (1 p)(x) + p(x 1)
(2)
Problem 3.6.5 Solution
The PMF of a geometric
Problem 3.6.2 Solution
Similar to the previous problem we nd
(a)
P [X < 1] = FX 1 = 0
P [X 1] = FX (1) = 1/4
(1)
Here we notice the discontinuity of value 1/4 at x = 1.
(b)
P [X < 0] = FX 0 = 1/2
P [X 0] = FX (0) = 1/2
(2)
Since there is no discontinuity
Problem 3.4.6 Solution
We know that X has a uniform PDF over [a, b) and has mean X = 7 and variance Var[X ] = 3.
All that is left to do is determine the values of the constants a and b, to complete the model of the
uniform PDF.
(b a)2
a+b
=7
Var[X ] =
=3
(c) The probability that 1/2 Y < 3/2 is
3/2
P [1/2 Y < 3/2] =
3/2
f Y (y) dy =
1/2
4ye2y dy
(2)
1/2
This integral is easily completed using the integration by parts formula
with
u dv = uv v du
dv = 2e2y
u = 2y
v = e2y
du = 2dy
Making these substitutions,
(a) The expected value of V is
E [V ] =
=
v f V (v) dv =
1
72
v 3 5v 2
+
3
2
7
1
72
7
5
=
5
(v 2 + 5v) dv
(2)
343 245 125 125
+
+
3
2
3
2
1
72
=3
(3)
(b) To nd the variance, we rst nd the second moment
E V2 =
(v 3 + 5v 2 ) dv
(4)
= 6719/432 = 15.55
(5)
5
(c) Note that 2U = e(ln 2)U . This implies that
1 (ln 2)u
2u
=
e
ln 2
ln 2
e(ln 2)u du =
2u du =
(6)
3 2u
du
8
(7)
The expected value of 2U is then
E 2U =
3
2u fU (u) du =
2u
du +
8
5
u
2
8 ln 2
=
3
5
+
5
3
3 2u
8 ln 2
5
=
3
2307
= 13.001
256 ln 2
(8)
Pro
For x = 2/3, the requirement holds for all a. However, the problem is tricky because we must
consider the cases 0 x < 2/3 and 2/3 < x 1 separately because of the sign change of the
inequality. When 0 x < 2/3, we have 2/3 x > 0 and the requirement is most
Problem 3.3.4 Solution
We can nd the expected value of X by direct integration of the given PDF.
f Y (y) =
y/2 0 y 2
0
otherwise
(1)
The expectation is
2
E [Y ] =
0
y2
dy = 4/3
2
(2)
To nd the variance, we rst nd the second moment
2
E Y2 =
0
y3
dy = 2.
2
Problem 3.3.2 Solution
(a) Since the PDF is uniform over [1,9]
E [X ] =
1+9
=5
2
Var [X ] =
(9 1)2
16
=
12
3
(1)
(b) Dene h(X ) = 1/ X then
h(E [X ]) = 1/ 5
x 1/2
d x = 1/2
8
9
E [h(X )] =
(2)
1
(3)
(c)
E [Y ] = E [h(X )] = 1/2
(4)
9
Var [Y ] = E Y 2 (E [
Problem 3.4.2 Solution
From Appendix A, we observe that an exponential PDF Y with parameter > 0 has PDF
ey y 0
0
otherwise
f Y (y) =
(1)
1
2
(2)
In addition, the mean and variance of Y are
1
E [Y ] =
Var[Y ] =
(a) Since Var[Y ] = 25, we must have = 1/5.
(