Solutions to HW1 Problem 3.2.2 • Problem 3.2.2 Solution

Transcription

Solutions to HW1 Problem 3.2.2 • Problem 3.2.2 Solution
ECE302 Spring 2015
HW3 Solutions
February 17, 2015
1
Solutions to HW1
Note: Some of these solutions were generated by R. D. Yates and D. J. Goodman, the
authors of our textbook. To these I have added comments in italics where I thought more
detail might be appropriate. Solutions indicated by (SK) are my own.
Problem 3.2.2 •
The random variable V has PMF
PV (v) =
cv 2 v = 1, 2, 3, 4,
0
otherwise.
(a) Find the value of the constant c.
(b) Find P [V ∈ {u2 |u = 1, 2, 3, · · ·}].
(c) Find the probability that V is an even number.
(d) Find P [V > 2].
Problem 3.2.2 Solution
(a) We must choose c to make the PMF of V sum to one.
4
X
PV (v) = c(12 + 22 + 32 + 42 ) = 30c = 1
(1)
v=1
Hence c = 1/30.
(b) Let U = {u2 |u = 1, 2, . . .} so that
P [V ∈ U ] = PV (1) + PV (4) =
1
42
17
+
=
30 30
30
(2)
(c) The probability that V is even is
P [V is even] = PV (2) + PV (4) =
22
42
2
+
=
30 30
3
(3)
(d) The probability that V > 2 is
P [V > 2] = PV (3) + PV (4) =
32
42
5
+
=
30 30
6
(4)
ECE302 Spring 2015
HW3 Solutions
February 17, 2015
2
Problem 3.2.4 (Paraphrased)
In each at-bat in a baseball game, Casey swings at every pitch. Let P [H1 ] = 0.05 be the per
pitch probability of a home run and P [S1 ] = 1 − P [H1 ] = 0.95 be the per pitch probability
of a strike. The at-bat ends on the third strike.
(a) Find P [H], the probability of a home run in a single at-bat.
(b) Find the PMF of N , the number of times Casey swings per at-bat.
Problem 3.2.4 Solution (SK)
Note that the order matters since the at-bat ends after either 3 strikes or a home run. Thus
N is a geometric rather than a Pascal random variable.
(a) The probability of a home run is one minus the probability of three strikes P [H] =
1 − P [H c ] = 1 − 0.95(0.95)0.95.
(b) For the case N = 3, there are two (mutually exclusive) possibilities: two strikes and
a home run or three strikes, so we must add the corresponding probabilities.

0.05
n=1



0.95(0.05)
n=2
PN [n] =
(5)
0.952 (0.05) + 0.953 n = 3



