The conditional rst and second moments of X are
E [X |B] =
x PX |B (x) = 5(2/3) + 7(1/3) = 17/3
(3)
x 2 PX |B (x) = 52 (2/3) + 72 (1/3) = 33
(4)
x
E X 2 |B =
x
The conditional variance of X is
Var[X |B] = E X 2 |B (E [X |B])2 = 33 (17/3)2 = 8/9
(5)
Proble

Problem 2.9.7 Solution
(a) The PMF of M, the number of miles run on an arbitrary day is
m = 0, 1, . . .
otherwise
(1)
P [M > 0] = 1 P [M = 0] = 1 q
(2)
q(1 q)m
0
PM (m) =
And we can see that the probability that M > 0, is
(b) The probability that we run a

The conditional rst and second moments of Y are
E [Y |B] =
y PY |B (y) = 1(1/2) + 2(1/2) = 3/2
(3)
y 2 PY |B (y) = 12 (1/2) + 22 (1/2) = 5/2
(4)
Var[Y |B] = E Y 2 |B (E [Y |B])2 = 5/2 9/4 = 1/4
(5)
y
E Y 2 |B =
y
The conditional variance of Y is
Problem 2

To nd E[K 2 ], we use the hint and rst nd
k(k 1)
E [K (K 1)] =
k=0
k e
=
k!
k=2
k e
(k 2)!
(3)
By factoring out 2 and substituting j = k 2, we obtain
E [K (K 1)] = 2
j=0
j e
= 2
j!
(4)
1
The above sum equals 1 because it is the sum of a Poisson PMF over

