0% found this document useful (0 votes)
31 views5 pages

hw3 Soln

hw3_soln

Uploaded by

Assem Hefny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views5 pages

hw3 Soln

hw3_soln

Uploaded by

Assem Hefny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

CS 3341 HW # 3 SOLUTION

1. Let the random variable X denote the number of heads in three independent tosses of
a fair coin. Find the PMF of X. Also find the CDF of X.

PMF of X:

x p(x)
0 p(0) = P(X = 0) = P(TTT) = 1/8
1 p(1) = P(X = 1) = P(HTT) + P(THT) + P(TTH) = 3/8
2 p(2) = P(X = 2) = P(HHT) + P(HTH) + P(THH) = 3/8
3 p(3) = P(X = 3) = P(HHH) = 1/8

CDF of X:

F(0) = P(X ≤ 0) = P(0 or fewer heads) = 1/8


F(1) = P(X ≤ 1) = P(1 or fewer heads) = (1/8) + (3/8) = 4/8
F(2) = P(X ≤ 2) = P(2 or fewer heads) = (1/8) + (3/8) + (3/8) = 7/8
F(3) = P(X ≤ 3) = P(3 or fewer heads) = (1/8) + (3/8) + (3/8) + (1/8) = 1

Hence, the CDF of X is:

 0 x<0
1 / 8 0 ≤ x < 1

F ( x ) = 4 / 8 1 ≤ x < 2
7 / 8 2 ≤ x < 3

 1 3≤ x

2. Let X denote the number of busy servers at the checkout counters in a store at 5pm.
Suppose that the CDF of X is:
 0 x<0
0.20 0 ≤ x < 1

0.50 1 ≤ x < 2
F ( x) = 
0.80 2 ≤ x < 3
0.90 3 ≤ x < 4

 1 4≤ x

(a) Find the PMF of X.

The possible values of X are the points at which the CDF F(x) jumps, and the sizes of
the jumps are the probabilities of taking those values. Hence the PMF of X is:

Page 1 of 5
x p(x)
0 p(0) = P(X = 0) = F(0) – F(0-)* = 0.20 – 0 = 0.20
1 p(1) = P(X = 1) = F(1) – F(1-) = 0.50 – 0.20 = 0.30
2 p(2) = P(X = 2) = F(2) – F(2-) = 0.80 – 0.50 = 0.30
3 p(3) = P(X = 3) = F(3) – F(3-) = 0.90 – 0.80 = 0.10
4 p(4) = P(X = 4) = F(4) – F(4-) = 1 – 0.90 = 0.10

*F(a-) represents P(X < a).

(b) Find P(X > 3).

P(X > 3) = 1 – P(X ≤ 3) = 1 – F(3) = 1 – 0.90 = 0.10

3. It is known that there is a defective chip on a computer board that contains 8 chips. A
technician tests the chips one at a time until the defective chip is found. Assume that
the chip to be tested is selected at random without replacement. Let the random
variable X denote the number of chips tested. Find the PMF of X.

Total of 8 chips; 7 = (G)ood, 1 = (D)efective. The PMF is:

x P(X = x)
1 P(X = 1) = P(D) = 1/8
2 P(X = 2) = P(GD) = (7/8)(1/7) = 1/8
3 P(X = 3) = P(GGD) = (7/8)(6/7)(1/6) = 1/8
4 P(X = 4) = P(GGGD) = (7/8)(6/7)(5/6)(1/5) = 1/8
5, 6, 7, 8 P(X = 5) = P(X = 6) = P(X = 7) = P(X = 8) =1/8 [as before]

4. Let X denote the number of speeding tickets issued by Officer Smith on Monday, and
let Y denote the number given on Tuesday. The PMF of X and Y are

X=k 0 1 2 3 4
P(X=k) 0.1 0.2 0.3 0.2 0.2

Y=m 0 1 2 3 4 5
P(Y=m) 0.1 0.1 0.2 0.3 0.2 0.1

Assume that X and Y are independent. Find the joint PMF of X and Y. Also find the
PMF of X + Y.

The table of joint PMF can be obtained by using P(X = k, Y = m) = P(X=k) P(Y=m),
since X and Y are independent.

Page 2 of 5
The possible values of Z = X + Y are 0, 1, 2, …, 9. Here is the PMF of Z:

z 0 1 2 3 4 5 6 7 8 9
P(Z=z) 0.01 0.03 0.07 0.12 0.18 0.20 0.18 0.13 0.06 0.02

One example of how we get this table is the following:

P(Z = 1) = P[ (X, Y) = (0, 1) or (1, 0)] = P[(1,0)] + P[(0,1)], and now substitute these
probabilities from the joint PMF table.

5. The joint distribution of random variables X and Y is given in the table,

(a) Find the marginal PMF’s of X and Y.


(b) Are X and Y independent?

(a) P(X = – 1) = 0.04 + 0.02 + 0.06 + 0.12 = 0.24,


P(X = 0) = 0.50, P(X = 1) = 0.26

P(Y = 1) = 0.04 + 0.08 + 0.16 = 0.28,


P(Y = 2) = 0.16, P(Y = 3) = 0.30, P(Y = 5) = 0.26

(b) No, since P(X = – 1, Y = 1) ≠ P(X = – 1) P(Y = 1)

6. The probability of being able to log on to a certain computer from a remote terminal
at any given time is 0.7. Let X denote the number of independent attempts that must
be made to gain access to the computer. Find the PMF of X.

P(X = 1) = 0.7
P(X = 2) = P(1st = Fail, 2nd = Success) = P(1st = Fail) P(2nd = Success) = (0.3) (0.7) =
0.21
P(X = 3) = P(FFS) = (0.3)2 (0.7) = 0.063, and so on.

In general, for any positive integer k, P(X = k) = (0.3)(k – 1) (0.7).

Page 3 of 5
7. Every day, the number of network blackouts has a distribution (PMF) P(0)=0.6,
P(1)=0.2, P(2)=0.2, independently of other days. What is the probability that there
are more blackouts on Friday than on Thursday?

Let F = # blackouts on Friday, T = # blackouts on Thursday.

Using the theorem of total probability,


P(F > T) = P(F > T, T = 0) + P(F > T, T = 1) + P(F > T, T = 2)
= P(F > 0, T = 0) + P(F > 1, T = 1) + P(F > 2, T = 2)
= {P(F = 1, T = 0) + P(F = 2, T = 0)} + P(F = 2, T =1) + 0
= P(F = 1) P(T = 0) + P(F = 2) P(T = 0) + P(F = 2) P(T = 1) [independence]
= (0.2) (0.6) + (0.2) (0.6) + (0.2) (0.2)
= 0.28

Another way to think about it: Make a table of joint PMF for F and T, and observe that
the event {F > T} consists of the outcomes {(F=1, T=0), (F=2, T=0), (F=2, T=1)}.

8. An internet search engine looks for a certain keyword in a sequence of independent


web sites. It is believed that 20% of the sites contain this keyword.

(a) Let X be the number of websites visited until the first keyword is found. Find the
PMF of X.

P(X = x) = P(First x – 1 sites don’t have the keyword, x-th site has it)
= (0.80)(x – 1) (0.20), for x = 1, 2, 3, ….

(b) Out of the first 5 web sites, let Y be the number of sites that contain the keyword.
Find the PMF of Y.

P(Y = 0) = P(None of the sites has the keyword) = (0.80) 5 = 0.3277


 5
P(Y = 1) = P(1 site has the keyword, 4 sites don’t) =  (0.20)(0.80) 4 = 0.4096.
1
Remember to multiply by “5 choose 1” as there are “5 choose 1 = 5” outcomes where
1 site has the keyword and the other 4 sites don’t.

 5
P(Y = 2) = P(2 sites have, 3 sites don’t) =  (0.20) 2 (0.80) 3 = 0.2048
 2
 5
P(Y = 3) = P(3 sites have, 2 sites don’t) =  (0.20) 3 (0.80) 2 = 0.0512
 3
5
P(Y = 4) = P(4 sites have, 1 site doesn’t) =  (0.20) 4 (0.80) = 0.0064
 4

Page 4 of 5
P(Y = 5) = P(All sites have) = (0.20) 5 = 0.0003

(c) Compute the probability that at least 3 of the first 5 websites contain the keyword.

P(Y ≥ 3) = 0.0512 + 0.0064 + 0.0003 = 0.0579

(d) Compute the probability that the search engine had to visit at least 5 sites in order
to find the first occurrence of a keyword.

P(X ≥ 5) = 1 – P(X ≤ 4) = 1 – 0.5904 = 0.4096

Page 5 of 5

You might also like