0
otherwise
Problem 3.2.8 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 3.2.8 Solution
The probability that a caller fails to get through in three tries is (1 − p)3 . To be sure that
at least 95% of all callers get through, we need (1 − p)3 ≤ 0.05. This implies p = 0.6316.
We can either consult the internet to find the formulae for the solution of a cubic equation
or we can use the Matlab command
roots([-1 3 -3 0.95])
where the coefficients are obtained by subtracting 0.05 from both sides of
1 − 3p + 3p2 − p3 ≤ 0.05.
(1)
ECE302 Spring 2015
HW3 Solutions
February 17, 2015
3
Problem 3.3.2 (Paraphrased)
Given: A bag of m&ms contains 25 m&ms, each of which is equally likely to be colored R,
G, O, Bl, or Br.
(a) Find the PMF of R.
(b) What is the probability of no red ones?
Problem 3.3.2 Solution (SK)
Order does not matter here, so the number of red m&ms R will have a binomial distribution.
(a) Where we define [25] := {1, 2, 3, . . . , 25},
r 25−4
25
1
4
PR (r) =
r
5
5
r ∈ [25].
(2)
(b) Using Matlab, we find that PR (0) = 0.0038 to four decimal places.
Problem 3.3.6 •
Anytime a child throws a Frisbee, the child’s dog catches the Frisbee with probability p,
independent of whether the Frisbee is caught on any previous throw. When the dog catches
the Frisbee, it runs away with the Frisbee, never to be seen again. The child continues to
throw the Frisbee until the dog catches it. Let X denote the number of times the Frisbee
is thrown.
(a) What is the PMF PX (x)?
(b) If p = 0.2, what is the probability that the child will throw the Frisbee more than
four times?
Problem 3.3.6 Solution
(a) Let X be the number of times the frisbee is thrown until the dog catches it and runs
away. Each throw of the frisbee can be viewed as a Bernoulli trial in which a success
occurs if the dog catches the frisbee an runs away. Thus, the experiment ends on the
first success and X has the geometric PMF
(1 − p)x−1 p x = 1, 2, . . .
PX (x) =
(1)
0
otherwise
(b) The child will throw the frisbee more than four times iff there are failures on the first
4 trials which has probability (1 − p)4 . If p = 0.2, the probability of more than four
throws is (0.8)4 = 0.4096.
ECE302 Spring 2015
HW3 Solutions
February 17, 2015
4
Note: There is a less elegant but equally effective way to solve the problem, which I show
below is equivalent.
P [X > 4] = 1 − (P [X = 4] + P [X = 3] + P [X = 2] + P [X = 1])
= 1 − p(1 − p)3 + p(1 − p)2 + p(1 − p) + p
= 1 − 4p + 6p2 − 4p3 + p4
4
= (1 − p)
(2)
(3)
(4)
(5)
Problem 3.3.8
The number of bytes B in an HTML file is a geometric(2.5 × 10−5 ) random variable. What
is the probability P[B > 500, 000] that a file has over 500,000 bytes?
Problem 3.3.8 Solution (SK)
We are given that
PB (b) =
p(1 − p)b−1 b ∈ {1, 2, 3, . . .},
0
otherwise.
Let q = 1 − p and apply Math Fact B.4 from the appendix. In terms of q,
(1 − q)q b−1 b ∈ {1, 2, 3, . . .},
PB (b) =
0
otherwise.
so
n
X
PB (b) = 1 − q n .
(6)
(7)
(8)
b=1
Then P [B > 500, 000] = 1 − (1 − (1 − 2.5 × 10−5 )).
Problem 3.3.10 •
The number of buses that arrive at a bus stop in T minutes is a Poisson random variable
B with expected value T /5.
(a) What is the PMF of B, the number of buses that arrive in T minutes?
(b) What is the probability that in a two-minute interval, three buses will arrive?
(c) What is the probability of no buses arriving in a 10-minute interval?
(d) How much time should you allow so that with probability 0.99 at least one bus arrives?
Problem 3.3.10 Solution
Since an average of T /5 buses arrive in an interval of T minutes, buses arrive at the bus
stop at a rate of 1/5 buses per minute.
ECE302 Spring 2015
HW3 Solutions
February 17, 2015
5
(a) From the definition of the Poisson PMF, the PMF of B, the number of buses in T
minutes, is
(T /5)b e−T /5 /b! b = 0, 1, . . .
PB (b) =
(1)
0
otherwise
(b) Choosing T = 2 minutes, the probability that three buses arrive in a two minute
interval is
PB (3) = (2/5)3 e−2/5 /3! ≈ 0.0072
(2)
(c) By choosing T = 10 minutes, the probability of zero buses arriving in a ten minute
interval is
PB (0) = e−10/5 /0! = e−2 ≈ 0.135
(3)
(d) The probability that at least one bus arrives in T minutes is
P [B ≥ 1] = 1 − P [B = 0] = 1 − e−T /5 ≥ 0.99
(4)
Rearranging yields T ≥ 5 ln 100 ≈ 23.0 minutes.
Problem 3.5.2 •
Voice calls cost 20 cents each and data calls cost 30 cents each. C is the cost of one telephone
call. The probability that a call is a voice call is P [V ] = 0.6. The probability of a data call
is P [D] = 0.4.
(a) Find PC (c), the PMF of C.
(b) What is E[C], the expected value of C?
Problem 3.5.2 Solution
Voice calls and data calls each cost 20 cents and 30 cents respectively. Furthermore the
respective probabilities of each type of call are 0.6 and 0.4.
(a) Since each call is either a voice or data call, the cost of one call can only take the two
values associated with the cost of each type of call. Therefore the PMF of X is

 0.6 x = 20
0.4 x = 30
PX (x) =
(1)

0
otherwise
(b) The expected cost, E[C], is simply the sum of the cost of each type of call multiplied
by the probability of such a call occurring.
E [C] = 20(0.6) + 30(0.4) = 24 cents
(2)
ECE302 Spring 2015
HW3 Solutions
February 17, 2015
6
Problem 3.5.8 •
Find the expected value of the random variable X in Problem 2.4.3.
Problem 3.5.8 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
The expected value of X is
X
E [X] =
xPX (x) = −3(0.4) + 5(0.4) + 7(0.2) = 2.2
x
(1)
(2)