Problem 2.8.9 Solution
With our measure of jitter being T , and the fact that T = 2X 1, we can express the jitter as a
function of q by realizing that
Var[T ] = 4 Var[X ] =
4q
(1 q)2
(1)
Therefore, our maximum permitted jitter is
T =
2 q
= 2 msec
(1 q)
(2

The variance of X is
Var[X ] = E X 2 (E [X ])2 = 15/2 25/4 = 5/4
By taking the square root of the variance, the standard deviation of X is X =
(7)
5/4 1.12.
(b) The probability that X is within one standard deviation of its mean is
P [ X X X X + X ] = P [

(c) So that we can use the results of the previous part, suppose there were 2n 1 tickets sold before you must make your decision. If you buy one of each possible ticket, you are guaranteed
to have one winning ticket. From the other 2n 1 tickets, there wil

(a) The event that a fax was sent to machine A can be expressed mathematically as the event that
the number of pages X is an even number. Similarly, the event that a fax was sent to B is the
event that X is an odd number. Since S X = cfw_1, 2, . . . , 8,

Thus we wish to nd
k = min k |
c(n)
1
p
p = min k |
.
c(k )
c(k )
c(n)
(5)
Note that the denition of k implies that
1
p
<
,
c(k )
c(n)
k = 1, . . . , k 1.
(6)
Using the notation |A| to denote the number of elements in the set A, we can write
k =1+
k|
1
p

(b)
P [V > 4] = 1 P [V 4] = 1 FV (4) = 1 81/144 = 63/144
(2)
P [3 < V 0] = FV (0) FV (3) = 25/144 4/144 = 21/144
(3)
(c)
(d) Since 0 FV (v) 1 and since FV (v) is a nondecreasing function, it must be that 5 a
7. In this range,
P [V > a] = 1 FV (a) = 1 (a

(b) By part (a),
nx
nx
nx + 1
n
n
n
(1)
That is,
x
nx
1
x+
n
n
(2)
This implies
nx
1
lim x + = x
n
n
n
x lim
n
(3)
(c) In the same way, nx is the largest integer that is less than or equal to nx. This implies
nx 1 nx nx. It follows that
nx 1
nx
nx
n
n
n

Problem Solutions Chapter 3
Problem 3.1.1 Solution
x < 1
0
(x + 1)/2 1 x < 1
FX (x) =
1
x 1
The CDF of X is
(1)
Each question can be answered by expressing the requested probability in terms of FX (x).
(a)
P [X > 1/2] = 1 P [X 1/2] = 1 FX (1/2) = 1 3/4 =

Since k is an integer, it must be the smallest integer greater than or equal to ln(1 R)/ ln(1 p).
That is, following the last step of the random sample algorithm,
K = k =
ln(1 R)
ln(1 p)
(6)
The M ATLAB algorithm that implements this operation is quite si

For m = 100, the results are arguably more consistent:
> [avgfax(100) avgfax(100) avgfax(100) avgfax(100)]
ans =
34.5300
33.3000
29.8100
33.6900
>
Finally, for m = 1000, we obtain results reasonably close to E[Y ]:
> [avgfax(1000) avgfax(1000) avgfax(1000

Problem 2.10.5 Solution
We use poissonrv.m to generate random samples of a Poisson ( = 5) random variable. To
compare the Poisson PMF against the output of poissonrv, relative frequencies are calculated
using the hist function. The following code plots th

Problem 2.10.1 Solution
For a binomial (n, p) random variable X , the solution in terms of math is
n
P [E 2 ] =
PX x 2
(1)
x=0
In terms of M ATLAB, the efcient solution is to generate the vector of perfect squares x = [0 1 4 9 16 .]
and then to pass that

The expected value of Y is
y PY (y) = 1(1/4) + 2(1/4) + 3(1/2) = 9/4
(2)
y 2 PY (y) = 12 (1/4) + 22 (1/4) + 32 (1/2) = 23/4
(3)
E [Y ] =
y
The expected value of Y 2 is
E Y2 =
y
The variance of Y is
Var[Y ] = E Y 2 (E [Y ])2 = 23/4 (9/4)2 = 11/16
(4)
Probl

(a) Let X = 1 if a data packet is decoded correctly; otherwise X = 0. Random variable X is a
Bernoulli random variable with PMF
0.001 x = 0
0.999 x = 1
PX (x) =
(1)
0
otherwise
The parameter
= 0.001 is the probability a packet is corrupted. The expected

Problem 2.5.5 Solution
From the solution to Problem 2.4.3, the PMF of X is
0.4 x = 3
0.4 x = 5
PX (x) =
0.2 x = 7
0
otherwise
(1)
The expected value of X is
x PX (x) = 3(0.4) + 5(0.4) + 7(0.2) = 2.2
E [X ] =
(2)
x
Problem 2.5.6 Solution
From Denition 2.

(b) The median must satisfy P[X < xmed ] = P[X > xmed ]. Since
P [X 50] = P [X 51] = 1/2
(2)
we observe that xmed = 50.5 is a median since it satises
P [X < xmed ] = P [X > xmed ] = 1/2
(3)
In fact, for any x satisfying 50 < x < 51, P[X < x ] = P[X > x ]

Problem 2.4.5 Solution
Since mushrooms occur with probability 2/3, the number of pizzas sold before the rst mushroom
pizza is N = n < 100 if the rst n pizzas do not have mushrooms followed by mushrooms on pizza
n + 1. Also, it is possible that N = 100 if

X
F (x)
(a) The given CDF is shown in the diagram below.
1
0.8
0.6
0.4
0.2
0
2
1
0
x
1
0
0.2
FX (x) =
0.7
1
2
x < 1
1 x < 0
0x <1
x 1
(1)
(b) The corresponding PMF of X is
0.2
0.5
PX (x) =
0.3
0
x = 1
x =0
x =1
otherwise
(2)
Problem 2.4.3 Solution
X
F

(a) Let Sn denote the event that the Sixers win the series in n games. Similarly, Cn is the event
that the Celtics in in n games. The Sixers win the series in 3 games if they win three straight,
which occurs with probability
P [S3 ] = (1/2)3 = 1/8
(1)
The

Problem 2.3.11 Solution
The packets are delay sensitive and can only be retransmitted d times. For t < d, a packet is
transmitted t times if the rst t 1 attempts fail followed by a successful transmission on attempt
t. Further, the packet is transmitted d

The corresponding CDF of Y is
y<0
0
1 p 0 y <1
FY (y) =
1 p2 1 y < 2
1
y2
(2)
0
1
y
2
p = 1/4
3
1
0.75
0.5
0.25
0
1
1
0.75
0.5
0.25
0
1
FY(y)
1
0.75
0.5
0.25
0
1
FY(y)
FY(y)
for the three values of p, the CDF resembles
0
1
y
2
3
p = 1/2
(3)
0
1
y
2
3
p

Problem 2.5.10 Solution
By the denition of the expected value,
n
E [X n ] =
x
x=1
n x
p (1 p)nx
x
(1)
(n 1)!
p x1 (1 p)n1(x1)
(x 1)!(n 1 (x 1)!
(2)
n
= np
x=1
With the substitution x = x 1, we have
n1
n1 x
p (1 p)nx = np
x
E [X n ] = np
x =0
n1
PX n1 (x)