Hw4soln 06
Hw4soln 06
Solutions to HW4
Note: Most of these solutions were generated by R. D. Yates and D. J. Goodman, the
authors of our textbook. I have added comments in italics where I thought more detail was
appropriate.
Problem 2.2.6
You are manager of a ticket agency that sells concert tickets. You assume that people will
call three times in an attempt to buy tickets and then give up. You want to make sure that
you are able to serve at least 95% of the people who want tickets. Let p be the probability
that a caller gets through to your ticket agency. What is the minimum value of p necessary
to meet your goal.
Problem 2.2.7
In the ticket agency of Problem 2.2.6, each telephone ticket agent is available to receive a
call with probability 0.2. If all agents are busy when someone calls, the caller hears a busy
signal. What is the minimum number of agents that you have to hire to meet your goal of
serving 95% of the customers who want tickets?
Problem 2.2.9
When someone presses “SEND” on a cellular phone, the phone attempts to set up a call by
transmitting a “SETUP” message to a nearby base station. The phone waits for a response
and if none arrives within 0.5 seconds it tries again. If it doesn’t get a response after n = 6
tries the phone stops transmitting messages and generates a busy signal.
(a) Draw a tree diagram that describes the call setup procedure.
(b) If all transmissions are independent and the probability is p that a “SETUP” message
will get through, what is the PMF of K, the number of messages transmitted in a call
attempt?
(c) What is the probability that the phone will generate a busy signal?
ECE302 Spring 2006 HW4 Solutions February 6, 2006 2
(d) As manager of a cellular phone system, you want the probability of a busy signal to
be less than 0.02 If p = 0.9, what is the minimum value of n necessary to achieve your
goal?
(a) In the setup of a mobile call, the phone will send the “SETUP” message up to six
times. Each time the setup message is sent, we have a Bernoulli trial with success
probability p. Of course, the phone stops trying as soon as there is a success. Using
r to denote a successful response, and n a non-response, the sample tree is
(b) We can write the PMF of K, the number of “SETUP” messages sent as
(1 − p)k−1 p
k = 1, 2, . . . , 5
PK (k) = (1 − p)5 p + (1 − p)6 = (1 − p)5 k = 6 (1)
0 otherwise
Note that the expression for PK (6) is different because K = 6 if either there was a
success or a failure on the sixth attempt. In fact, K = 6 whenever there were failures
on the first five attempts which is why PK (6) simplifies to (1 − p)5 .
(c) Let B denote the event that a busy signal is given after six failed setup attempts. The
probability of six consecutive failures is P [B] = (1 − p)6 .
Problem 2.3.10
A radio station gives a pair of concert tickets to the sixth caller who knows the birthday of
the performer. For each person who calls, the probability is 0.75 of knowing the performer’s
birthday. All calls are independent.
(a) What is the PMF of L, the number of calls necessary to find the winner?
(b) What is the probability of finding the winner on the tenth call?
(c) What is the probability that the station will need nine or more calls to find a winner?
(a) We can view whether each caller knows the birthdate as a Bernoulli trial. As a result,
L is the number of trials needed for 6 successes. That is, L has a Pascal PMF with
parameters p = 0.75 and k = 6 as defined by Definition 2.8. In particular,
l−1 6 l−6 l = 6, 7, . . .
PL (l) = 5 (0.75) (0.25) (1)
0 otherwise
(c) The probability that the station will need nine or more calls to find a winner is
P [L ≥ 9] = 1 − P [L < 9] (3)
= 1 − PL (6) − PL (7) − PL (8) (4)
6 2
= 1 − (0.75) [1 + 6(0.25) + 21(0.25) ] ≈ 0.321 (5)
Problem 2.3.11
In a packet voice communications system, a source transmits packets containing digitized
speech to a receiver. Because transmission errors occasionally occur, an acknowledgment
(ACK) or a nonacknowledgment (NAK) is transmitted back to the source to indicate the
status of each received packet. When the transmitter gets a NAK, the packet is retrans-
mitted. Voice packets are delay sensitive and a packet can be transmitted a maximum of
d times. If a packet transmission is an independent Bernoulli trial with success probability
p, what is the PMF of T , the number of times a packet is transmitted?
p(1 − p)t−1 t = 1, 2, . . . , d − 1
Problem 2.4.5
At the One Top Pizza Shop, a pizza sold has mushrooms with probability p = 2/3. On
a day in which 100 pizzas are sold, let N equal the number of pizzas sold before the first
pizza with mushrooms is sold. What is the PMF of N ? What is the CDF of N ?
ECE302 Spring 2006 HW4 Solutions February 6, 2006 4
(1/3)n (2/3) n = 0, 1, . . . , 99
A complete expression for FN (n) must give a valid answer for every value of n, including
non-integer values. We can write the CDF using the floor function ⌊x⌋ which denote the
largest integer less than or equal to X. The complete expression for the CDF is
0 x<0
FN (x) = 1 − (1/3)⌊x⌋+1 0 ≤ x < 100 (3)
1 x ≥ 100
Problem 2.4.8
In Problem 2.2.9, find and sketch the CDF of N , the number of attempts made by the
cellular phone for p = 1/2.
(1 − p)k−1 p
k = 1, 2, . . . , 5
PN (n) = (1 − p)5 p + (1 − p)6 = (1 − p)5 k = 6 (1)
0 otherwise
(1/2)n n = 1, 2, . . . , 5
0.5
0.25 FN (n) = 7/8 3≤n<4 (3)
0
15/16 4≤n<5
0 1 2 3 4 5 6 7
31/32 5≤n<6
n
1 n≥6
ECE302 Spring 2006 HW4 Solutions February 6, 2006 5
Problem 2.6.5
A source wishes to transmit data packets to a receiver over a radio link. The receiver uses
error detection to identify packets that have been corrupted by radio noise. When a packet is
received error-free, the receiver sends an acknowledgment (ACK) back to the source. When
the receiver gets a packet with errors, a negative acknowledgment (NAK) message is sent
back to the source. Each time the source receives a NAK, the packet is retransmitted. We
assume that each packet transmission is independently corrupted by errors with probability
q.
(a) Find the PMF of X, the number of times that a packet is transmitted by the source.
(b) Suppose each packet takes 1 millisecond to transmit and that the source waits an
additional millisecond to receive the acknowledgment message (ACK or NAK) before
retransmitting. Let T equal the time required until the packet is successfully received.
What is the relationship between T and X? What is the PMF of T ?
(a) The source continues to transmit packets until one is received correctly. Hence, the
total number of times that a packet is transmitted is X = x if the first x − 1 trans-
missions were in error. Therefore the PMF of X is
x−1
q (1 − q) x = 1, 2, . . .
PX (x) = (1)
0 otherwise
(b) The time required to send a packet is a millisecond and the time required to send an
acknowledgment back to the source takes another millisecond. Thus, if X transmis-
sions of a packet are needed to send the packet correctly, then the packet is correctly
received after T = 2X − 1 milliseconds. Therefore, for an odd integer t > 0, T = t iff
X = (t + 1)/2. Thus,
(t−1)/2
q (1 − q) t = 1, 3, 5, . . .
PT (t) = PX ((t + 1)/2) = (2)
0 otherwise
Problem 2.6.6
Suppose that a cellular phone costs $20 per month with 30 minutes of use included and that
each additional minute of use costs $0.50. If the number of minutes you use in a month is
a geometric random variable M with expected value of E[M ] = 1/p = 30 minutes, what is
the PMF of C, the cost of the phone for one month?
you spend on the phone is a geometric random variable M with mean 1/p = 30, the PMF
of M is
(1 − p)m−1 p m = 1, 2, . . .
PM (m) = (1)
0 otherwise
The monthly cost, C obeys
30
X
PC (20) = P [M ≤ 30] = (1 − p)m−1 p = 1 − (1 − p)30 (2)
m=1
1 − (1 − p)30
c = 20
PC (c) = 2c−10−1 (4)
(1 − p) p c = 20.5, 21, 21.5, . . .
Problem 2.7.5
For the cellular phone in Problem 2.6.6, express the monthly cost C as a function of M ,
the number of minutes used. What is the expected monthly cost E[C]?
Problem 2.7.6
A new cellular phone billing plan costs $15 per month plus $1 for each minute of use. If
the number of minutes you use the phone in a month is a geometric random variable with
mean 1/p, what is the expected monthly cost E[C] of the phone? For what values of p is
this billing plan preferable to the billing plan of Problem 2.6.6 and Problem 2.7.5?
(1 − p)m−1 p m = 1, 2, . . .
PM (m) = (1)
0 otherwise
For this cellular billing plan, we are given no free minutes, but are charged half the flat fee.
That is, we are going to pay 15 dollars regardless and $1 for each minute we use the phone.
Hence C = 15 + M and for c ≥ 16, P [C = c] = P [M = c − 15]. Thus we can construct the
PMF of the cost C
(1 − p)c−16 p c = 16, 17, . . .
PC (c) = (2)
0 otherwise
Since C = 15 + M , the expected cost per month of the plan is
In Problem 2.7.5, we found that that the expected cost of the plan was
In comparing the expected costs of the two plans, we see that the new plan is better (i.e.
cheaper) if
15 + 1/p ≤ 20 + [(1 − p)30 ]/(2p) (5)
A simple plot will show that the new plan is better if p ≤ p0 ≈ 0.2.
Problem 2.8.5
Let X have the binomial PMF
4
PX (x) = (1/2)4 .
x
Problem 2.8.6
The binomial random variable X has PMF
5
PX (x) = (1/2)5 .
x
(a) Find the standard deviation of X.
(b) Find P [µX − σX ≤ X ≤ µX + σX ], the probability that X is within one standard
deviation of the expected value.
The variance of X is
(b) The probability that X is within one standard deviation of its mean is
Problem 2.9.5 •
In Problem 2.8.6, find PX|B (x), where the condition B = {X ≥ µX }. What are E[X|B]
and Var[X|B]?
Problem 2.9.6
Select integrated circuits, test them in sequence until you find the first failure, and then
stop. Let N be the number of tests. All tests are independent with probability of failure
p = 0.1. Consider the condition B = {N ≥ 20}.
(a) Find the PMF PN (n).
(b) Find PN |B (n), the conditional PMF of N given that there have been 20 consecutive
tests without a failure.
(c) What is E[N |B], the expected number of tests given that there have been 20 consec-
utive tests without a failure?
(a) Consider each circuit test as a Bernoulli trial such that a failed circuit is called a
success. The number of trials until the first success (i.e. a failed circuit) has the
geometric PMF
(1 − p)n−1 p n = 1, 2, . . .
PN (n) = (1)
0 otherwise
(b) The probability there are at least 20 tests is
∞
X
P [B] = P [N ≥ 20] = PN (n) = (1 − p)19 (2)
n=20
Note that (1 − p)19 is just the probability that the first 19 circuits pass the test, which
is what we would expect since there must be at least 20 tests if the first 19 circuits
pass. The conditional PMF of N given B is
(
PN (n)
(1 − p)n−20 p n = 20, 21, . . .
P [B] n∈B
PN |B (n) = = (3)
0 otherwise 0 otherwise
ECE302 Spring 2006 HW4 Solutions February 6, 2006 11
We see that in the above sum, we effectively have the expected value of J + 19 where
J is geometric random variable with parameter p. This is not surprising since the
N ≥ 20 iff we observed 19 successful tests. After 19 successful tests, the number of
additional tests needed to find the first failure is still a geometric random variable
with mean 1/p.
Problem 2.9.7
Every day you consider going jogging. Before each mile, including the first, you will quit
with probability q, independent of the number of miles you have already run. However, you
are sufficiently decisive that you never run a fraction of a mile. Also, we say you have run
a marathon whenever you run at least 26 miles.
(a) Let M equal the number of miles that you run on an arbitrary day. What is P [M > 0]?
Find the PMF PM (m).
(b) Let r be the probability that you run a marathon on an arbitrary day. Find r.
(c) Let J be the number of days in one year (not a leap year) in which you run a marathon.
Find the PMF PJ (j). This answer may be expressed in terms of r found in part (b).
(d) Define K = M − 26. Let A be the event that you have run a marathon. Find PK|A (k).
(b) The probability that we run a marathon on any particular day is the probability that
M ≥ 26.
X∞
r = P [M ≥ 26] = q(1 − q)m = (1 − q)26 (3)
m=26
ECE302 Spring 2006 HW4 Solutions February 6, 2006 12
(c) We run a marathon on each day with probability equal to r, and we do not run a
marathon with probability 1 − r. Therefore in a year we have 365 tests of our jogging
resolve, and thus 365 chances to run a marathon. So the PMF of the number of
marathons run in a year, J, can be expressed as
365 j 365−j j = 0, 1, . . . , 365
PJ (j) = j r (1 − r) (4)
0 otherwise
(d) The random variable K is defined as the number of miles we run above that required
for a marathon, K = M − 26. Given the event, A, that we have run a marathon, we
wish to know how many miles in excess of 26 we in fact ran. So we want to know the
conditional PMF PK|A (k).
P [K = k, A] P [M = 26 + k]
PK|A (k) = = (5)
P [A] P [A]
(1 − q)26+k q
PK|A (k) = = (1 − q)k q (6)
(1 − q)26
(1 − q)k q k = 0, 1, . . .
PK|A (k) = (7)
0 otherwise
Problem 2.9.8
In the situation described in Example 2.29, the firm sends all faxes with an even number of
pages to fax machine A and all faxes with an odd number of pages to fax machine B.
(a) Find the conditional PMF of the length X of a fax, given the fax was sent to A. What
are the conditional expected length and standard deviation?
(b) Find the conditional PMF of the length X of a fax, given the fax was sent to B and
had no more than six pages. What are the conditional expected length and standard
deviation?
(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 SX = {1, 2, . . . , 8}, we
define the set A = {2, 4, 6, 8}. Using this definition for A, we have that the event that
a fax is sent to A is equivalent to the event X ∈ A. The event A has probability
(b) Let the event B ′ denote the event that the fax was sent to B and that the fax had no
more than 6 pages. Hence, the event B ′ = {1, 3, 5} has probability
Given the event B ′ , the conditional first and second moments are
X
E X|B ′ =
xPX|B ′ (x) = 1(3/8) + 3(3/8) + 5(1/4)+ = 11/4 (10)
x
X 2
E X 2 |B ′ =
x PX|B ′ (x) = 1(3/8) + 9(3/8) + 25(1/4) = 10 (11)
x
Problem 2.10.6
Test the convergence of Theorem 2.8. For α = 10, plot the PMF of Kn for (n, p) = (10, 1),
(n, p) = (100, 0.1), and (n, p) = (1000, 0.01) and compare against the Poisson (α) PMF.
For (n, p) = (10, 1), the binomial PMF has no randomness. For (n, p) = (100, 0.1), the
approximation is reasonable:
1 0.2
0.8
0.15
0.6
0.1
0.4
0.05
0.2
0 0
0 5 10 15 20 0 5 10 15 20
(a) n = 10, p = 1 (b) n = 100, p = 0.1
Finally, for (n, p) = (1000, 0.01), and (n, p) = (10000, 0.001), the approximation is very
good:
0.2 0.2
0.15 0.15
0.1 0.1
0.05 0.05
0 0
0 5 10 15 20 0 5 10 15 20
(a) n = 1000, p = 0.01 (b) n = 10000, p = 0.001